Compare commits
28 Commits
#26_incomp
...
2.2.0
Author | SHA1 | Date | |
---|---|---|---|
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 | |||
0fa0d4a5b8 |
@ -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>
|
||||||
|
@ -28,7 +28,6 @@ import com.minres.scviewer.database.IWaveform
|
|||||||
import com.minres.scviewer.database.IWaveformDb
|
import com.minres.scviewer.database.IWaveformDb
|
||||||
import com.minres.scviewer.database.IWaveformDbLoader
|
import com.minres.scviewer.database.IWaveformDbLoader
|
||||||
import com.minres.scviewer.database.RelationType
|
import com.minres.scviewer.database.RelationType
|
||||||
import com.minres.scviewer.database.DataType
|
|
||||||
|
|
||||||
public class TextDbLoader implements IWaveformDbLoader{
|
public class TextDbLoader implements IWaveformDbLoader{
|
||||||
|
|
||||||
@ -86,11 +85,18 @@ public class TextDbLoader implements IWaveformDbLoader{
|
|||||||
calculateConcurrencyIndicees()
|
calculateConcurrencyIndicees()
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
} catch (IndexOutOfBoundsException e) {
|
||||||
|
return false
|
||||||
|
} catch (IllegalArgumentException 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 +135,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 = [:]
|
||||||
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
|||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: SWT widget
|
Bundle-Name: SWT widget
|
||||||
Bundle-SymbolicName: com.minres.scviewer.database.ui.swt
|
Bundle-SymbolicName: com.minres.scviewer.database.ui.swt
|
||||||
Bundle-Version: 2.0.2.qualifier
|
Bundle-Version: 2.1.0.qualifier
|
||||||
Bundle-Vendor: MINRES Technologies GmbH
|
Bundle-Vendor: MINRES Technologies GmbH
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
||||||
Require-Bundle: org.eclipse.swt;bundle-version="3.103.1",
|
Require-Bundle: org.eclipse.swt;bundle-version="3.103.1",
|
||||||
|
@ -8,5 +8,5 @@
|
|||||||
<version>2.0.0-SNAPSHOT</version>
|
<version>2.0.0-SNAPSHOT</version>
|
||||||
<relativePath>../com.minres.scviewer.parent</relativePath>
|
<relativePath>../com.minres.scviewer.parent</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<version>2.0.2-SNAPSHOT</version>
|
<version>2.1.0-SNAPSHOT</version>
|
||||||
</project>
|
</project>
|
@ -46,7 +46,6 @@ public class RulerPainter implements IPainter {
|
|||||||
long startPos=area.x*scaleFactor;
|
long startPos=area.x*scaleFactor;
|
||||||
long startVal=startPos + waveCanvas.getXOffset()*scaleFactor;
|
long startVal=startPos + waveCanvas.getXOffset()*scaleFactor;
|
||||||
long endPos=startPos+area.width*scaleFactor;
|
long endPos=startPos+area.width*scaleFactor;
|
||||||
long endVal=startVal+area.width*scaleFactor;
|
|
||||||
|
|
||||||
long rulerTickMinor = rulerTickMinorC*scaleFactor;
|
long rulerTickMinor = rulerTickMinorC*scaleFactor;
|
||||||
long rulerTickMajor = rulerTickMajorC*scaleFactor;
|
long rulerTickMajor = rulerTickMajorC*scaleFactor;
|
||||||
@ -68,12 +67,9 @@ public class RulerPainter implements IPainter {
|
|||||||
gc.setForeground(headerFgColor);
|
gc.setForeground(headerFgColor);
|
||||||
gc.drawLine(area.x, area.y+bottom, area.x+area.width, area.y+bottom);
|
gc.drawLine(area.x, area.y+bottom, area.x+area.width, area.y+bottom);
|
||||||
|
|
||||||
int x0_max = 0;
|
|
||||||
|
|
||||||
for (long pos = startMinorIncrPos, tick = startMinorIncrVal; pos < endPos; pos+= rulerTickMinor, tick += rulerTickMinor) {
|
for (long pos = startMinorIncrPos, tick = startMinorIncrVal; pos < endPos; pos+= rulerTickMinor, tick += rulerTickMinor) {
|
||||||
int x0_pos = (int) (pos/scaleFactor);
|
int x0_pos = (int) (pos/scaleFactor);
|
||||||
long x0_val = tick/scaleFactor;
|
long x0_val = tick/scaleFactor;
|
||||||
x0_max = x0_pos;
|
|
||||||
if ((tick % rulerTickMajor) == 0) {
|
if ((tick % rulerTickMajor) == 0) {
|
||||||
gc.drawText(df.format(x0_val*unitMultiplier)+unit, x0_pos, area.y+textY);
|
gc.drawText(df.format(x0_val*unitMultiplier)+unit, x0_pos, area.y+textY);
|
||||||
gc.drawLine(x0_pos, area.y+majorTickY, x0_pos,area.y+ bottom);
|
gc.drawLine(x0_pos, area.y+majorTickY, x0_pos,area.y+ bottom);
|
||||||
|
@ -78,11 +78,6 @@ public class SignalPainter extends TrackPainter {
|
|||||||
this.waveCanvas = txDisplay;
|
this.waveCanvas = txDisplay;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getXValEnd(long time) {
|
|
||||||
long ltmp = time / this.waveCanvas.getScaleFactor();
|
|
||||||
return ltmp > maxValX ? maxValX : (int) ltmp;
|
|
||||||
}
|
|
||||||
|
|
||||||
private int getXPosEnd(long time) {
|
private int getXPosEnd(long time) {
|
||||||
long ltmp = time / this.waveCanvas.getScaleFactor() - waveCanvas.getXOffset();
|
long ltmp = time / this.waveCanvas.getScaleFactor() - waveCanvas.getXOffset();
|
||||||
return ltmp > maxPosX ? maxPosX : (int) ltmp;
|
return ltmp > maxPosX ? maxPosX : (int) ltmp;
|
||||||
@ -100,7 +95,6 @@ public class SignalPainter extends TrackPainter {
|
|||||||
long scaleFactor = this.waveCanvas.getScaleFactor();
|
long scaleFactor = this.waveCanvas.getScaleFactor();
|
||||||
long beginPos = area.x;
|
long beginPos = area.x;
|
||||||
long beginTime = (beginPos + waveCanvas.getXOffset())*scaleFactor;
|
long beginTime = (beginPos + waveCanvas.getXOffset())*scaleFactor;
|
||||||
long endPos = beginPos + area.width;
|
|
||||||
long endTime = beginTime + area.width*scaleFactor;
|
long endTime = beginTime + area.width*scaleFactor;
|
||||||
|
|
||||||
Entry<Long, ?> first = signal.getEvents().floorEntry(beginTime);
|
Entry<Long, ?> first = signal.getEvents().floorEntry(beginTime);
|
||||||
@ -125,7 +119,6 @@ public class SignalPainter extends TrackPainter {
|
|||||||
yOffsetB = 4 * this.waveCanvas.getTrackHeight() / 5 + area.y;
|
yOffsetB = 4 * this.waveCanvas.getTrackHeight() / 5 + area.y;
|
||||||
int xSigChangeBeginVal = Math.max(area.x + (int)waveCanvas.getXOffset(), (int) (left.time / this.waveCanvas.getScaleFactor()));
|
int xSigChangeBeginVal = Math.max(area.x + (int)waveCanvas.getXOffset(), (int) (left.time / this.waveCanvas.getScaleFactor()));
|
||||||
int xSigChangeBeginPos = area.x;
|
int xSigChangeBeginPos = area.x;
|
||||||
int xSigChangeEndVal = Math.max(area.x + (int)waveCanvas.getXOffset(), getXValEnd(right.time));
|
|
||||||
int xSigChangeEndPos = Math.max(area.x, getXPosEnd(right.time));
|
int xSigChangeEndPos = Math.max(area.x, getXPosEnd(right.time));
|
||||||
|
|
||||||
boolean multiple = false;
|
boolean multiple = false;
|
||||||
|
@ -229,7 +229,13 @@ public class WaveformCanvas extends Canvas{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setZoomLevel(int level) {
|
public void setZoomLevel(int level) {
|
||||||
|
long tc=cursorPainters.get(0).getTime(); // cursor time
|
||||||
|
setZoomLevel(level, tc);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setZoomLevel(int level, long centerTime) {
|
||||||
long oldScaleFactor=scaleFactor;
|
long oldScaleFactor=scaleFactor;
|
||||||
|
if(level<0) level = 0;
|
||||||
if(level<Constants.unitMultiplier.length*Constants.unitString.length){
|
if(level<Constants.unitMultiplier.length*Constants.unitString.length){
|
||||||
this.level = level;
|
this.level = level;
|
||||||
this.scaleFactor = (long) Math.pow(10, level/2);
|
this.scaleFactor = (long) Math.pow(10, level/2);
|
||||||
@ -242,10 +248,9 @@ public class WaveformCanvas extends Canvas{
|
|||||||
* xcn = tc/newScaleFactor
|
* xcn = tc/newScaleFactor
|
||||||
* t0n = (xcn-xoffs)*scaleFactor
|
* t0n = (xcn-xoffs)*scaleFactor
|
||||||
*/
|
*/
|
||||||
long tc=cursorPainters.get(0).getTime(); // cursor time
|
long xc=centerTime/oldScaleFactor; // cursor total x-offset
|
||||||
long xc=tc/oldScaleFactor; // cursor total x-offset
|
|
||||||
long xoffs=xc+origin.x; // cursor offset relative to left border
|
long xoffs=xc+origin.x; // cursor offset relative to left border
|
||||||
long xcn=tc/scaleFactor; // new total x-offset
|
long xcn=centerTime/scaleFactor; // new total x-offset
|
||||||
long originX=xcn-xoffs;
|
long originX=xcn-xoffs;
|
||||||
if(originX>0) {
|
if(originX>0) {
|
||||||
origin.x=(int) -originX; // new cursor time offset relative to left border
|
origin.x=(int) -originX; // new cursor time offset relative to left border
|
||||||
@ -557,7 +562,7 @@ public class WaveformCanvas extends Canvas{
|
|||||||
return (getClientArea().width+origin.x)*scaleFactor;
|
return (getClientArea().width+origin.x)*scaleFactor;
|
||||||
}
|
}
|
||||||
|
|
||||||
long getOriginTime() {
|
long getMinVisibleTime() {
|
||||||
return origin.x * scaleFactor;
|
return origin.x * scaleFactor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -50,6 +50,9 @@ import org.eclipse.swt.events.DisposeListener;
|
|||||||
import org.eclipse.swt.events.MouseAdapter;
|
import org.eclipse.swt.events.MouseAdapter;
|
||||||
import org.eclipse.swt.events.MouseEvent;
|
import org.eclipse.swt.events.MouseEvent;
|
||||||
import org.eclipse.swt.events.MouseListener;
|
import org.eclipse.swt.events.MouseListener;
|
||||||
|
import org.eclipse.swt.events.MouseMoveListener;
|
||||||
|
import org.eclipse.swt.events.PaintEvent;
|
||||||
|
import org.eclipse.swt.events.PaintListener;
|
||||||
import org.eclipse.swt.events.SelectionAdapter;
|
import org.eclipse.swt.events.SelectionAdapter;
|
||||||
import org.eclipse.swt.events.SelectionEvent;
|
import org.eclipse.swt.events.SelectionEvent;
|
||||||
import org.eclipse.swt.graphics.Font;
|
import org.eclipse.swt.graphics.Font;
|
||||||
@ -139,14 +142,21 @@ public class WaveformViewer implements IWaveformViewer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
protected MouseListener waveformMouseListener = new MouseAdapter(){
|
class WaveformMouseListener implements MouseMoveListener, MouseListener, PaintListener {
|
||||||
Point start;
|
Point start, end;
|
||||||
List<Object> initialSelected;
|
List<Object> initialSelected;
|
||||||
|
boolean down=false;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void mouseDoubleClick(MouseEvent e) {
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void mouseDown(MouseEvent e) {
|
public void mouseDown(MouseEvent e) {
|
||||||
start=new Point(e.x, e.y);
|
start=new Point(e.x, e.y);
|
||||||
|
end=new Point(e.x, e.y);
|
||||||
|
down=true;
|
||||||
if((e.stateMask&SWT.MODIFIER_MASK)!=0) return; //don't react on modifier
|
if((e.stateMask&SWT.MODIFIER_MASK)!=0) return; //don't react on modifier
|
||||||
if (e.button == 1) {
|
if (e.button == 1) {
|
||||||
initialSelected = waveformCanvas.getClicked(start);
|
initialSelected = waveformCanvas.getClicked(start);
|
||||||
@ -156,28 +166,89 @@ public class WaveformViewer implements IWaveformViewer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void mouseMove(MouseEvent e) {
|
||||||
|
if(down) {
|
||||||
|
end=new Point(e.x, e.y);
|
||||||
|
asyncUpdate(e.widget);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void paintControl(PaintEvent e) {
|
||||||
|
if(down) {
|
||||||
|
GC gc = e.gc;
|
||||||
|
gc.setAlpha(128);
|
||||||
|
int minX = Math.min(start.x, end.x);
|
||||||
|
int width = Math.max(start.x, end.x) - minX;
|
||||||
|
Point origin = waveformCanvas.getOrigin();
|
||||||
|
int y_top = waveformCanvas.getRulerHeight()- origin.y;
|
||||||
|
int y_bottom = waveformCanvas.getSize().y;
|
||||||
|
gc.fillRectangle(minX, y_top, width,y_bottom);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void mouseUp(MouseEvent e) {
|
public void mouseUp(MouseEvent e) {
|
||||||
|
down=false;
|
||||||
if(start==null) return;
|
if(start==null) return;
|
||||||
if((e.stateMask&SWT.MODIFIER_MASK&~SWT.SHIFT)!=0) return; //don't react on modifier
|
if((e.stateMask&SWT.MODIFIER_MASK&~SWT.SHIFT)!=0) return; //don't react on modifier except shift
|
||||||
if (e.button == 1 && ((e.stateMask&SWT.SHIFT)==0)) {
|
if(!start.equals(end)){
|
||||||
|
asyncUpdate(e.widget);
|
||||||
|
long startTime = waveformCanvas.getTimeForOffset(start.x);
|
||||||
|
long endTime = waveformCanvas.getTimeForOffset(end.x);
|
||||||
|
long targetTimeRange = endTime-startTime;
|
||||||
|
long currentTimeRange = waveformCanvas.getMaxVisibleTime()-waveformCanvas.getMinVisibleTime();
|
||||||
|
if(targetTimeRange==0) return;
|
||||||
|
long relation = currentTimeRange/targetTimeRange;
|
||||||
|
long i = 1;
|
||||||
|
int level=0;//relation>0?0:0;
|
||||||
|
do {
|
||||||
|
if(relation<0 ) {
|
||||||
|
if(-relation<i) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
level--;
|
||||||
|
if(-relation<i*3) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
level--;
|
||||||
|
} else {
|
||||||
|
if(relation<i) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
level++;
|
||||||
|
if(relation<i*3) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
level++;
|
||||||
|
}
|
||||||
|
i=i*10;
|
||||||
|
} while(i<10000);
|
||||||
|
if(i<10000) {
|
||||||
|
int curLevel = waveformCanvas.getZoomLevel();
|
||||||
|
waveformCanvas.setZoomLevel(curLevel-level, (startTime+endTime)/2);
|
||||||
|
}
|
||||||
|
} else if (e.button == 1 && ((e.stateMask&SWT.SHIFT)==0)) {
|
||||||
|
// set cursor (button 1 and no shift)
|
||||||
if(Math.abs(e.x-start.x)<3 && Math.abs(e.y-start.y)<3){
|
if(Math.abs(e.x-start.x)<3 && Math.abs(e.y-start.y)<3){
|
||||||
// first set cursor time
|
// first set cursor time
|
||||||
setCursorTime(snapOffsetToEvent(e));
|
setCursorTime(snapOffsetToEvent(start));
|
||||||
// then set selection and reveal
|
// then set selection and reveal
|
||||||
setSelection(new StructuredSelection(initialSelected));
|
setSelection(new StructuredSelection(initialSelected));
|
||||||
asyncUpdate(e.widget);
|
asyncUpdate(e.widget);
|
||||||
}
|
}
|
||||||
}else if (e.button == 2 ||(e.button==1 && (e.stateMask&SWT.SHIFT)!=0)) {
|
}else if (e.button == 2 ||(e.button==1 && (e.stateMask&SWT.SHIFT)!=0)) {
|
||||||
setMarkerTime(snapOffsetToEvent(e), selectedMarker);
|
// set marker (button 1 and shift)
|
||||||
|
setMarkerTime(snapOffsetToEvent(start), selectedMarker);
|
||||||
asyncUpdate(e.widget);
|
asyncUpdate(e.widget);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected long snapOffsetToEvent(MouseEvent e) {
|
protected long snapOffsetToEvent(Point p) {
|
||||||
long time= waveformCanvas.getTimeForOffset(e.x);
|
long time= waveformCanvas.getTimeForOffset(p.x);
|
||||||
long scaling=5*waveformCanvas.getScaleFactor();
|
long scaling=5*waveformCanvas.getScaleFactor();
|
||||||
for(Object o:waveformCanvas.getClicked(start)){
|
for(Object o:waveformCanvas.getClicked(p)){
|
||||||
Entry<Long, ?> floorEntry=null, ceilEntry=null;
|
Entry<Long, ?> floorEntry=null, ceilEntry=null;
|
||||||
if(o instanceof TrackEntry){
|
if(o instanceof TrackEntry){
|
||||||
TrackEntry entry = (TrackEntry) o;
|
TrackEntry entry = (TrackEntry) o;
|
||||||
@ -209,7 +280,9 @@ public class WaveformViewer implements IWaveformViewer {
|
|||||||
}
|
}
|
||||||
return time;
|
return time;
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
protected WaveformMouseListener waveformMouseListener = new WaveformMouseListener();
|
||||||
|
|
||||||
public WaveformViewer(Composite parent) {
|
public WaveformViewer(Composite parent) {
|
||||||
pcs=new PropertyChangeSupport(this);
|
pcs=new PropertyChangeSupport(this);
|
||||||
@ -309,6 +382,8 @@ public class WaveformViewer implements IWaveformViewer {
|
|||||||
|
|
||||||
waveformCanvas.setMaxTime(1);
|
waveformCanvas.setMaxTime(1);
|
||||||
waveformCanvas.addMouseListener(waveformMouseListener);
|
waveformCanvas.addMouseListener(waveformMouseListener);
|
||||||
|
waveformCanvas.addMouseMoveListener(waveformMouseListener);
|
||||||
|
waveformCanvas.addPaintListener(waveformMouseListener);
|
||||||
|
|
||||||
nameListScrolled.getVerticalBar().addSelectionListener(new SelectionAdapter() {
|
nameListScrolled.getVerticalBar().addSelectionListener(new SelectionAdapter() {
|
||||||
public void widgetSelected(SelectionEvent e) {
|
public void widgetSelected(SelectionEvent e) {
|
||||||
@ -1230,13 +1305,6 @@ public class WaveformViewer implements IWaveformViewer {
|
|||||||
if(percent<-100) percent=-100;
|
if(percent<-100) percent=-100;
|
||||||
if(percent>100) percent=100;
|
if(percent>100) percent=100;
|
||||||
int diff = (waveformCanvas.getWidth()*percent)/100;
|
int diff = (waveformCanvas.getWidth()*percent)/100;
|
||||||
// ScrollBar sb = waveformCanvas.getHorizontalBar();
|
|
||||||
// int x = sb.getSelection();
|
|
||||||
// System.out.println("Setting sb to "+ (x+diff));
|
|
||||||
// if((x+diff)>0)
|
|
||||||
// sb.setSelection(x+diff);
|
|
||||||
// else
|
|
||||||
// sb.setSelection(0);
|
|
||||||
Point o = waveformCanvas.getOrigin();
|
Point o = waveformCanvas.getOrigin();
|
||||||
waveformCanvas.setOrigin(o.x-diff, o.y);
|
waveformCanvas.setOrigin(o.x-diff, o.y);
|
||||||
waveformCanvas.redraw();
|
waveformCanvas.redraw();
|
||||||
|
@ -12,7 +12,6 @@ package com.minres.scviewer.database.vcd;
|
|||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
import java.io.FileNotFoundException;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
@ -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
|
||||||
|
@ -5,7 +5,8 @@ Bundle-SymbolicName: com.minres.scviewer.database
|
|||||||
Bundle-Version: 1.0.0.qualifier
|
Bundle-Version: 1.0.0.qualifier
|
||||||
Bundle-Vendor: MINRES Technologies GmbH
|
Bundle-Vendor: MINRES Technologies GmbH
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
||||||
Export-Package: com.minres.scviewer.database
|
Export-Package: com.minres.scviewer.database,
|
||||||
|
com.minres.scviewer.database.internal;x-internal:=true
|
||||||
Bundle-ActivationPolicy: lazy
|
Bundle-ActivationPolicy: lazy
|
||||||
Service-Component: OSGI-INF/component.xml,OSGI-INF/component2.xml
|
Service-Component: OSGI-INF/component.xml,OSGI-INF/component2.xml
|
||||||
Automatic-Module-Name: com.minres.scviewer.database
|
Automatic-Module-Name: com.minres.scviewer.database
|
||||||
|
@ -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);
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<application:Application xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:advanced="http://www.eclipse.org/ui/2010/UIModel/application/ui/advanced" xmlns:application="http://www.eclipse.org/ui/2010/UIModel/application" xmlns:basic="http://www.eclipse.org/ui/2010/UIModel/application/ui/basic" xmlns:menu="http://www.eclipse.org/ui/2010/UIModel/application/ui/menu" xmlns:ui="http://www.eclipse.org/ui/2010/UIModel/application/ui" xmi:id="_95PfsHNmEeWBq8z1Dv39LA" elementId="org.eclipse.e4.ide.application" bindingContexts="_95PfuXNmEeWBq8z1Dv39LA">
|
<application:Application xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:advanced="http://www.eclipse.org/ui/2010/UIModel/application/ui/advanced" xmlns:application="http://www.eclipse.org/ui/2010/UIModel/application" xmlns:basic="http://www.eclipse.org/ui/2010/UIModel/application/ui/basic" xmlns:menu="http://www.eclipse.org/ui/2010/UIModel/application/ui/menu" xmlns:ui="http://www.eclipse.org/ui/2010/UIModel/application/ui" xmi:id="_95PfsHNmEeWBq8z1Dv39LA" elementId="org.eclipse.e4.ide.application" bindingContexts="_95PfuXNmEeWBq8z1Dv39LA">
|
||||||
<children xsi:type="basic:TrimmedWindow" xmi:id="_95PfsXNmEeWBq8z1Dv39LA" label="SC Viewer" width="980" height="700">
|
<children xsi:type="basic:TrimmedWindow" xmi:id="_95PfsXNmEeWBq8z1Dv39LA" label="SC Viewer" bindingContexts="_95PfunNmEeWBq8z1Dv39LA" width="980" height="700">
|
||||||
<children xsi:type="advanced:PerspectiveStack" xmi:id="_95QGxnNmEeWBq8z1Dv39LA">
|
<children xsi:type="advanced:PerspectiveStack" xmi:id="_95QGxnNmEeWBq8z1Dv39LA">
|
||||||
<children xsi:type="advanced:Perspective" xmi:id="_95QGx3NmEeWBq8z1Dv39LA">
|
<children xsi:type="advanced:Perspective" xmi:id="_95QGx3NmEeWBq8z1Dv39LA">
|
||||||
<children xsi:type="basic:PartSashContainer" xmi:id="_95QGyHNmEeWBq8z1Dv39LA" horizontal="true">
|
<children xsi:type="basic:PartSashContainer" xmi:id="_95QGyHNmEeWBq8z1Dv39LA" horizontal="true">
|
||||||
<children xsi:type="basic:Part" xmi:id="_95QGynNmEeWBq8z1Dv39LA" elementId="com.minres.scviewer.e4.application.parts.DesignBrowser" containerData="20" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.parts.DesignBrowser" label="Design Browser">
|
<children xsi:type="basic:Part" xmi:id="_95QGynNmEeWBq8z1Dv39LA" elementId="com.minres.scviewer.e4.application.parts.DesignBrowser" containerData="2000" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.parts.DesignBrowser" label="Design Browser" bindingContexts="_iQ3kQGVmEeqSQM-A6dw9ig">
|
||||||
<handlers xmi:id="_JIWOYIq-EeWid7xO48ZBXw" elementId="com.minres.scviewer.e4.application.handler.addWaveformCommand" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.AddWaveformHandler" command="_2PehEHr9EeWVM_sKoXvptg"/>
|
<handlers xmi:id="_JIWOYIq-EeWid7xO48ZBXw" elementId="com.minres.scviewer.e4.application.handler.addWaveformCommand" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.AddWaveformHandler" command="_2PehEHr9EeWVM_sKoXvptg"/>
|
||||||
<menus xsi:type="menu:PopupMenu" xmi:id="_HvUl8Iq-EeWid7xO48ZBXw" elementId="com.minres.scviewer.e4.application.parts.DesignBrowser.popupmenu">
|
<menus xsi:type="menu:PopupMenu" xmi:id="_HvUl8Iq-EeWid7xO48ZBXw" elementId="com.minres.scviewer.e4.application.parts.DesignBrowser.popupmenu">
|
||||||
<children xsi:type="menu:HandledMenuItem" xmi:id="_HvUl8Yq-EeWid7xO48ZBXw" elementId="com.minres.scviewer.e4.application.handledmenuitem.append" label="Append after" iconURI="platform:/plugin/com.minres.scviewer.e4.application/icons/append_wave.png" command="_2PehEHr9EeWVM_sKoXvptg">
|
<children xsi:type="menu:HandledMenuItem" xmi:id="_HvUl8Yq-EeWid7xO48ZBXw" elementId="com.minres.scviewer.e4.application.handledmenuitem.append" label="Append after" iconURI="platform:/plugin/com.minres.scviewer.e4.application/icons/append_wave.png" command="_2PehEHr9EeWVM_sKoXvptg">
|
||||||
@ -25,19 +25,19 @@
|
|||||||
</children>
|
</children>
|
||||||
</menus>
|
</menus>
|
||||||
</children>
|
</children>
|
||||||
<children xsi:type="basic:PartSashContainer" xmi:id="_uT9BIHgtEeWwZ-9vrAR2UQ" elementId="" containerData="80">
|
<children xsi:type="basic:PartSashContainer" xmi:id="_uT9BIHgtEeWwZ-9vrAR2UQ" elementId="" containerData="8000">
|
||||||
<children xsi:type="basic:PartStack" xmi:id="_95QGyXNmEeWBq8z1Dv39LA" elementId="org.eclipse.editorss" containerData="75">
|
<children xsi:type="basic:PartStack" xmi:id="_95QGyXNmEeWBq8z1Dv39LA" elementId="org.eclipse.editorss" containerData="7500">
|
||||||
<tags>NoAutoCollapse</tags>
|
<tags>NoAutoCollapse</tags>
|
||||||
</children>
|
</children>
|
||||||
<children xsi:type="basic:Part" xmi:id="_vtfm8HgtEeWwZ-9vrAR2UQ" elementId="com.minres.scviewer.e4.application.parts.WaveformDetails" containerData="25" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.parts.TransactionDetails" label="Waveform Details"/>
|
<children xsi:type="basic:Part" xmi:id="_vtfm8HgtEeWwZ-9vrAR2UQ" elementId="com.minres.scviewer.e4.application.parts.WaveformDetails" containerData="2500" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.parts.TransactionDetails" label="Waveform Details"/>
|
||||||
</children>
|
</children>
|
||||||
</children>
|
</children>
|
||||||
</children>
|
</children>
|
||||||
</children>
|
</children>
|
||||||
<children xsi:type="basic:Part" xmi:id="__VNlAIytEeWid7xO48ZBXw" elementId="com.minres.scviewer.e4.application.dialog.aboutscviewer" toBeRendered="false" visible="false" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.parts.AboutDialog" label="About SCViewer"/>
|
<children xsi:type="basic:Part" xmi:id="__VNlAIytEeWid7xO48ZBXw" elementId="com.minres.scviewer.e4.application.dialog.aboutscviewer" toBeRendered="false" visible="false" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.parts.AboutDialog" label="About SCViewer" bindingContexts="_95Pfu3NmEeWBq8z1Dv39LA"/>
|
||||||
<mainMenu xmi:id="_95PfyXNmEeWBq8z1Dv39LA" elementId="menu:org.eclipse.ui.main.menu">
|
<mainMenu xmi:id="_95PfyXNmEeWBq8z1Dv39LA" elementId="menu:org.eclipse.ui.main.menu">
|
||||||
<children xsi:type="menu:Menu" xmi:id="_95QGwHNmEeWBq8z1Dv39LA" elementId="com.minres.scviewer.e4.application.menu.file" label="File">
|
<children xsi:type="menu:Menu" xmi:id="_95QGwHNmEeWBq8z1Dv39LA" elementId="com.minres.scviewer.e4.application.menu.file" label="File">
|
||||||
<children xsi:type="menu:HandledMenuItem" xmi:id="_VJG3YHgvEeWwZ-9vrAR2UQ" elementId="" label="Open Database" iconURI="platform:/plugin/com.minres.scviewer.e4.application/icons/folder_database.png" command="_95PfwHNmEeWBq8z1Dv39LA"/>
|
<children xsi:type="menu:HandledMenuItem" xmi:id="_VJG3YHgvEeWwZ-9vrAR2UQ" elementId="" label="Open Database" iconURI="platform:/plugin/com.minres.scviewer.e4.application/icons/folder_database.png" mnemonics="M1+O" command="_95PfwHNmEeWBq8z1Dv39LA"/>
|
||||||
<children xsi:type="menu:HandledMenuItem" xmi:id="_e7MOYJedEeW09eyIbHsdvg" elementId="" label="Load active tab settings" iconURI="platform:/plugin/com.minres.scviewer.e4.application/icons/folder_page.png" command="_7-AIMJebEeW09eyIbHsdvg">
|
<children xsi:type="menu:HandledMenuItem" xmi:id="_e7MOYJedEeW09eyIbHsdvg" elementId="" label="Load active tab settings" iconURI="platform:/plugin/com.minres.scviewer.e4.application/icons/folder_page.png" command="_7-AIMJebEeW09eyIbHsdvg">
|
||||||
<parameters xmi:id="_4vtYgJehEeW09eyIbHsdvg" elementId="com.minres.scviewer.e4.application.parameter.30" name="com.minres.scviewer.e4.application.commandparameter.loadStore" value="load"/>
|
<parameters xmi:id="_4vtYgJehEeW09eyIbHsdvg" elementId="com.minres.scviewer.e4.application.parameter.30" name="com.minres.scviewer.e4.application.commandparameter.loadStore" value="load"/>
|
||||||
</children>
|
</children>
|
||||||
@ -88,7 +88,9 @@
|
|||||||
<children xsi:type="menu:HandledToolItem" xmi:id="_o9UBUJeiEeW09eyIbHsdvg" elementId="com.minres.scviewer.e4.application.handledtoolitem.loadsettings" label="Load settings" iconURI="platform:/plugin/com.minres.scviewer.e4.application/icons/folder_page.png" command="_7-AIMJebEeW09eyIbHsdvg">
|
<children xsi:type="menu:HandledToolItem" xmi:id="_o9UBUJeiEeW09eyIbHsdvg" elementId="com.minres.scviewer.e4.application.handledtoolitem.loadsettings" label="Load settings" iconURI="platform:/plugin/com.minres.scviewer.e4.application/icons/folder_page.png" command="_7-AIMJebEeW09eyIbHsdvg">
|
||||||
<parameters xmi:id="_tQZAEJeiEeW09eyIbHsdvg" elementId="com.minres.scviewer.e4.application.parameter.32" name="com.minres.scviewer.e4.application.commandparameter.loadStore" value="load"/>
|
<parameters xmi:id="_tQZAEJeiEeW09eyIbHsdvg" elementId="com.minres.scviewer.e4.application.parameter.32" name="com.minres.scviewer.e4.application.commandparameter.loadStore" value="load"/>
|
||||||
</children>
|
</children>
|
||||||
<children xsi:type="menu:HandledToolItem" xmi:id="_95QGznNmEeWBq8z1Dv39LA" toBeRendered="false" visible="false" iconURI="platform:/plugin/com.minres.scviewer.e4.application/icons/save_edit.png" command="_95Pfw3NmEeWBq8z1Dv39LA"/>
|
<children xsi:type="menu:HandledToolItem" xmi:id="_95QGznNmEeWBq8z1Dv39LA" elementId="com.minres.scviewer.e4.application.handledtoolitem.savesettings" toBeRendered="false" visible="false" label="Save settings" iconURI="platform:/plugin/com.minres.scviewer.e4.application/icons/save_edit.png" command="_7-AIMJebEeW09eyIbHsdvg">
|
||||||
|
<parameters xmi:id="_HHALEGVSEeqSQM-A6dw9ig" elementId="com.minres.scviewer.e4.application.parameter.32" name="com.minres.scviewer.e4.application.commandparameter.loadStore" value="store"/>
|
||||||
|
</children>
|
||||||
</children>
|
</children>
|
||||||
<children xsi:type="menu:ToolBar" xmi:id="_VUv_AHckEeWwZ-9vrAR2UQ" elementId="com.minres.scviewer.e4.application.toolbar.0">
|
<children xsi:type="menu:ToolBar" xmi:id="_VUv_AHckEeWwZ-9vrAR2UQ" elementId="com.minres.scviewer.e4.application.toolbar.0">
|
||||||
<children xsi:type="menu:HandledToolItem" xmi:id="_EboiQHcjEeWwZ-9vrAR2UQ" elementId="com.minres.scviewer.e4.application.handledtoolitem.removestream" label="Remove Stream" iconURI="platform:/plugin/com.minres.scviewer.e4.application/icons/cross.png" tooltip="Remove stream/waveform from list" command="_WUZ2wHXHEeWwZ-9vrAR2UQ"/>
|
<children xsi:type="menu:HandledToolItem" xmi:id="_EboiQHcjEeWwZ-9vrAR2UQ" elementId="com.minres.scviewer.e4.application.handledtoolitem.removestream" label="Remove Stream" iconURI="platform:/plugin/com.minres.scviewer.e4.application/icons/cross.png" tooltip="Remove stream/waveform from list" command="_WUZ2wHXHEeWwZ-9vrAR2UQ"/>
|
||||||
@ -155,16 +157,49 @@
|
|||||||
<handlers xmi:id="_V4EscIuGEeWid7xO48ZBXw" elementId="com.minres.scviewer.e4.application.handler.setreleationtype" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.SetRelationTypeHandler" command="_E9lUgIt2EeWid7xO48ZBXw"/>
|
<handlers xmi:id="_V4EscIuGEeWid7xO48ZBXw" elementId="com.minres.scviewer.e4.application.handler.setreleationtype" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.SetRelationTypeHandler" command="_E9lUgIt2EeWid7xO48ZBXw"/>
|
||||||
<handlers xmi:id="__99WoJebEeW09eyIbHsdvg" elementId="com.minres.scviewer.e4.application.handler.loadStoreSettings" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.LoadStoreSettingsHandler" command="_7-AIMJebEeW09eyIbHsdvg"/>
|
<handlers xmi:id="__99WoJebEeW09eyIbHsdvg" elementId="com.minres.scviewer.e4.application.handler.loadStoreSettings" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.LoadStoreSettingsHandler" command="_7-AIMJebEeW09eyIbHsdvg"/>
|
||||||
<bindingTables xmi:id="_95PfvnNmEeWBq8z1Dv39LA" bindingContext="_95PfuXNmEeWBq8z1Dv39LA">
|
<bindingTables xmi:id="_95PfvnNmEeWBq8z1Dv39LA" bindingContext="_95PfuXNmEeWBq8z1Dv39LA">
|
||||||
<bindings xmi:id="_95Pfv3NmEeWBq8z1Dv39LA" keySequence="M1+Q" command="_95PfvHNmEeWBq8z1Dv39LA"/>
|
<bindings xmi:id="_95Pfv3NmEeWBq8z1Dv39LA" elementId="com.minres.scviewer.e4.application.keybinding.quit" keySequence="M1+Q" command="_95PfvHNmEeWBq8z1Dv39LA">
|
||||||
<bindings xmi:id="_95PfwnNmEeWBq8z1Dv39LA" keySequence="M1+O" command="_95PfwHNmEeWBq8z1Dv39LA"/>
|
<tags>type:user</tags>
|
||||||
<bindings xmi:id="_95PfxXNmEeWBq8z1Dv39LA" keySequence="M1+S" command="_95Pfw3NmEeWBq8z1Dv39LA"/>
|
</bindings>
|
||||||
<bindings xmi:id="_95PfyHNmEeWBq8z1Dv39LA" keySequence="M1+A" command="_bV-TMHXHEeWwZ-9vrAR2UQ"/>
|
</bindingTables>
|
||||||
|
<bindingTables xmi:id="_zZFy0GVNEeqSQM-A6dw9ig" elementId="com.minres.scviewer.e4.application.bindingtable.waveform" bindingContext="_q4VSsGVNEeqSQM-A6dw9ig">
|
||||||
|
<bindings xmi:id="_1o3dEGVNEeqSQM-A6dw9ig" elementId="com.minres.scviewer.e4.application.keybinding.zoom_in" keySequence="M1++" command="_693GoHcqEeWwZ-9vrAR2UQ">
|
||||||
|
<tags>type:user</tags>
|
||||||
|
<parameters xmi:id="_53UagGVNEeqSQM-A6dw9ig" elementId="com.minres.scviewer.e4.application.parameter.33" name="com.minres.scviewer.e4.application.command.zoomcommand.parameter.level" value="in"/>
|
||||||
|
</bindings>
|
||||||
|
<bindings xmi:id="_8i3awGVNEeqSQM-A6dw9ig" elementId="com.minres.scviewer.e4.application.keybinding.zoom_out" keySequence="M1+-" command="_693GoHcqEeWwZ-9vrAR2UQ">
|
||||||
|
<tags>type:user</tags>
|
||||||
|
<parameters xmi:id="__UCh4GVNEeqSQM-A6dw9ig" elementId="com.minres.scviewer.e4.application.parameter.34" name="com.minres.scviewer.e4.application.command.zoomcommand.parameter.level" value="out"/>
|
||||||
|
</bindings>
|
||||||
|
</bindingTables>
|
||||||
|
<bindingTables xmi:id="_XullMGVOEeqSQM-A6dw9ig" elementId="com.minres.scviewer.e4.application.bindingtable.window" bindingContext="_95PfunNmEeWBq8z1Dv39LA">
|
||||||
|
<bindings xmi:id="_95PfwnNmEeWBq8z1Dv39LA" elementId="com.minres.scviewer.e4.application.keybinding.load" keySequence="M1+L" command="_7-AIMJebEeW09eyIbHsdvg">
|
||||||
|
<tags>type:user</tags>
|
||||||
|
<parameters xmi:id="_G_ulwGVPEeqSQM-A6dw9ig" elementId="com.minres.scviewer.e4.application.parameter.35" name="com.minres.scviewer.e4.application.commandparameter.loadStore" value="load"/>
|
||||||
|
</bindings>
|
||||||
|
<bindings xmi:id="_95PfxXNmEeWBq8z1Dv39LA" elementId="com.minres.scviewer.e4.application.keybinding.save" keySequence="M1+S" command="_7-AIMJebEeW09eyIbHsdvg">
|
||||||
|
<tags>type:user</tags>
|
||||||
|
<parameters xmi:id="_NJlf8GVPEeqSQM-A6dw9ig" elementId="com.minres.scviewer.e4.application.parameter.36" name="com.minres.scviewer.e4.application.commandparameter.loadStore" value="store"/>
|
||||||
|
</bindings>
|
||||||
|
<bindings xmi:id="_s7JNEGVPEeqSQM-A6dw9ig" elementId="com.minres.scviewer.e4.application.keybinding.preferences" keySequence="M1+," command="_AxH6sIl_EeWxJ_wPkM6yGQ">
|
||||||
|
<tags>type:user</tags>
|
||||||
|
</bindings>
|
||||||
|
<bindings xmi:id="_3PRIQGVPEeqSQM-A6dw9ig" elementId="com.minres.scviewer.e4.application.keybinding.open" keySequence="M1+O" command="_95PfwHNmEeWBq8z1Dv39LA">
|
||||||
|
<tags>type:user</tags>
|
||||||
|
</bindings>
|
||||||
|
</bindingTables>
|
||||||
|
<bindingTables xmi:id="_mnMrUGVmEeqSQM-A6dw9ig" elementId="com.minres.scviewer.e4.application.bindingtable.0" bindingContext="_iQ3kQGVmEeqSQM-A6dw9ig">
|
||||||
|
<bindings xmi:id="_n9yDwGVmEeqSQM-A6dw9ig" elementId="com.minres.scviewer.e4.application.keybinding.0" keySequence="M1+A" command="_bV-TMHXHEeWwZ-9vrAR2UQ">
|
||||||
|
<tags>type:user</tags>
|
||||||
|
</bindings>
|
||||||
</bindingTables>
|
</bindingTables>
|
||||||
<rootContext xmi:id="_95PfuXNmEeWBq8z1Dv39LA" elementId="org.eclipse.ui.contexts.dialogAndWindow" name="In Dialog and Windows">
|
<rootContext xmi:id="_95PfuXNmEeWBq8z1Dv39LA" elementId="org.eclipse.ui.contexts.dialogAndWindow" name="In Dialog and Windows">
|
||||||
<children xmi:id="_95PfunNmEeWBq8z1Dv39LA" elementId="org.eclipse.ui.contexts.window" name="In Windows"/>
|
<children xmi:id="_95PfunNmEeWBq8z1Dv39LA" elementId="org.eclipse.ui.contexts.window" name="In Windows">
|
||||||
|
<children xmi:id="_q4VSsGVNEeqSQM-A6dw9ig" elementId="com.minres.scviewer.e4.application.bindingcontext.waveform" name="In Waveform Part"/>
|
||||||
|
<children xmi:id="_iQ3kQGVmEeqSQM-A6dw9ig" elementId="com.minres.scviewer.e4.application.bindingcontext.indesignbrowser" name="In DesignBrowser"/>
|
||||||
|
</children>
|
||||||
<children xmi:id="_95Pfu3NmEeWBq8z1Dv39LA" elementId="org.eclipse.ui.contexts.dialog" name="In Dialogs"/>
|
<children xmi:id="_95Pfu3NmEeWBq8z1Dv39LA" elementId="org.eclipse.ui.contexts.dialog" name="In Dialogs"/>
|
||||||
</rootContext>
|
</rootContext>
|
||||||
<descriptors xmi:id="_KicY0HRMEeWBq8z1Dv39LA" elementId="com.minres.scviewer.e4.application.partdescriptor.waveformviewer" label="SCViewer" iconURI="platform:/plugin/com.minres.scviewer.e4.application/icons/scviewer.png" allowMultiple="true" category="General" closeable="true" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.parts.WaveformViewer">
|
<descriptors xmi:id="_KicY0HRMEeWBq8z1Dv39LA" elementId="com.minres.scviewer.e4.application.partdescriptor.waveformviewer" label="SCViewer" iconURI="platform:/plugin/com.minres.scviewer.e4.application/icons/scviewer.png" bindingContexts="_q4VSsGVNEeqSQM-A6dw9ig" allowMultiple="true" category="General" closeable="true" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.parts.WaveformViewer">
|
||||||
<tags>categoryTag:General</tags>
|
<tags>categoryTag:General</tags>
|
||||||
<handlers xmi:id="_BSIuEHacEeWwZ-9vrAR2UQ" elementId="com.minres.scviewer.e4.application.handler.navigateEventCommand" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.NavigateEvent" command="_79rx4HabEeWwZ-9vrAR2UQ"/>
|
<handlers xmi:id="_BSIuEHacEeWwZ-9vrAR2UQ" elementId="com.minres.scviewer.e4.application.handler.navigateEventCommand" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.NavigateEvent" command="_79rx4HabEeWwZ-9vrAR2UQ"/>
|
||||||
<handlers xmi:id="_JpdGwHXKEeWwZ-9vrAR2UQ" elementId="com.minres.scviewer.e4.application.handler.navigateTransCommand" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.NavigateTrans" command="_Gn3lEHXKEeWwZ-9vrAR2UQ"/>
|
<handlers xmi:id="_JpdGwHXKEeWwZ-9vrAR2UQ" elementId="com.minres.scviewer.e4.application.handler.navigateTransCommand" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.NavigateTrans" command="_Gn3lEHXKEeWwZ-9vrAR2UQ"/>
|
||||||
|
@ -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.2.0.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,4 +1,3 @@
|
|||||||
output.. = bin/
|
|
||||||
bin.includes = META-INF/,\
|
bin.includes = META-INF/,\
|
||||||
.,\
|
.,\
|
||||||
plugin.xml,\
|
plugin.xml,\
|
||||||
|
@ -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.2.0-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;
|
||||||
|
@ -11,13 +11,33 @@
|
|||||||
|
|
||||||
package com.minres.scviewer.e4.application.handlers;
|
package com.minres.scviewer.e4.application.handlers;
|
||||||
|
|
||||||
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import org.eclipse.e4.core.di.annotations.Execute;
|
import org.eclipse.e4.core.di.annotations.Execute;
|
||||||
|
import org.eclipse.e4.core.di.annotations.Optional;
|
||||||
|
import org.eclipse.e4.ui.model.application.ui.basic.MPart;
|
||||||
|
import org.eclipse.e4.ui.workbench.modeling.EPartService;
|
||||||
|
|
||||||
|
import com.minres.scviewer.e4.application.parts.DesignBrowser;
|
||||||
|
|
||||||
public class SelectAllHandler {
|
public class SelectAllHandler {
|
||||||
|
|
||||||
|
@Inject @Optional DesignBrowser designBrowser;
|
||||||
|
|
||||||
@Execute
|
@Execute
|
||||||
public void execute() {
|
public void execute(EPartService partService) {
|
||||||
|
if(designBrowser==null) designBrowser = getListPart(partService);
|
||||||
|
if(designBrowser!=null){
|
||||||
|
designBrowser.selectAllWaveforms();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected DesignBrowser getListPart(EPartService partService){
|
||||||
|
MPart part = partService.getActivePart();
|
||||||
|
if(part.getObject() instanceof DesignBrowser)
|
||||||
|
return (DesignBrowser) part.getObject();
|
||||||
|
else
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -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...
|
||||||
|
@ -139,6 +139,7 @@ public class AboutDialog extends Dialog {
|
|||||||
// links are activated on mouse down when the control key is held down
|
// links are activated on mouse down when the control key is held down
|
||||||
// if ((event.stateMask & SWT.MOD1) != 0) {
|
// if ((event.stateMask & SWT.MOD1) != 0) {
|
||||||
try {
|
try {
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
int offset = ((StyledText)event.widget).getOffsetAtLocation(new Point (event.x, event.y));
|
int offset = ((StyledText)event.widget).getOffsetAtLocation(new Point (event.x, event.y));
|
||||||
StyleRange style = ((StyledText)event.widget).getStyleRangeAtOffset(offset);
|
StyleRange style = ((StyledText)event.widget).getStyleRangeAtOffset(offset);
|
||||||
if (style != null && style.underline && style.underlineStyle == SWT.UNDERLINE_LINK) {
|
if (style != null && style.underline && style.underlineStyle == SWT.UNDERLINE_LINK) {
|
||||||
|
@ -13,8 +13,10 @@ package com.minres.scviewer.e4.application.parts;
|
|||||||
import java.beans.PropertyChangeEvent;
|
import java.beans.PropertyChangeEvent;
|
||||||
import java.beans.PropertyChangeListener;
|
import java.beans.PropertyChangeListener;
|
||||||
import java.lang.annotation.Annotation;
|
import java.lang.annotation.Annotation;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
import java.util.regex.PatternSyntaxException;
|
import java.util.regex.PatternSyntaxException;
|
||||||
|
|
||||||
import javax.annotation.PostConstruct;
|
import javax.annotation.PostConstruct;
|
||||||
@ -35,14 +37,18 @@ import org.eclipse.e4.ui.services.IServiceConstants;
|
|||||||
import org.eclipse.e4.ui.workbench.modeling.EPartService;
|
import org.eclipse.e4.ui.workbench.modeling.EPartService;
|
||||||
import org.eclipse.e4.ui.workbench.modeling.ESelectionService;
|
import org.eclipse.e4.ui.workbench.modeling.ESelectionService;
|
||||||
import org.eclipse.jface.viewers.DoubleClickEvent;
|
import org.eclipse.jface.viewers.DoubleClickEvent;
|
||||||
|
import org.eclipse.jface.viewers.IContentProvider;
|
||||||
import org.eclipse.jface.viewers.IDoubleClickListener;
|
import org.eclipse.jface.viewers.IDoubleClickListener;
|
||||||
import org.eclipse.jface.viewers.ISelection;
|
import org.eclipse.jface.viewers.ISelection;
|
||||||
import org.eclipse.jface.viewers.ISelectionChangedListener;
|
import org.eclipse.jface.viewers.ISelectionChangedListener;
|
||||||
import org.eclipse.jface.viewers.IStructuredContentProvider;
|
import org.eclipse.jface.viewers.IStructuredContentProvider;
|
||||||
import org.eclipse.jface.viewers.IStructuredSelection;
|
import org.eclipse.jface.viewers.IStructuredSelection;
|
||||||
|
import org.eclipse.jface.viewers.ITreeContentProvider;
|
||||||
|
import org.eclipse.jface.viewers.ITreePathContentProvider;
|
||||||
import org.eclipse.jface.viewers.SelectionChangedEvent;
|
import org.eclipse.jface.viewers.SelectionChangedEvent;
|
||||||
import org.eclipse.jface.viewers.StructuredSelection;
|
import org.eclipse.jface.viewers.StructuredSelection;
|
||||||
import org.eclipse.jface.viewers.TableViewer;
|
import org.eclipse.jface.viewers.TableViewer;
|
||||||
|
import org.eclipse.jface.viewers.TreePath;
|
||||||
import org.eclipse.jface.viewers.TreeViewer;
|
import org.eclipse.jface.viewers.TreeViewer;
|
||||||
import org.eclipse.jface.viewers.Viewer;
|
import org.eclipse.jface.viewers.Viewer;
|
||||||
import org.eclipse.jface.viewers.ViewerFilter;
|
import org.eclipse.jface.viewers.ViewerFilter;
|
||||||
@ -68,6 +74,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;
|
||||||
@ -110,17 +117,23 @@ 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. */
|
||||||
|
StreamTTreeFilter treeAttributeFilter;
|
||||||
|
|
||||||
/** The name filter. */
|
/** The name filter. */
|
||||||
private Text nameFilter;
|
private Text tableNameFilter;
|
||||||
|
|
||||||
|
/** The attribute filter. */
|
||||||
|
StreamTableFilter tableAttributeFilter;
|
||||||
|
|
||||||
/** The tx table viewer. */
|
/** The tx table viewer. */
|
||||||
private TableViewer txTableViewer;
|
private TableViewer txTableViewer;
|
||||||
|
|
||||||
/** The append all item. */
|
/** The append all item. */
|
||||||
ToolItem appendItem, insertItem, insertAllItem, appendAllItem;
|
ToolItem appendItem, insertItem;
|
||||||
|
|
||||||
/** The attribute filter. */
|
|
||||||
WaveformAttributeFilter attributeFilter;
|
|
||||||
|
|
||||||
/** The other selection count. */
|
/** The other selection count. */
|
||||||
int thisSelectionCount=0, otherSelectionCount=0;
|
int thisSelectionCount=0, otherSelectionCount=0;
|
||||||
@ -189,10 +202,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 StreamTTreeFilter();
|
||||||
|
|
||||||
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() {
|
||||||
@ -223,25 +251,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 StreamTableFilter();
|
||||||
|
|
||||||
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) {
|
||||||
@ -259,7 +287,6 @@ public class DesignBrowser {
|
|||||||
updateButtons();
|
updateButtons();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
menuService.registerContextMenu(txTableViewer.getControl(), POPUP_ID);
|
menuService.registerContextMenu(txTableViewer.getControl(), POPUP_ID);
|
||||||
|
|
||||||
ToolBar toolBar = new ToolBar(parent, SWT.FLAT | SWT.RIGHT);
|
ToolBar toolBar = new ToolBar(parent, SWT.FLAT | SWT.RIGHT);
|
||||||
@ -294,48 +321,6 @@ public class DesignBrowser {
|
|||||||
ContextInjectionFactory.invoke(myHandler, Execute.class, eclipseCtx);
|
ContextInjectionFactory.invoke(myHandler, Execute.class, eclipseCtx);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
new ToolItem(toolBar, SWT.SEPARATOR);
|
|
||||||
|
|
||||||
appendAllItem = new ToolItem(toolBar, SWT.NONE);
|
|
||||||
appendAllItem.setToolTipText(Messages.DesignBrowser_12);
|
|
||||||
appendAllItem.setImage(ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/append_all_waves.png")); //$NON-NLS-1$ //$NON-NLS-2$
|
|
||||||
appendAllItem.setEnabled(false);
|
|
||||||
|
|
||||||
new ToolItem(toolBar, SWT.SEPARATOR);
|
|
||||||
appendAllItem.addSelectionListener(new SelectionAdapter() {
|
|
||||||
@Override
|
|
||||||
public void widgetSelected(SelectionEvent e) {
|
|
||||||
Object[] all = getFilteredChildren(txTableViewer);
|
|
||||||
if(all.length>0){
|
|
||||||
Object oldSel=selectionService.getSelection();
|
|
||||||
selectionService.setSelection(new StructuredSelection(all));
|
|
||||||
AddWaveformHandler myHandler = new AddWaveformHandler();
|
|
||||||
Object result = runCommand(myHandler, CanExecute.class, "after", false); //$NON-NLS-1$
|
|
||||||
if(result!=null && (Boolean)result)
|
|
||||||
ContextInjectionFactory.invoke(myHandler, Execute.class, eclipseCtx);
|
|
||||||
selectionService.setSelection(oldSel);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
insertAllItem = new ToolItem(toolBar, SWT.NONE);
|
|
||||||
insertAllItem.setToolTipText(Messages.DesignBrowser_16);
|
|
||||||
insertAllItem.setImage(ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/insert_all_waves.png")); //$NON-NLS-1$ //$NON-NLS-2$
|
|
||||||
insertAllItem.setEnabled(false);
|
|
||||||
insertAllItem.addSelectionListener(new SelectionAdapter() {
|
|
||||||
@Override
|
|
||||||
public void widgetSelected(SelectionEvent e) {
|
|
||||||
Object[] all = getFilteredChildren(txTableViewer);
|
|
||||||
if(all.length>0){
|
|
||||||
Object oldSel=selectionService.getSelection();
|
|
||||||
selectionService.setSelection(new StructuredSelection(all));
|
|
||||||
AddWaveformHandler myHandler = new AddWaveformHandler();
|
|
||||||
Object result = runCommand(myHandler, CanExecute.class, "before", false); //$NON-NLS-1$
|
|
||||||
if(result!=null && (Boolean)result)
|
|
||||||
ContextInjectionFactory.invoke(myHandler, Execute.class, eclipseCtx);
|
|
||||||
selectionService.setSelection(oldSel);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -363,6 +348,16 @@ public class DesignBrowser {
|
|||||||
txTableViewer.setSelection(null);
|
txTableViewer.setSelection(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void selectAllWaveforms() {
|
||||||
|
int itemCount = txTableViewer.getTable().getItemCount();
|
||||||
|
ArrayList<Object> list = new ArrayList<>();
|
||||||
|
for(int i=0; i<itemCount; i++) {
|
||||||
|
list.add(txTableViewer.getElementAt(i));
|
||||||
|
}
|
||||||
|
StructuredSelection sel = new StructuredSelection(list);
|
||||||
|
txTableViewer.setSelection(sel);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the status event.
|
* Gets the status event.
|
||||||
*
|
*
|
||||||
@ -430,27 +425,23 @@ public class DesignBrowser {
|
|||||||
* Update buttons.
|
* Update buttons.
|
||||||
*/
|
*/
|
||||||
private void updateButtons() {
|
private void updateButtons() {
|
||||||
if(txTableViewer!=null && !insertItem.isDisposed() && !appendItem.isDisposed() &&
|
if(txTableViewer!=null && !insertItem.isDisposed() && !appendItem.isDisposed()){
|
||||||
!appendAllItem.isDisposed() && !insertAllItem.isDisposed()){
|
|
||||||
AddWaveformHandler myHandler = new AddWaveformHandler();
|
AddWaveformHandler myHandler = new AddWaveformHandler();
|
||||||
Object result = runCommand(myHandler, CanExecute.class, "after", false); //$NON-NLS-1$
|
Object result = runCommand(myHandler, CanExecute.class, "after", false); //$NON-NLS-1$
|
||||||
appendItem.setEnabled(result instanceof Boolean && (Boolean)result);
|
appendItem.setEnabled(result instanceof Boolean && (Boolean)result);
|
||||||
result = runCommand(myHandler, CanExecute.class, "after", true); //$NON-NLS-1$
|
|
||||||
appendAllItem.setEnabled(result instanceof Boolean && (Boolean)result);
|
|
||||||
result = runCommand(myHandler, CanExecute.class, "before", false); //$NON-NLS-1$
|
result = runCommand(myHandler, CanExecute.class, "before", false); //$NON-NLS-1$
|
||||||
insertItem.setEnabled(result instanceof Boolean && (Boolean)result);
|
insertItem.setEnabled(result instanceof Boolean && (Boolean)result);
|
||||||
result = runCommand(myHandler, CanExecute.class, "before", true); //$NON-NLS-1$
|
|
||||||
insertAllItem.setEnabled(result instanceof Boolean && (Boolean)result);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Class WaveformAttributeFilter.
|
* The Class StreamTableFilter.
|
||||||
*/
|
*/
|
||||||
public class WaveformAttributeFilter extends ViewerFilter {
|
public class StreamTableFilter extends ViewerFilter {
|
||||||
|
|
||||||
/** The search string. */
|
/** The search string. */
|
||||||
private String searchString;
|
private String searchString;
|
||||||
|
private Pattern pattern;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the search text.
|
* Sets the search text.
|
||||||
@ -458,7 +449,10 @@ public class DesignBrowser {
|
|||||||
* @param s the new search text
|
* @param s the new search text
|
||||||
*/
|
*/
|
||||||
public void setSearchText(String s) {
|
public void setSearchText(String s) {
|
||||||
this.searchString = ".*" + s + ".*"; //$NON-NLS-1$ //$NON-NLS-2$
|
try {
|
||||||
|
pattern = Pattern.compile(".*" + s + ".*"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
|
this.searchString = ".*" + s + ".*"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
|
} catch (PatternSyntaxException e) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
@ -469,17 +463,103 @@ 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) {
|
||||||
try {
|
if (pattern.matcher(((IWaveform) element).getName()).matches())
|
||||||
if (p.getName().matches(searchString))
|
|
||||||
return true;
|
return true;
|
||||||
} catch (PatternSyntaxException e) {
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class StreamTTreeFilter extends ViewerFilter {
|
||||||
|
|
||||||
|
/** The search string. */
|
||||||
|
private String searchString;
|
||||||
|
private Pattern pattern;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the search text.
|
||||||
|
*
|
||||||
|
* @param s the new search text
|
||||||
|
*/
|
||||||
|
public void setSearchText(String s) {
|
||||||
|
try {
|
||||||
|
pattern = Pattern.compile(".*" + s + ".*");
|
||||||
|
this.searchString = ".*" + s + ".*"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
|
} catch (PatternSyntaxException e) {}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean select(Viewer viewer, Object parentElement, Object element) {
|
||||||
|
return selectTreePath(viewer, new TreePath(new Object[] { parentElement }), element);
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean selectTreePath(Viewer viewer, TreePath parentPath, Object element) {
|
||||||
|
// Cut off children of elements that are shown repeatedly.
|
||||||
|
for (int i = 0; i < parentPath.getSegmentCount() - 1; i++) {
|
||||||
|
if (element.equals(parentPath.getSegment(i))) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(viewer instanceof TreeViewer)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (searchString == null || searchString.length() == 0) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
TreeViewer treeViewer = (TreeViewer) viewer;
|
||||||
|
Boolean matchingResult = isMatchingOrNull(element);
|
||||||
|
if (matchingResult != null) {
|
||||||
|
return matchingResult;
|
||||||
|
}
|
||||||
|
return hasUnfilteredChild(treeViewer, parentPath, element);
|
||||||
|
}
|
||||||
|
|
||||||
|
Boolean isMatchingOrNull(Object element) {
|
||||||
|
if(element instanceof IWaveform) {
|
||||||
|
if (pattern.matcher(((IWaveform) element).getName()).matches())
|
||||||
|
return Boolean.TRUE;
|
||||||
|
} else if(element instanceof IWaveformDb) {
|
||||||
|
return Boolean.TRUE;
|
||||||
|
} else if(element instanceof HierNode) {
|
||||||
|
HierNode n = (HierNode) element;
|
||||||
|
try {
|
||||||
|
if (pattern.matcher(n.getFullName()).matches())
|
||||||
|
return Boolean.TRUE;
|
||||||
|
} catch (PatternSyntaxException e) {
|
||||||
|
return Boolean.TRUE;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return Boolean.FALSE;
|
||||||
|
}
|
||||||
|
/* maybe children are matching */
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean hasUnfilteredChild(TreeViewer viewer, TreePath parentPath, Object element) {
|
||||||
|
TreePath elementPath = parentPath.createChildPath(element);
|
||||||
|
IContentProvider contentProvider = viewer.getContentProvider();
|
||||||
|
Object[] children = contentProvider instanceof ITreePathContentProvider
|
||||||
|
? ((ITreePathContentProvider) contentProvider).getChildren(elementPath)
|
||||||
|
: ((ITreeContentProvider) contentProvider).getChildren(element);
|
||||||
|
|
||||||
|
/* avoid NPE + guard close */
|
||||||
|
if (children == null || children.length == 0) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
for (int i = 0; i < children.length; i++) {
|
||||||
|
if (selectTreePath(viewer, elementPath, children[i])) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Gets the filtered children.
|
* Gets the filtered children.
|
||||||
*
|
*
|
||||||
|
@ -8,7 +8,6 @@ import java.util.List;
|
|||||||
import com.minres.scviewer.database.IHierNode;
|
import com.minres.scviewer.database.IHierNode;
|
||||||
import com.minres.scviewer.database.IWaveform;
|
import com.minres.scviewer.database.IWaveform;
|
||||||
import com.minres.scviewer.database.IWaveformDb;
|
import com.minres.scviewer.database.IWaveformDb;
|
||||||
import com.minres.scviewer.database.IWaveformEvent;
|
|
||||||
import com.minres.scviewer.database.RelationType;
|
import com.minres.scviewer.database.RelationType;
|
||||||
import com.minres.scviewer.e4.application.Messages;
|
import com.minres.scviewer.e4.application.Messages;
|
||||||
|
|
||||||
|
@ -65,16 +65,12 @@ import org.eclipse.jface.viewers.StructuredSelection;
|
|||||||
import org.eclipse.swt.SWT;
|
import org.eclipse.swt.SWT;
|
||||||
import org.eclipse.swt.events.DisposeEvent;
|
import org.eclipse.swt.events.DisposeEvent;
|
||||||
import org.eclipse.swt.events.DisposeListener;
|
import org.eclipse.swt.events.DisposeListener;
|
||||||
import org.eclipse.swt.events.MouseEvent;
|
|
||||||
import org.eclipse.swt.events.MouseTrackListener;
|
|
||||||
import org.eclipse.swt.events.MouseWheelListener;
|
|
||||||
import org.eclipse.swt.graphics.RGB;
|
import org.eclipse.swt.graphics.RGB;
|
||||||
import org.eclipse.swt.graphics.Rectangle;
|
import org.eclipse.swt.graphics.Rectangle;
|
||||||
import org.eclipse.swt.widgets.Composite;
|
import org.eclipse.swt.widgets.Composite;
|
||||||
import org.eclipse.swt.widgets.Display;
|
import org.eclipse.swt.widgets.Display;
|
||||||
import org.eclipse.swt.widgets.Event;
|
import org.eclipse.swt.widgets.Event;
|
||||||
import org.eclipse.swt.widgets.Listener;
|
import org.eclipse.swt.widgets.Listener;
|
||||||
import org.eclipse.swt.widgets.MessageBox;
|
|
||||||
|
|
||||||
import com.minres.scviewer.database.ITx;
|
import com.minres.scviewer.database.ITx;
|
||||||
import com.minres.scviewer.database.ITxEvent;
|
import com.minres.scviewer.database.ITxEvent;
|
||||||
@ -281,51 +277,10 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
waveformPane.getWaveformControl().addMouseTrackListener(new MouseTrackListener() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void mouseHover(MouseEvent e) {
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void mouseExit(MouseEvent e) {
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void mouseEnter(MouseEvent e) {
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
waveformPane.getWaveformControl().addMouseWheelListener(new MouseWheelListener() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void mouseScrolled(MouseEvent e) {
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
waveformPane.getWaveformControl().addListener(SWT.KeyDown, new Listener() {
|
waveformPane.getWaveformControl().addListener(SWT.KeyDown, new Listener() {
|
||||||
|
|
||||||
@SuppressWarnings("null")
|
|
||||||
@Override
|
@Override
|
||||||
public void handleEvent(Event e) {
|
public void handleEvent(Event e) {
|
||||||
/*
|
|
||||||
String string = e.type == SWT.KeyDown ? "DOWN:" : "UP :";
|
|
||||||
string += " stateMask=0x" + Integer.toHexString (e.stateMask) + ","; // SWT.CTRL, SWT.ALT, SWT.SHIFT, SWT.COMMAND
|
|
||||||
string += " keyCode=0x" + Integer.toHexString (e.keyCode) + ",";
|
|
||||||
string += " character=0x" + Integer.toHexString (e.character) ;
|
|
||||||
if (e.keyLocation != 0) {
|
|
||||||
string += " location="+e.keyLocation;
|
|
||||||
}
|
|
||||||
System.out.println (string);
|
|
||||||
*/
|
|
||||||
if((e.stateMask&SWT.MOD3)!=0) { // Alt key
|
if((e.stateMask&SWT.MOD3)!=0) { // Alt key
|
||||||
} else if((e.stateMask&SWT.MOD1)!=0) { //Ctrl/Cmd
|
} else if((e.stateMask&SWT.MOD1)!=0) { //Ctrl/Cmd
|
||||||
int zoomlevel = waveformPane.getZoomLevel();
|
int zoomlevel = waveformPane.getZoomLevel();
|
||||||
@ -616,8 +571,6 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void saveState(String fileName){
|
public void saveState(String fileName){
|
||||||
|
|
||||||
|
|
||||||
Map<String, String> persistedState = new HashMap<>();
|
Map<String, String> persistedState = new HashMap<>();
|
||||||
persistedState.put(DATABASE_FILE + "S", Integer.toString(filesToLoad.size())); //$NON-NLS-1$
|
persistedState.put(DATABASE_FILE + "S", Integer.toString(filesToLoad.size())); //$NON-NLS-1$
|
||||||
Integer index = 0;
|
Integer index = 0;
|
||||||
@ -634,8 +587,6 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
|||||||
FileOutputStream out = new FileOutputStream(fileName);
|
FileOutputStream out = new FileOutputStream(fileName);
|
||||||
props.store(out, "Written by SCViewer"); //$NON-NLS-1$
|
props.store(out, "Written by SCViewer"); //$NON-NLS-1$
|
||||||
out.close();
|
out.close();
|
||||||
|
|
||||||
|
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
@ -669,12 +620,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 +641,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 ();
|
||||||
@ -931,10 +880,13 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
|||||||
Object first = selection.getFirstElement();
|
Object first = selection.getFirstElement();
|
||||||
IWaveform stream = (first instanceof ITx) ? ((ITx) first).getStream() : (IWaveform) first;
|
IWaveform stream = (first instanceof ITx) ? ((ITx) first).getStream() : (IWaveform) first;
|
||||||
TrackEntry trackEntry = waveformPane.getEntryForStream(stream);
|
TrackEntry trackEntry = waveformPane.getEntryForStream(stream);
|
||||||
int index = waveformPane.getStreamList().indexOf(trackEntry);
|
if (insert) {
|
||||||
if (!insert)
|
int index = waveformPane.getStreamList().indexOf(trackEntry);
|
||||||
index++;
|
waveformPane.getStreamList().addAll(index, streams);
|
||||||
waveformPane.getStreamList().addAll(index, streams);
|
} else {
|
||||||
|
waveformPane.getStreamList().addAll(streams);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
setFocus();
|
setFocus();
|
||||||
}
|
}
|
||||||
@ -1045,7 +997,6 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
|||||||
* Sets the zoom fit.
|
* Sets the zoom fit.
|
||||||
*/
|
*/
|
||||||
public void setZoomFit() {
|
public void setZoomFit() {
|
||||||
|
|
||||||
//actual max time of signal
|
//actual max time of signal
|
||||||
long maxTime = waveformPane.getMaxTime();
|
long maxTime = waveformPane.getMaxTime();
|
||||||
|
|
||||||
|
@ -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.2.0-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.2.0.qualifier" useFeatures="false" includeLaunchers="true">
|
||||||
|
|
||||||
<configIni use="default">
|
<configIni use="default">
|
||||||
</configIni>
|
</configIni>
|
||||||
|
Reference in New Issue
Block a user