diff --git a/.launch/Set SCViewer version.launch b/.launch/Set SCViewer version.launch
index 26dc97c..b9be61b 100644
--- a/.launch/Set SCViewer version.launch
+++ b/.launch/Set SCViewer version.launch
@@ -21,6 +21,6 @@
-
+
diff --git a/doc/com.minres.scviewer.doc/pom.xml b/doc/com.minres.scviewer.doc/pom.xml
index 3bea441..3780709 100644
--- a/doc/com.minres.scviewer.doc/pom.xml
+++ b/doc/com.minres.scviewer.doc/pom.xml
@@ -7,7 +7,7 @@
com.minres.scviewer
com.minres.scviewer.parent
- 2.18.0
+ 2.19
../..
diff --git a/features/com.minres.scviewer.database.feature/pom.xml b/features/com.minres.scviewer.database.feature/pom.xml
index dc09d82..0f23058 100644
--- a/features/com.minres.scviewer.database.feature/pom.xml
+++ b/features/com.minres.scviewer.database.feature/pom.xml
@@ -5,7 +5,7 @@
com.minres.scviewer
com.minres.scviewer.parent
- 2.18.0
+ 2.19
../..
3.0.0-SNAPSHOT
diff --git a/features/com.minres.scviewer.e4.feature/pom.xml b/features/com.minres.scviewer.e4.feature/pom.xml
index 452b73b..00d8040 100644
--- a/features/com.minres.scviewer.e4.feature/pom.xml
+++ b/features/com.minres.scviewer.e4.feature/pom.xml
@@ -5,7 +5,7 @@
com.minres.scviewer
com.minres.scviewer.parent
- 2.18.0
+ 2.19
../..
1.1.0-SNAPSHOT
diff --git a/features/com.minres.scviewer.e4.help.feature/feature.xml b/features/com.minres.scviewer.e4.help.feature/feature.xml
index ffba2a7..25ff33e 100644
--- a/features/com.minres.scviewer.e4.help.feature/feature.xml
+++ b/features/com.minres.scviewer.e4.help.feature/feature.xml
@@ -66,22 +66,6 @@
version="0.0.0"
unpack="false"/>
-
-
-
-
-
-
-
-
com.minres.scviewer
com.minres.scviewer.parent
- 2.18.0
+ 2.19
../..
1.0.0-SNAPSHOT
diff --git a/features/com.minres.scviewer.e4.platform.feature/pom.xml b/features/com.minres.scviewer.e4.platform.feature/pom.xml
index 3092643..47fa9d2 100644
--- a/features/com.minres.scviewer.e4.platform.feature/pom.xml
+++ b/features/com.minres.scviewer.e4.platform.feature/pom.xml
@@ -5,7 +5,7 @@
com.minres.scviewer
com.minres.scviewer.parent
- 2.18.0
+ 2.19
../..
1.0.0-SNAPSHOT
diff --git a/features/com.minres.scviewer.feature/pom.xml b/features/com.minres.scviewer.feature/pom.xml
index 6ea6f9c..0bb6f51 100644
--- a/features/com.minres.scviewer.feature/pom.xml
+++ b/features/com.minres.scviewer.feature/pom.xml
@@ -5,7 +5,7 @@
com.minres.scviewer
com.minres.scviewer.parent
- 2.18.0
+ 2.19
../..
1.1.0-SNAPSHOT
diff --git a/features/com.minres.scviewer.ui.feature/pom.xml b/features/com.minres.scviewer.ui.feature/pom.xml
index f00dea7..71de0b6 100644
--- a/features/com.minres.scviewer.ui.feature/pom.xml
+++ b/features/com.minres.scviewer.ui.feature/pom.xml
@@ -5,7 +5,7 @@
com.minres.scviewer
com.minres.scviewer.parent
- 2.18.0
+ 2.19
../..
1.1.0-SNAPSHOT
diff --git a/plugins/com.minres.scviewer.database.fst/pom.xml b/plugins/com.minres.scviewer.database.fst/pom.xml
index 2983471..80f83c6 100644
--- a/plugins/com.minres.scviewer.database.fst/pom.xml
+++ b/plugins/com.minres.scviewer.database.fst/pom.xml
@@ -6,7 +6,7 @@
com.minres.scviewer
com.minres.scviewer.parent
- 2.18.0
+ 2.19
../..
eclipse-plugin
diff --git a/plugins/com.minres.scviewer.database.ftr/pom.xml b/plugins/com.minres.scviewer.database.ftr/pom.xml
index b7bc540..87c46fe 100644
--- a/plugins/com.minres.scviewer.database.ftr/pom.xml
+++ b/plugins/com.minres.scviewer.database.ftr/pom.xml
@@ -6,7 +6,7 @@
com.minres.scviewer
com.minres.scviewer.parent
- 2.18.0
+ 2.19
../..
eclipse-plugin
diff --git a/plugins/com.minres.scviewer.database.sqlite/pom.xml b/plugins/com.minres.scviewer.database.sqlite/pom.xml
index 634ccfc..bcb5b1f 100644
--- a/plugins/com.minres.scviewer.database.sqlite/pom.xml
+++ b/plugins/com.minres.scviewer.database.sqlite/pom.xml
@@ -4,7 +4,7 @@
com.minres.scviewer
com.minres.scviewer.parent
- 2.18.0
+ 2.19
../..
eclipse-plugin
diff --git a/plugins/com.minres.scviewer.database.text/pom.xml b/plugins/com.minres.scviewer.database.text/pom.xml
index 0bbf210..d52951e 100644
--- a/plugins/com.minres.scviewer.database.text/pom.xml
+++ b/plugins/com.minres.scviewer.database.text/pom.xml
@@ -6,7 +6,7 @@
com.minres.scviewer
com.minres.scviewer.parent
- 2.18.0
+ 2.19
../..
eclipse-plugin
diff --git a/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TextDbLoader.java b/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TextDbLoader.java
index 18d291b..36825f5 100644
--- a/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TextDbLoader.java
+++ b/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TextDbLoader.java
@@ -246,7 +246,7 @@ public class TextDbLoader implements IWaveformDbLoader {
parser.txSink = mapDb.hashMap("transactions", Serializer.LONG, Serializer.JAVA).create();
InputStream is = new BufferedInputStream(new FileInputStream(file));
parser.parseInput(fType==FileType.GZIP ? new GZIPInputStream(is) : fType==FileType.LZ4? new FramedLZ4CompressorInputStream(is) : is);
- } catch (IllegalArgumentException | ArrayIndexOutOfBoundsException e) {
+ } catch (IllegalArgumentException | IndexOutOfBoundsException e) {
} catch (Exception e) {
throw new InputFormatException(e.toString());
} finally {
@@ -381,7 +381,7 @@ public class TextDbLoader implements IWaveformDbLoader {
if(curLine.charAt(0)=='t') {
String[] tokens = curLine.split(" ");
//if ("tx_record_attribute".equals(tokens[0]) && tokens.length>4) {
- if (curLine.charAt(5)=='c' && tokens.length>4) {
+ if (curLine.length()>5 && curLine.charAt(5)=='c' && tokens.length>4) {
Long id = Long.parseLong(tokens[1]);
String name = tokens[2].substring(1, tokens[2].length()-1);
DataType type = DataType.valueOf(tokens[3]);
diff --git a/plugins/com.minres.scviewer.database.ui.swt/pom.xml b/plugins/com.minres.scviewer.database.ui.swt/pom.xml
index d8a1455..0100182 100644
--- a/plugins/com.minres.scviewer.database.ui.swt/pom.xml
+++ b/plugins/com.minres.scviewer.database.ui.swt/pom.xml
@@ -5,7 +5,7 @@
com.minres.scviewer
com.minres.scviewer.parent
- 2.18.0
+ 2.19
../..
4.0.0-SNAPSHOT
diff --git a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/SignalPainter.java b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/SignalPainter.java
index 75da365..613d6d6 100644
--- a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/SignalPainter.java
+++ b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/SignalPainter.java
@@ -18,10 +18,12 @@ import javax.swing.JPanel;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.FontData;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.Display;
import com.minres.scviewer.database.BitVector;
import com.minres.scviewer.database.DoubleVal;
@@ -86,7 +88,7 @@ public class SignalPainter extends TrackPainter {
long ltmp = time / this.waveCanvas.getScale();
return ltmp > maxPosX ? maxPosX : (int) ltmp;
}
-
+
public void paintArea(Projection proj, Rectangle area) {
IWaveform signal = trackEntry.waveform;
if (trackEntry.selected)
@@ -99,8 +101,8 @@ public class SignalPainter extends TrackPainter {
long scaleFactor = this.waveCanvas.getScale();
long beginPos = area.x;
long beginTime = beginPos*scaleFactor;
- long endTime = beginTime + area.width*scaleFactor;
-
+ long endTime = beginTime + area.width*scaleFactor;
+
EventEntry first = signal.getEvents().floorEntry(beginTime);
if (first == null)
first = signal.getEvents().firstEntry();
@@ -118,7 +120,7 @@ public class SignalPainter extends TrackPainter {
int xSigChangeBeginVal = Math.max(area.x, (int) (left.time / this.waveCanvas.getScale()));
int xSigChangeBeginPos = area.x;
int xSigChangeEndPos = Math.max(area.x, getXPosEnd(right.time));
-
+
boolean multiple = false;
if (xSigChangeEndPos == xSigChangeBeginPos) {
// this can trigger if
@@ -135,26 +137,29 @@ public class SignalPainter extends TrackPainter {
xSigChangeEndPos = getXPosEnd(right.time);
}
-
+
SignalStencil stencil = getStencil(proj.getGC(), left, entries);
- if(stencil!=null) do {
- stencil.draw(proj, area, left.value, right.value, xSigChangeBeginPos, xSigChangeEndPos, multiple);
- if (right.time >= endTime)
- break;
- left.assign(right);
- xSigChangeBeginPos = xSigChangeEndPos;
- right.set(entries.higherEntry(left.time), endTime);
- xSigChangeEndPos = getXPosEnd(right.time);
- multiple = false;
- if (xSigChangeEndPos == xSigChangeBeginPos) {
- multiple = true;
- long eTime = (xSigChangeBeginPos + 1) * this.waveCanvas.getScale();
- EventEntry entry = entries.floorEntry(eTime);
- if(entry!=null && entry.timestamp> right.time)
- right.set(entry, endTime);
- xSigChangeEndPos = getXPosEnd(eTime);
- }
- } while (left.time < endTime);
+ if(stencil!=null) {
+ do {
+ stencil.draw(proj, area, left.value, right.value, xSigChangeBeginPos, xSigChangeEndPos, multiple);
+ if (right.time >= endTime)
+ break;
+ left.assign(right);
+ xSigChangeBeginPos = xSigChangeEndPos;
+ right.set(entries.higherEntry(left.time), endTime);
+ xSigChangeEndPos = getXPosEnd(right.time);
+ multiple = false;
+ if (xSigChangeEndPos == xSigChangeBeginPos) {
+ multiple = true;
+ long eTime = (xSigChangeBeginPos + 1) * this.waveCanvas.getScale();
+ EventEntry entry = entries.floorEntry(eTime);
+ if(entry!=null && entry.timestamp> right.time)
+ right.set(entry, endTime);
+ xSigChangeEndPos = getXPosEnd(eTime);
+ }
+ } while (left.time < endTime);
+ stencil.dispose();
+ }
}
private SignalStencil getStencil(GC gc, SignalChange left, IEventList entries) {
@@ -178,17 +183,24 @@ public class SignalPainter extends TrackPainter {
private interface SignalStencil {
public void draw(Projection proj, Rectangle area, IEvent left, IEvent right, int xBegin, int xEnd, boolean multiple);
+
+ public void dispose();
}
private class MultiBitStencil implements SignalStencil {
private java.awt.Font tmpAwtFont;
private int height;
+ private Font font;
public MultiBitStencil(GC gc) {
FontData fd = gc.getFont().getFontData()[0];
height = gc.getDevice().getDPI().y * fd.getHeight() / 72;
- tmpAwtFont = new java.awt.Font(fd.getName(), fd.getStyle(), height);
+ tmpAwtFont = new java.awt.Font(fd.getName(), fd.getStyle(), (height+1)*3/4); // determines the length of the box
+ font = new Font(Display.getCurrent(), "monospace", (height+1)/2, 0); // determines the size of the labels
+ }
+ public void dispose() {
+ font.dispose();
}
public void draw(Projection proj, Rectangle area, IEvent left, IEvent right, int xBegin, int xEnd, boolean multiple) {
@@ -241,8 +253,11 @@ public class SignalPainter extends TrackPainter {
if (width > (bb.x+1)) {
Rectangle old = proj.getClipping();
proj.setClipping(xBegin + 3, yOffsetT, xEnd - xBegin - 5, yOffsetB - yOffsetT);
+ Font old_font = proj.getGC().getFont();
+ proj.getGC().setFont(font);
proj.drawText(label+ext, xBegin + 3, yOffsetM - bb.y / 2 - 1);
proj.setClipping(old);
+ proj.getGC().setFont(old_font);
}
break;
}
@@ -288,9 +303,11 @@ public class SignalPainter extends TrackPainter {
minVal=minVal.subtract(BigInteger.ONE);
maxVal=minVal.multiply(BigInteger.valueOf(2));
}
-
+
}
+ public void dispose() { }
+
public void draw(Projection proj, Rectangle area, IEvent left, IEvent right, int xBegin, int xEnd, boolean multiple) {
BigInteger leftVal = signed?((BitVector)left).toSignedValue():((BitVector)left).toUnsignedValue();
BigInteger rightVal= signed?((BitVector)right).toSignedValue():((BitVector)right).toUnsignedValue();
@@ -320,6 +337,8 @@ public class SignalPainter extends TrackPainter {
}
private class SingleBitStencil implements SignalStencil {
+ public void dispose() { }
+
public void draw(Projection proj, Rectangle area, IEvent left, IEvent right, int xBegin, int xEnd, boolean multiple) {
if (multiple) {
proj.setForeground(waveCanvas.styleProvider.getColor(WaveformColors.SIGNALU));
@@ -372,11 +391,11 @@ public class SignalPainter extends TrackPainter {
double minVal;
double range;
-
+
final double scaleFactor = 1.05;
-
+
boolean continous=true;
-
+
public RealStencil(IEventList entries, Object left, boolean continous) {
this.continous=continous;
Collection values = entries.entrySet();
@@ -405,6 +424,8 @@ public class SignalPainter extends TrackPainter {
}
}
+ public void dispose() { }
+
public void draw(Projection proj, Rectangle area, IEvent left, IEvent right, int xBegin, int xEnd, boolean multiple) {
double leftVal = ((DoubleVal) left).value;
double rightVal= ((DoubleVal) right).value;
diff --git a/plugins/com.minres.scviewer.database.vcd/pom.xml b/plugins/com.minres.scviewer.database.vcd/pom.xml
index 30bb31d..0cbe041 100644
--- a/plugins/com.minres.scviewer.database.vcd/pom.xml
+++ b/plugins/com.minres.scviewer.database.vcd/pom.xml
@@ -5,7 +5,7 @@
com.minres.scviewer
com.minres.scviewer.parent
- 2.18.0
+ 2.19
../..
eclipse-plugin
diff --git a/plugins/com.minres.scviewer.database/pom.xml b/plugins/com.minres.scviewer.database/pom.xml
index 893dd6c..da0b9b2 100644
--- a/plugins/com.minres.scviewer.database/pom.xml
+++ b/plugins/com.minres.scviewer.database/pom.xml
@@ -4,7 +4,7 @@
com.minres.scviewer
com.minres.scviewer.parent
- 2.18.0
+ 2.19
../..
eclipse-plugin
diff --git a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/BitVector.java b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/BitVector.java
index 8ce6da3..30474c6 100644
--- a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/BitVector.java
+++ b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/BitVector.java
@@ -168,8 +168,9 @@ public class BitVector implements IEvent {
}
}
}
- if(res[i]==0)
- res[i] = Character.forDigit(digit, 16); // ((digit < 10) ? '0' + digit : 'a' + digit -10)
+ if(res[i]==0) {
+ res[i] = (digit < 10) ? (char)('0' + digit) : (char)('A' - 10 + digit);
+ }
start_idx=3;
}
int idx=0;
diff --git a/plugins/com.minres.scviewer.e4.application.help/META-INF/MANIFEST.MF b/plugins/com.minres.scviewer.e4.application.help/META-INF/MANIFEST.MF
index dfc1c94..6607d03 100644
--- a/plugins/com.minres.scviewer.e4.application.help/META-INF/MANIFEST.MF
+++ b/plugins/com.minres.scviewer.e4.application.help/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: SCViewer Help
Bundle-SymbolicName: com.minres.scviewer.e4.application.help;singleton:=true
-Bundle-Version: 2.18.0
+Bundle-Version: 2.19
Bundle-Vendor: MINRES Technologies GmbH
Automatic-Module-Name: com.minres.scviewer.e4.application.help
Bundle-RequiredExecutionEnvironment: JavaSE-11
diff --git a/plugins/com.minres.scviewer.e4.application.help/plugin.xml b/plugins/com.minres.scviewer.e4.application.help/plugin.xml
index b511998..78b73bf 100644
--- a/plugins/com.minres.scviewer.e4.application.help/plugin.xml
+++ b/plugins/com.minres.scviewer.e4.application.help/plugin.xml
@@ -1,5 +1,5 @@
-
+
diff --git a/plugins/com.minres.scviewer.e4.application.help/pom.xml b/plugins/com.minres.scviewer.e4.application.help/pom.xml
index 038bc5c..a0fc69c 100644
--- a/plugins/com.minres.scviewer.e4.application.help/pom.xml
+++ b/plugins/com.minres.scviewer.e4.application.help/pom.xml
@@ -6,7 +6,7 @@
com.minres.scviewer
com.minres.scviewer.parent
- 2.18.0
+ 2.19
../..
eclipse-plugin
diff --git a/plugins/com.minres.scviewer.e4.application/META-INF/MANIFEST.MF b/plugins/com.minres.scviewer.e4.application/META-INF/MANIFEST.MF
index 7511eea..506f60b 100644
--- a/plugins/com.minres.scviewer.e4.application/META-INF/MANIFEST.MF
+++ b/plugins/com.minres.scviewer.e4.application/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: com.minres.scviewer.e4.application;singleton:=true
-Bundle-Version: 2.18.0
+Bundle-Version: 2.19
Bundle-Vendor: %Bundle-Vendor
Require-Bundle: javax.inject;bundle-version="1.0.0",
org.eclipse.core.runtime;bundle-version="3.11.1",
diff --git a/plugins/com.minres.scviewer.e4.application/pom.xml b/plugins/com.minres.scviewer.e4.application/pom.xml
index 4ca0fa0..33127cf 100644
--- a/plugins/com.minres.scviewer.e4.application/pom.xml
+++ b/plugins/com.minres.scviewer.e4.application/pom.xml
@@ -6,7 +6,7 @@
com.minres.scviewer
com.minres.scviewer.parent
- 2.18.0
+ 2.19
../..
eclipse-plugin
diff --git a/plugins/com.minres.scviewer.ui/pom.xml b/plugins/com.minres.scviewer.ui/pom.xml
index 2cc9b7c..5944ab4 100644
--- a/plugins/com.minres.scviewer.ui/pom.xml
+++ b/plugins/com.minres.scviewer.ui/pom.xml
@@ -4,7 +4,7 @@
com.minres.scviewer
com.minres.scviewer.parent
- 2.18.0
+ 2.19
../..
eclipse-plugin
diff --git a/pom.xml b/pom.xml
index 152fd90..c096b4d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
4.0.0
com.minres.scviewer
com.minres.scviewer.parent
- 2.18.0
+ 2.19
pom
releng/com.minres.scviewer.target
@@ -71,7 +71,7 @@
com.minres.scviewer
com.minres.scviewer.target
- 2.18.0
+ 2.19
diff --git a/products/com.minres.scviewer.e4.product/pom.xml b/products/com.minres.scviewer.e4.product/pom.xml
index dcd1165..da0e371 100644
--- a/products/com.minres.scviewer.e4.product/pom.xml
+++ b/products/com.minres.scviewer.e4.product/pom.xml
@@ -6,11 +6,11 @@
com.minres.scviewer
com.minres.scviewer.parent
- 2.18.0
+ 2.19
../..
com.minres.scviewer.e4.product
- 2.18.0
+ 2.19
eclipse-repository
com.minres.scviewer
diff --git a/products/com.minres.scviewer.e4.product/scviewer.product b/products/com.minres.scviewer.e4.product/scviewer.product
index 500d276..2b39fbc 100644
--- a/products/com.minres.scviewer.e4.product/scviewer.product
+++ b/products/com.minres.scviewer.e4.product/scviewer.product
@@ -1,7 +1,7 @@
-
+
@@ -53,7 +53,6 @@
-
@@ -64,6 +63,7 @@
+
diff --git a/releng/com.minres.scviewer.target/com.minres.scviewer.target.target b/releng/com.minres.scviewer.target/com.minres.scviewer.target.target
index c97669c..a8e4b18 100644
--- a/releng/com.minres.scviewer.target/com.minres.scviewer.target.target
+++ b/releng/com.minres.scviewer.target/com.minres.scviewer.target.target
@@ -3,7 +3,7 @@
-
+
@@ -11,12 +11,12 @@
-
+
-
+
diff --git a/releng/com.minres.scviewer.target/pom.xml b/releng/com.minres.scviewer.target/pom.xml
index 01dc9f2..f2058bf 100644
--- a/releng/com.minres.scviewer.target/pom.xml
+++ b/releng/com.minres.scviewer.target/pom.xml
@@ -12,7 +12,7 @@
com.minres.scviewer
com.minres.scviewer.parent
- 2.18.0
+ 2.19
../..
diff --git a/releng/com.minres.scviewer.updateSite/pom.xml b/releng/com.minres.scviewer.updateSite/pom.xml
index 2b757f5..934b75a 100644
--- a/releng/com.minres.scviewer.updateSite/pom.xml
+++ b/releng/com.minres.scviewer.updateSite/pom.xml
@@ -7,7 +7,7 @@
com.minres.scviewer
com.minres.scviewer.parent
- 2.18.0
+ 2.19
../..
diff --git a/tests/com.minres.scviewer.database.test/pom.xml b/tests/com.minres.scviewer.database.test/pom.xml
index 76eeb0e..0b6f026 100644
--- a/tests/com.minres.scviewer.database.test/pom.xml
+++ b/tests/com.minres.scviewer.database.test/pom.xml
@@ -6,7 +6,7 @@
com.minres.scviewer
com.minres.scviewer.parent
- 2.18.0
+ 2.19
../..
eclipse-test-plugin