Compare commits
17 Commits
Author | SHA1 | Date | |
---|---|---|---|
7af8b73bdd | |||
61bc407fb3 | |||
f6a3da013e | |||
c4fafae029 | |||
819e549d87 | |||
e472a092c3 | |||
523c266e8d | |||
db640808f2 | |||
09a55f1513 | |||
088500afff | |||
917a51ced7 | |||
c27354070c | |||
9ca573efdb | |||
299c10363a | |||
36fdc68051 | |||
53576f5e1b | |||
abb8b45cd8 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -10,3 +10,4 @@ copyrightLog.txt
|
|||||||
/workspace
|
/workspace
|
||||||
?*.launch
|
?*.launch
|
||||||
/.settings/
|
/.settings/
|
||||||
|
.tycho-consumer-pom.xml
|
@ -21,6 +21,6 @@
|
|||||||
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_SHOW_CODEDETAILS_IN_EXCEPTION_MESSAGES" value="true"/>
|
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_SHOW_CODEDETAILS_IN_EXCEPTION_MESSAGES" value="true"/>
|
||||||
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_CLASSPATH_ONLY_JAR" value="false"/>
|
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_CLASSPATH_ONLY_JAR" value="false"/>
|
||||||
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
|
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
|
||||||
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11/"/>
|
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17/"/>
|
||||||
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${project_loc:com.minres.scviewer.parent}"/>
|
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${project_loc:com.minres.scviewer.parent}"/>
|
||||||
</launchConfiguration>
|
</launchConfiguration>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.minres.scviewer</groupId>
|
<groupId>com.minres.scviewer</groupId>
|
||||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||||
<version>2.18.0</version>
|
<version>2.19.3</version>
|
||||||
<relativePath>../..</relativePath>
|
<relativePath>../..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.minres.scviewer</groupId>
|
<groupId>com.minres.scviewer</groupId>
|
||||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||||
<version>2.18.0</version>
|
<version>2.19.3</version>
|
||||||
<relativePath>../..</relativePath>
|
<relativePath>../..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<version>3.0.0-SNAPSHOT</version>
|
<version>3.0.0-SNAPSHOT</version>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.minres.scviewer</groupId>
|
<groupId>com.minres.scviewer</groupId>
|
||||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||||
<version>2.18.0</version>
|
<version>2.19.3</version>
|
||||||
<relativePath>../..</relativePath>
|
<relativePath>../..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<version>1.1.0-SNAPSHOT</version>
|
<version>1.1.0-SNAPSHOT</version>
|
||||||
|
@ -66,22 +66,6 @@
|
|||||||
version="0.0.0"
|
version="0.0.0"
|
||||||
unpack="false"/>
|
unpack="false"/>
|
||||||
|
|
||||||
<plugin
|
|
||||||
id="org.eclipse.equinox.security"
|
|
||||||
download-size="0"
|
|
||||||
install-size="0"
|
|
||||||
version="0.0.0"
|
|
||||||
unpack="false"/>
|
|
||||||
|
|
||||||
<plugin
|
|
||||||
id="org.eclipse.equinox.security.linux.x86_64"
|
|
||||||
os="linux"
|
|
||||||
arch="x86_64"
|
|
||||||
download-size="0"
|
|
||||||
install-size="0"
|
|
||||||
version="0.0.0"
|
|
||||||
fragment="true"/>
|
|
||||||
|
|
||||||
<plugin
|
<plugin
|
||||||
id="javax.el"
|
id="javax.el"
|
||||||
download-size="0"
|
download-size="0"
|
||||||
@ -89,20 +73,6 @@
|
|||||||
version="0.0.0"
|
version="0.0.0"
|
||||||
unpack="false"/>
|
unpack="false"/>
|
||||||
|
|
||||||
<plugin
|
|
||||||
id="javax.servlet"
|
|
||||||
download-size="0"
|
|
||||||
install-size="0"
|
|
||||||
version="0.0.0"
|
|
||||||
unpack="false"/>
|
|
||||||
|
|
||||||
<plugin
|
|
||||||
id="javax.servlet.jsp"
|
|
||||||
download-size="0"
|
|
||||||
install-size="0"
|
|
||||||
version="0.0.0"
|
|
||||||
unpack="false"/>
|
|
||||||
|
|
||||||
<plugin
|
<plugin
|
||||||
id="org.eclipse.equinox.http.jetty"
|
id="org.eclipse.equinox.http.jetty"
|
||||||
download-size="0"
|
download-size="0"
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.minres.scviewer</groupId>
|
<groupId>com.minres.scviewer</groupId>
|
||||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||||
<version>2.18.0</version>
|
<version>2.19.3</version>
|
||||||
<relativePath>../..</relativePath>
|
<relativePath>../..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<version>1.0.0-SNAPSHOT</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.minres.scviewer</groupId>
|
<groupId>com.minres.scviewer</groupId>
|
||||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||||
<version>2.18.0</version>
|
<version>2.19.3</version>
|
||||||
<relativePath>../..</relativePath>
|
<relativePath>../..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<version>1.0.0-SNAPSHOT</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.minres.scviewer</groupId>
|
<groupId>com.minres.scviewer</groupId>
|
||||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||||
<version>2.18.0</version>
|
<version>2.19.3</version>
|
||||||
<relativePath>../..</relativePath>
|
<relativePath>../..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<version>1.1.0-SNAPSHOT</version>
|
<version>1.1.0-SNAPSHOT</version>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.minres.scviewer</groupId>
|
<groupId>com.minres.scviewer</groupId>
|
||||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||||
<version>2.18.0</version>
|
<version>2.19.3</version>
|
||||||
<relativePath>../..</relativePath>
|
<relativePath>../..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<version>1.1.0-SNAPSHOT</version>
|
<version>1.1.0-SNAPSHOT</version>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.minres.scviewer</groupId>
|
<groupId>com.minres.scviewer</groupId>
|
||||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||||
<version>2.18.0</version>
|
<version>2.19.3</version>
|
||||||
<relativePath>../..</relativePath>
|
<relativePath>../..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<packaging>eclipse-plugin</packaging>
|
<packaging>eclipse-plugin</packaging>
|
||||||
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
|||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: CBOR transaction database
|
Bundle-Name: CBOR transaction database
|
||||||
Bundle-SymbolicName: com.minres.scviewer.database.ftr
|
Bundle-SymbolicName: com.minres.scviewer.database.ftr
|
||||||
Bundle-Version: 1.0.0.qualifier
|
Bundle-Version: 1.0.2.qualifier
|
||||||
Bundle-Vendor: MINRES Technologies GmbH
|
Bundle-Vendor: MINRES Technologies GmbH
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
||||||
Import-Package: org.osgi.framework;version="1.3.0",
|
Import-Package: org.osgi.framework;version="1.3.0",
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
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.ftr</artifactId>
|
<artifactId>com.minres.scviewer.database.ftr</artifactId>
|
||||||
<version>1.0.0-SNAPSHOT</version>
|
<version>1.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>
|
||||||
<version>2.18.0</version>
|
<version>2.19.3</version>
|
||||||
<relativePath>../..</relativePath>
|
<relativePath>../..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<packaging>eclipse-plugin</packaging>
|
<packaging>eclipse-plugin</packaging>
|
||||||
|
@ -178,7 +178,6 @@ public class FtrDbLoader implements IWaveformDbLoader {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void load(File file) throws InputFormatException {
|
public void load(File file) throws InputFormatException {
|
||||||
dispose();
|
|
||||||
this.file=file;
|
this.file=file;
|
||||||
try {
|
try {
|
||||||
fis = new FileInputStream(file);
|
fis = new FileInputStream(file);
|
||||||
@ -298,10 +297,10 @@ public class FtrDbLoader implements IWaveformDbLoader {
|
|||||||
case 6: // id/generator/start/end
|
case 6: // id/generator/start/end
|
||||||
long len = cborDecoder.readArrayLength();
|
long len = cborDecoder.readArrayLength();
|
||||||
assert(len==4);
|
assert(len==4);
|
||||||
cborDecoder.readInt();
|
cborDecoder.readInt(); //txid
|
||||||
cborDecoder.readInt();
|
cborDecoder.readInt(); // genId
|
||||||
cborDecoder.readInt();
|
cborDecoder.readInt(); // startTime
|
||||||
cborDecoder.readInt();
|
cborDecoder.readInt(); // endTime
|
||||||
break;
|
break;
|
||||||
default: { // skip over 7:begin attr, 8:record attr, 9:end attr
|
default: { // skip over 7:begin attr, 8:record attr, 9:end attr
|
||||||
long sz = cborDecoder.readArrayLength();
|
long sz = cborDecoder.readArrayLength();
|
||||||
|
@ -77,8 +77,8 @@ class FtrTx implements Serializable {
|
|||||||
public List<ITxAttribute> getAttributes(FtrDbLoader loader) {
|
public List<ITxAttribute> getAttributes(FtrDbLoader loader) {
|
||||||
if(attributes.size()==0)
|
if(attributes.size()==0)
|
||||||
try {
|
try {
|
||||||
TxStream stream = loader.txStreams.get(streamId);
|
final TxStream stream = loader.txStreams.get(streamId);
|
||||||
byte[] chunk = stream.getChunks().get((int)blockId);
|
final byte[] chunk = stream.getChunks().get((int)blockId);
|
||||||
attributes.addAll(loader.parseAtrributes(chunk, blockOffset));
|
attributes.addAll(loader.parseAtrributes(chunk, blockOffset));
|
||||||
} catch (InputFormatException e) {
|
} catch (InputFormatException e) {
|
||||||
// TODO Auto-generated catch block
|
// TODO Auto-generated catch block
|
||||||
|
@ -70,7 +70,7 @@ class TxGenerator extends AbstractTxStream {
|
|||||||
List<byte[]> chunks = stream.getChunks();
|
List<byte[]> chunks = stream.getChunks();
|
||||||
int blockid = 0;
|
int blockid = 0;
|
||||||
for (byte[] bs : chunks) {
|
for (byte[] bs : chunks) {
|
||||||
loader.parseTx(stream, blockid, bs);
|
loader.parseTx(stream, blockid++, bs);
|
||||||
}
|
}
|
||||||
} catch (InputFormatException e) {
|
} catch (InputFormatException e) {
|
||||||
// TODO Auto-generated catch block
|
// TODO Auto-generated catch block
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.minres.scviewer</groupId>
|
<groupId>com.minres.scviewer</groupId>
|
||||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||||
<version>2.18.0</version>
|
<version>2.19.3</version>
|
||||||
<relativePath>../..</relativePath>
|
<relativePath>../..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<packaging>eclipse-plugin</packaging>
|
<packaging>eclipse-plugin</packaging>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.minres.scviewer</groupId>
|
<groupId>com.minres.scviewer</groupId>
|
||||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||||
<version>2.18.0</version>
|
<version>2.19.3</version>
|
||||||
<relativePath>../..</relativePath>
|
<relativePath>../..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<packaging>eclipse-plugin</packaging>
|
<packaging>eclipse-plugin</packaging>
|
||||||
|
@ -246,7 +246,7 @@ public class TextDbLoader implements IWaveformDbLoader {
|
|||||||
parser.txSink = mapDb.hashMap("transactions", Serializer.LONG, Serializer.JAVA).create();
|
parser.txSink = mapDb.hashMap("transactions", Serializer.LONG, Serializer.JAVA).create();
|
||||||
InputStream is = new BufferedInputStream(new FileInputStream(file));
|
InputStream is = new BufferedInputStream(new FileInputStream(file));
|
||||||
parser.parseInput(fType==FileType.GZIP ? new GZIPInputStream(is) : fType==FileType.LZ4? new FramedLZ4CompressorInputStream(is) : is);
|
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) {
|
} catch (Exception e) {
|
||||||
throw new InputFormatException(e.toString());
|
throw new InputFormatException(e.toString());
|
||||||
} finally {
|
} finally {
|
||||||
@ -381,7 +381,7 @@ public class TextDbLoader implements IWaveformDbLoader {
|
|||||||
if(curLine.charAt(0)=='t') {
|
if(curLine.charAt(0)=='t') {
|
||||||
String[] tokens = curLine.split(" ");
|
String[] tokens = curLine.split(" ");
|
||||||
//if ("tx_record_attribute".equals(tokens[0]) && tokens.length>4) {
|
//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]);
|
Long id = Long.parseLong(tokens[1]);
|
||||||
String name = tokens[2].substring(1, tokens[2].length()-1);
|
String name = tokens[2].substring(1, tokens[2].length()-1);
|
||||||
DataType type = DataType.valueOf(tokens[3]);
|
DataType type = DataType.valueOf(tokens[3]);
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.minres.scviewer</groupId>
|
<groupId>com.minres.scviewer</groupId>
|
||||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||||
<version>2.18.0</version>
|
<version>2.19.3</version>
|
||||||
<relativePath>../..</relativePath>
|
<relativePath>../..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<version>4.0.0-SNAPSHOT</version>
|
<version>4.0.0-SNAPSHOT</version>
|
||||||
|
@ -84,7 +84,10 @@ public class ArrowPainter implements IPainter {
|
|||||||
private int getConcurrencyIndex(ITx tx) {
|
private int getConcurrencyIndex(ITx tx) {
|
||||||
IEvent[] eventList = tx.getStream().getEventsBeforeTime(tx.getBeginTime());
|
IEvent[] eventList = tx.getStream().getEventsBeforeTime(tx.getBeginTime());
|
||||||
Optional<Integer> res = Arrays.stream(eventList).map(e -> ((ITxEvent)e).getRowIndex()).findFirst();
|
Optional<Integer> res = Arrays.stream(eventList).map(e -> ((ITxEvent)e).getRowIndex()).findFirst();
|
||||||
return res.isPresent()? res.get():0;
|
if(res.isPresent() && res.get()>0) {
|
||||||
|
return res.get();
|
||||||
|
} else
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean calculateGeometries() {
|
protected boolean calculateGeometries() {
|
||||||
@ -98,8 +101,10 @@ public class ArrowPainter implements IPainter {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
int laneHeight = painter.getHeight() / tx.getStream().getRowCount();
|
int laneHeight = painter.getHeight() / tx.getStream().getRowCount();
|
||||||
|
int laneOffset = laneHeight * getConcurrencyIndex(tx);
|
||||||
|
int rulerHeight = waveCanvas.rulerHeight;
|
||||||
txRectangle = new Rectangle((int) (tx.getBeginTime() / scaleFactor),
|
txRectangle = new Rectangle((int) (tx.getBeginTime() / scaleFactor),
|
||||||
waveCanvas.rulerHeight + painter.getVerticalOffset() + laneHeight * getConcurrencyIndex(tx),
|
rulerHeight + painter.getVerticalOffset() + laneOffset,
|
||||||
(int) ((tx.getEndTime() - tx.getBeginTime()) / scaleFactor), laneHeight);
|
(int) ((tx.getEndTime() - tx.getBeginTime()) / scaleFactor), laneHeight);
|
||||||
deriveGeom(tx.getIncomingRelations(), iRect, false);
|
deriveGeom(tx.getIncomingRelations(), iRect, false);
|
||||||
deriveGeom(tx.getOutgoingRelations(), oRect, true);
|
deriveGeom(tx.getOutgoingRelations(), oRect, true);
|
||||||
@ -114,12 +119,13 @@ public class ArrowPainter implements IPainter {
|
|||||||
if (waveCanvas.wave2painterMap.containsKey(iWaveform)) {
|
if (waveCanvas.wave2painterMap.containsKey(iWaveform)) {
|
||||||
IWaveformPainter painter = waveCanvas.wave2painterMap.get(iWaveform);
|
IWaveformPainter painter = waveCanvas.wave2painterMap.get(iWaveform);
|
||||||
if(painter!=null) {
|
if(painter!=null) {
|
||||||
int height = waveCanvas.styleProvider.getTrackHeight();
|
int laneHeight = waveCanvas.styleProvider.getTrackHeight();
|
||||||
|
int laneOffset = laneHeight * getConcurrencyIndex(tx);
|
||||||
Rectangle bb = new Rectangle(
|
Rectangle bb = new Rectangle(
|
||||||
(int) (otherTx.getBeginTime() / scaleFactor),
|
(int) (otherTx.getBeginTime() / scaleFactor),
|
||||||
waveCanvas.rulerHeight + painter.getVerticalOffset() + height * getConcurrencyIndex(otherTx),
|
waveCanvas.rulerHeight + painter.getVerticalOffset() + laneOffset,
|
||||||
(int) ((otherTx.getEndTime() - otherTx.getBeginTime()) / scaleFactor),
|
(int) ((otherTx.getEndTime() - otherTx.getBeginTime()) / scaleFactor),
|
||||||
height);
|
laneHeight);
|
||||||
res.add(new LinkEntry(bb, iTxRelation.getRelationType()));
|
res.add(new LinkEntry(bb, iTxRelation.getRelationType()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,10 +18,12 @@ import javax.swing.JPanel;
|
|||||||
|
|
||||||
import org.eclipse.swt.SWT;
|
import org.eclipse.swt.SWT;
|
||||||
import org.eclipse.swt.graphics.Color;
|
import org.eclipse.swt.graphics.Color;
|
||||||
|
import org.eclipse.swt.graphics.Font;
|
||||||
import org.eclipse.swt.graphics.FontData;
|
import org.eclipse.swt.graphics.FontData;
|
||||||
import org.eclipse.swt.graphics.GC;
|
import org.eclipse.swt.graphics.GC;
|
||||||
import org.eclipse.swt.graphics.Point;
|
import org.eclipse.swt.graphics.Point;
|
||||||
import org.eclipse.swt.graphics.Rectangle;
|
import org.eclipse.swt.graphics.Rectangle;
|
||||||
|
import org.eclipse.swt.widgets.Display;
|
||||||
|
|
||||||
import com.minres.scviewer.database.BitVector;
|
import com.minres.scviewer.database.BitVector;
|
||||||
import com.minres.scviewer.database.DoubleVal;
|
import com.minres.scviewer.database.DoubleVal;
|
||||||
@ -86,7 +88,7 @@ public class SignalPainter extends TrackPainter {
|
|||||||
long ltmp = time / this.waveCanvas.getScale();
|
long ltmp = time / this.waveCanvas.getScale();
|
||||||
return ltmp > maxPosX ? maxPosX : (int) ltmp;
|
return ltmp > maxPosX ? maxPosX : (int) ltmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void paintArea(Projection proj, Rectangle area) {
|
public void paintArea(Projection proj, Rectangle area) {
|
||||||
IWaveform signal = trackEntry.waveform;
|
IWaveform signal = trackEntry.waveform;
|
||||||
if (trackEntry.selected)
|
if (trackEntry.selected)
|
||||||
@ -99,8 +101,8 @@ public class SignalPainter extends TrackPainter {
|
|||||||
long scaleFactor = this.waveCanvas.getScale();
|
long scaleFactor = this.waveCanvas.getScale();
|
||||||
long beginPos = area.x;
|
long beginPos = area.x;
|
||||||
long beginTime = beginPos*scaleFactor;
|
long beginTime = beginPos*scaleFactor;
|
||||||
long endTime = beginTime + area.width*scaleFactor;
|
long endTime = beginTime + area.width*scaleFactor;
|
||||||
|
|
||||||
EventEntry first = signal.getEvents().floorEntry(beginTime);
|
EventEntry first = signal.getEvents().floorEntry(beginTime);
|
||||||
if (first == null)
|
if (first == null)
|
||||||
first = signal.getEvents().firstEntry();
|
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 xSigChangeBeginVal = Math.max(area.x, (int) (left.time / this.waveCanvas.getScale()));
|
||||||
int xSigChangeBeginPos = area.x;
|
int xSigChangeBeginPos = area.x;
|
||||||
int xSigChangeEndPos = Math.max(area.x, getXPosEnd(right.time));
|
int xSigChangeEndPos = Math.max(area.x, getXPosEnd(right.time));
|
||||||
|
|
||||||
boolean multiple = false;
|
boolean multiple = false;
|
||||||
if (xSigChangeEndPos == xSigChangeBeginPos) {
|
if (xSigChangeEndPos == xSigChangeBeginPos) {
|
||||||
// this can trigger if
|
// this can trigger if
|
||||||
@ -135,26 +137,29 @@ public class SignalPainter extends TrackPainter {
|
|||||||
xSigChangeEndPos = getXPosEnd(right.time);
|
xSigChangeEndPos = getXPosEnd(right.time);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SignalStencil stencil = getStencil(proj.getGC(), left, entries);
|
SignalStencil stencil = getStencil(proj.getGC(), left, entries);
|
||||||
if(stencil!=null) do {
|
if(stencil!=null) {
|
||||||
stencil.draw(proj, area, left.value, right.value, xSigChangeBeginPos, xSigChangeEndPos, multiple);
|
do {
|
||||||
if (right.time >= endTime)
|
stencil.draw(proj, area, left.value, right.value, xSigChangeBeginPos, xSigChangeEndPos, multiple);
|
||||||
break;
|
if (right.time >= endTime)
|
||||||
left.assign(right);
|
break;
|
||||||
xSigChangeBeginPos = xSigChangeEndPos;
|
left.assign(right);
|
||||||
right.set(entries.higherEntry(left.time), endTime);
|
xSigChangeBeginPos = xSigChangeEndPos;
|
||||||
xSigChangeEndPos = getXPosEnd(right.time);
|
right.set(entries.higherEntry(left.time), endTime);
|
||||||
multiple = false;
|
xSigChangeEndPos = getXPosEnd(right.time);
|
||||||
if (xSigChangeEndPos == xSigChangeBeginPos) {
|
multiple = false;
|
||||||
multiple = true;
|
if (xSigChangeEndPos == xSigChangeBeginPos) {
|
||||||
long eTime = (xSigChangeBeginPos + 1) * this.waveCanvas.getScale();
|
multiple = true;
|
||||||
EventEntry entry = entries.floorEntry(eTime);
|
long eTime = (xSigChangeBeginPos + 1) * this.waveCanvas.getScale();
|
||||||
if(entry!=null && entry.timestamp> right.time)
|
EventEntry entry = entries.floorEntry(eTime);
|
||||||
right.set(entry, endTime);
|
if(entry!=null && entry.timestamp> right.time)
|
||||||
xSigChangeEndPos = getXPosEnd(eTime);
|
right.set(entry, endTime);
|
||||||
}
|
xSigChangeEndPos = getXPosEnd(eTime);
|
||||||
} while (left.time < endTime);
|
}
|
||||||
|
} while (left.time < endTime);
|
||||||
|
stencil.dispose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private SignalStencil getStencil(GC gc, SignalChange left, IEventList entries) {
|
private SignalStencil getStencil(GC gc, SignalChange left, IEventList entries) {
|
||||||
@ -178,17 +183,24 @@ public class SignalPainter extends TrackPainter {
|
|||||||
private interface SignalStencil {
|
private interface SignalStencil {
|
||||||
|
|
||||||
public void draw(Projection proj, Rectangle area, IEvent left, IEvent right, int xBegin, int xEnd, boolean multiple);
|
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 class MultiBitStencil implements SignalStencil {
|
||||||
|
|
||||||
private java.awt.Font tmpAwtFont;
|
private java.awt.Font tmpAwtFont;
|
||||||
private int height;
|
private int height;
|
||||||
|
private Font font;
|
||||||
|
|
||||||
public MultiBitStencil(GC gc) {
|
public MultiBitStencil(GC gc) {
|
||||||
FontData fd = gc.getFont().getFontData()[0];
|
FontData fd = gc.getFont().getFontData()[0];
|
||||||
height = gc.getDevice().getDPI().y * fd.getHeight() / 72;
|
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) {
|
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)) {
|
if (width > (bb.x+1)) {
|
||||||
Rectangle old = proj.getClipping();
|
Rectangle old = proj.getClipping();
|
||||||
proj.setClipping(xBegin + 3, yOffsetT, xEnd - xBegin - 5, yOffsetB - yOffsetT);
|
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.drawText(label+ext, xBegin + 3, yOffsetM - bb.y / 2 - 1);
|
||||||
proj.setClipping(old);
|
proj.setClipping(old);
|
||||||
|
proj.getGC().setFont(old_font);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -288,9 +303,11 @@ public class SignalPainter extends TrackPainter {
|
|||||||
minVal=minVal.subtract(BigInteger.ONE);
|
minVal=minVal.subtract(BigInteger.ONE);
|
||||||
maxVal=minVal.multiply(BigInteger.valueOf(2));
|
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) {
|
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 leftVal = signed?((BitVector)left).toSignedValue():((BitVector)left).toUnsignedValue();
|
||||||
BigInteger rightVal= signed?((BitVector)right).toSignedValue():((BitVector)right).toUnsignedValue();
|
BigInteger rightVal= signed?((BitVector)right).toSignedValue():((BitVector)right).toUnsignedValue();
|
||||||
@ -320,6 +337,8 @@ public class SignalPainter extends TrackPainter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private class SingleBitStencil implements SignalStencil {
|
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) {
|
public void draw(Projection proj, Rectangle area, IEvent left, IEvent right, int xBegin, int xEnd, boolean multiple) {
|
||||||
if (multiple) {
|
if (multiple) {
|
||||||
proj.setForeground(waveCanvas.styleProvider.getColor(WaveformColors.SIGNALU));
|
proj.setForeground(waveCanvas.styleProvider.getColor(WaveformColors.SIGNALU));
|
||||||
@ -372,11 +391,11 @@ public class SignalPainter extends TrackPainter {
|
|||||||
|
|
||||||
double minVal;
|
double minVal;
|
||||||
double range;
|
double range;
|
||||||
|
|
||||||
final double scaleFactor = 1.05;
|
final double scaleFactor = 1.05;
|
||||||
|
|
||||||
boolean continous=true;
|
boolean continous=true;
|
||||||
|
|
||||||
public RealStencil(IEventList entries, Object left, boolean continous) {
|
public RealStencil(IEventList entries, Object left, boolean continous) {
|
||||||
this.continous=continous;
|
this.continous=continous;
|
||||||
Collection<EventEntry> values = entries.entrySet();
|
Collection<EventEntry> 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) {
|
public void draw(Projection proj, Rectangle area, IEvent left, IEvent right, int xBegin, int xEnd, boolean multiple) {
|
||||||
double leftVal = ((DoubleVal) left).value;
|
double leftVal = ((DoubleVal) left).value;
|
||||||
double rightVal= ((DoubleVal) right).value;
|
double rightVal= ((DoubleVal) right).value;
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.minres.scviewer</groupId>
|
<groupId>com.minres.scviewer</groupId>
|
||||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||||
<version>2.18.0</version>
|
<version>2.19.3</version>
|
||||||
<relativePath>../..</relativePath>
|
<relativePath>../..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<packaging>eclipse-plugin</packaging>
|
<packaging>eclipse-plugin</packaging>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.minres.scviewer</groupId>
|
<groupId>com.minres.scviewer</groupId>
|
||||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||||
<version>2.18.0</version>
|
<version>2.19.3</version>
|
||||||
<relativePath>../..</relativePath>
|
<relativePath>../..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<packaging>eclipse-plugin</packaging>
|
<packaging>eclipse-plugin</packaging>
|
||||||
|
@ -168,8 +168,9 @@ public class BitVector implements IEvent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(res[i]==0)
|
if(res[i]==0) {
|
||||||
res[i] = Character.forDigit(digit, 16); // ((digit < 10) ? '0' + digit : 'a' + digit -10)
|
res[i] = (digit < 10) ? (char)('0' + digit) : (char)('A' - 10 + digit);
|
||||||
|
}
|
||||||
start_idx=3;
|
start_idx=3;
|
||||||
}
|
}
|
||||||
int idx=0;
|
int idx=0;
|
||||||
|
@ -15,10 +15,10 @@ import java.beans.PropertyChangeListener;
|
|||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
@ -44,13 +44,13 @@ public class WaveformDb extends HierNode implements IWaveformDb, PropertyChangeL
|
|||||||
private boolean loaded;
|
private boolean loaded;
|
||||||
|
|
||||||
/** The relation types. */
|
/** The relation types. */
|
||||||
private List<RelationType> relationTypes;
|
private List<RelationType> relationTypes = new ArrayList<>();;
|
||||||
|
|
||||||
/** The waveforms. */
|
/** The waveforms. */
|
||||||
private Map<String, IWaveform> waveforms;
|
private Map<String, IWaveform> waveforms = Collections.synchronizedMap(new HashMap<>()) ;;
|
||||||
|
|
||||||
/** The max time. */
|
/** The max time. */
|
||||||
private long maxTime = -1;
|
private long maxTime = 0L;
|
||||||
|
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(WaveformDb.class);
|
private static final Logger LOG = LoggerFactory.getLogger(WaveformDb.class);
|
||||||
|
|
||||||
@ -81,16 +81,6 @@ public class WaveformDb extends HierNode implements IWaveformDb, PropertyChangeL
|
|||||||
return Collections.unmodifiableList(loaderFactories);
|
return Collections.unmodifiableList(loaderFactories);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Instantiates a new waveform db.
|
|
||||||
*/
|
|
||||||
public WaveformDb() {
|
|
||||||
super();
|
|
||||||
waveforms = new ConcurrentHashMap<>();
|
|
||||||
relationTypes = new ArrayList<>();
|
|
||||||
maxTime = 0L;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the max time.
|
* Gets the max time.
|
||||||
*
|
*
|
||||||
@ -143,15 +133,15 @@ public class WaveformDb extends HierNode implements IWaveformDb, PropertyChangeL
|
|||||||
retval=false;
|
retval=false;
|
||||||
}
|
}
|
||||||
loader.removePropertyChangeListener(this);
|
loader.removePropertyChangeListener(this);
|
||||||
for (IWaveform w : loader.getAllWaves()) {
|
// for (IWaveform w : loader.getAllWaves()) {
|
||||||
waveforms.put(w.getFullName(), w);
|
// waveforms.put(w.getFullName(), w);
|
||||||
}
|
// }
|
||||||
if (loader.getMaxTime() > maxTime) {
|
if (loader.getMaxTime() > maxTime) {
|
||||||
maxTime = loader.getMaxTime();
|
maxTime = loader.getMaxTime();
|
||||||
}
|
}
|
||||||
if (name == null)
|
if (name == null)
|
||||||
name = getFileBasename(inp.getName());
|
name = getFileBasename(inp.getName());
|
||||||
buildHierarchyNodes();
|
//buildHierarchyNodes();
|
||||||
relationTypes.addAll(loader.getAllRelationTypes());
|
relationTypes.addAll(loader.getAllRelationTypes());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
|||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: SCViewer Help
|
Bundle-Name: SCViewer Help
|
||||||
Bundle-SymbolicName: com.minres.scviewer.e4.application.help;singleton:=true
|
Bundle-SymbolicName: com.minres.scviewer.e4.application.help;singleton:=true
|
||||||
Bundle-Version: 2.18.0
|
Bundle-Version: 2.19.3
|
||||||
Bundle-Vendor: MINRES Technologies GmbH
|
Bundle-Vendor: MINRES Technologies GmbH
|
||||||
Automatic-Module-Name: com.minres.scviewer.e4.application.help
|
Automatic-Module-Name: com.minres.scviewer.e4.application.help
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||||
<plugin>
|
<plugin name="DocBook Online Help Sample" id="com.minres.scviewer.e4.application.help" version="1.0" provider-name="Example provider">
|
||||||
<extension point="org.eclipse.help.toc">
|
<extension point="org.eclipse.help.toc">
|
||||||
<toc file="toc.xml" primary="true"/>
|
<toc file="toc.xml" primary="true"/>
|
||||||
</extension>
|
</extension>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.minres.scviewer</groupId>
|
<groupId>com.minres.scviewer</groupId>
|
||||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||||
<version>2.18.0</version>
|
<version>2.19.3</version>
|
||||||
<relativePath>../..</relativePath>
|
<relativePath>../..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<packaging>eclipse-plugin</packaging>
|
<packaging>eclipse-plugin</packaging>
|
||||||
|
@ -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.18.0
|
Bundle-Version: 2.19.3
|
||||||
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",
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.minres.scviewer</groupId>
|
<groupId>com.minres.scviewer</groupId>
|
||||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||||
<version>2.18.0</version>
|
<version>2.19.3</version>
|
||||||
<relativePath>../..</relativePath>
|
<relativePath>../..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<packaging>eclipse-plugin</packaging>
|
<packaging>eclipse-plugin</packaging>
|
||||||
|
@ -366,10 +366,14 @@ public class DesignBrowser {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
public void setWaveformViewer(WaveformViewer waveformViewerPart) {
|
public void setWaveformViewer(WaveformViewer waveformViewerPart) {
|
||||||
this.waveformViewerPart=waveformViewerPart;
|
this.waveformViewerPart=waveformViewerPart;
|
||||||
IWaveformDb database = waveformViewerPart.getDatabase();
|
IWaveformDb database = waveformViewerPart.getDatabase();
|
||||||
|
setWaveformDb(database);
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public void setWaveformDb(IWaveformDb database) {
|
||||||
Object input = treeViewer.getInput();
|
Object input = treeViewer.getInput();
|
||||||
if(input instanceof List<?>){
|
if(input instanceof List<?>){
|
||||||
IWaveformDb db = ((List<IWaveformDb>)input).get(0);
|
IWaveformDb db = ((List<IWaveformDb>)input).get(0);
|
||||||
|
@ -267,6 +267,7 @@ public class TransactionList extends Composite {
|
|||||||
.map(e -> new AttributeNameBean(e.getKey(), e.getValue()))
|
.map(e -> new AttributeNameBean(e.getKey(), e.getValue()))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
getDisplay().asyncExec(() -> {
|
getDisplay().asyncExec(() -> {
|
||||||
|
if(tableViewer.getControl().isDisposed()) return;
|
||||||
tableViewer.setInput(txList);
|
tableViewer.setInput(txList);
|
||||||
attrNames.clear();
|
attrNames.clear();
|
||||||
attrNames.addAll(newAttrNames);
|
attrNames.addAll(newAttrNames);
|
||||||
|
@ -176,7 +176,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
|||||||
/** The factory. */
|
/** The factory. */
|
||||||
WaveformViewFactory factory = new WaveformViewFactory();
|
WaveformViewFactory factory = new WaveformViewFactory();
|
||||||
|
|
||||||
DesignBrowser browser = null;
|
DesignBrowser designBrowser = null;
|
||||||
|
|
||||||
TransactionDetails detailsView = null;
|
TransactionDetails detailsView = null;
|
||||||
|
|
||||||
@ -206,8 +206,6 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
|||||||
|
|
||||||
IEclipsePreferences store = null;
|
IEclipsePreferences store = null;
|
||||||
|
|
||||||
@Inject @Optional DesignBrowser designBrowser;
|
|
||||||
|
|
||||||
/** The database. */
|
/** The database. */
|
||||||
private IWaveformDb database;
|
private IWaveformDb database;
|
||||||
|
|
||||||
@ -295,7 +293,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
|||||||
middleSash.setWeights(new int[] {75, 25});
|
middleSash.setWeights(new int[] {75, 25});
|
||||||
|
|
||||||
ctx.set(Composite.class, left);
|
ctx.set(Composite.class, left);
|
||||||
browser = ContextInjectionFactory.make(DesignBrowser.class, ctx);
|
designBrowser = ContextInjectionFactory.make(DesignBrowser.class, ctx);
|
||||||
|
|
||||||
ctx.set(Composite.class, right);
|
ctx.set(Composite.class, right);
|
||||||
detailsView = ContextInjectionFactory.make(TransactionDetails.class, ctx);
|
detailsView = ContextInjectionFactory.make(TransactionDetails.class, ctx);
|
||||||
@ -623,6 +621,8 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
|||||||
loadState(partConfig);
|
loadState(partConfig);
|
||||||
if (state != null && !state.isEmpty())
|
if (state != null && !state.isEmpty())
|
||||||
restoreWaveformViewerState(state);
|
restoreWaveformViewerState(state);
|
||||||
|
if(designBrowser!=null)
|
||||||
|
designBrowser.setWaveformDb(database);
|
||||||
fileChecker = null;
|
fileChecker = null;
|
||||||
if (checkForUpdates)
|
if (checkForUpdates)
|
||||||
fileChecker = fileMonitor.addFileChangeListener(WaveformViewer.this, filesToLoad, FILE_CHECK_INTERVAL);
|
fileChecker = fileMonitor.addFileChangeListener(WaveformViewer.this, filesToLoad, FILE_CHECK_INTERVAL);
|
||||||
@ -654,9 +654,11 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
|||||||
Map<String, String> state = new HashMap<>();
|
Map<String, String> state = new HashMap<>();
|
||||||
saveWaveformViewerState(state);
|
saveWaveformViewerState(state);
|
||||||
waveformPane.getStreamList().clear();
|
waveformPane.getStreamList().clear();
|
||||||
|
if(database.isLoaded())
|
||||||
|
database.close();
|
||||||
database = dbFactory.getDatabase();
|
database = dbFactory.getDatabase();
|
||||||
database.addPropertyChangeListener(evt -> {
|
database.addPropertyChangeListener(evt -> {
|
||||||
if (IHierNode.WAVEFORMS.equals(evt.getPropertyName())) { //$NON-NLS-1$
|
if (IHierNode.WAVEFORMS.equals(evt.getPropertyName()) || IHierNode.LOADING_FINISHED.equals(evt.getPropertyName())) { //$NON-NLS-1$
|
||||||
myParent.getDisplay().syncExec(() -> waveformPane.setMaxTime(database.getMaxTime()));
|
myParent.getDisplay().syncExec(() -> waveformPane.setMaxTime(database.getMaxTime()));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -826,7 +828,18 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
|||||||
if(Boolean.parseBoolean(state.get(SHOWN_WAVEFORM + i + WAVEFORM_SELECTED)))
|
if(Boolean.parseBoolean(state.get(SHOWN_WAVEFORM + i + WAVEFORM_SELECTED)))
|
||||||
selectedTrackEntries.add(trackEntry);
|
selectedTrackEntries.add(trackEntry);
|
||||||
} else {
|
} else {
|
||||||
IWaveform waveform = database.getStreamByName(state.get(SHOWN_WAVEFORM + i));
|
String name = state.get(SHOWN_WAVEFORM + i);
|
||||||
|
IWaveform waveform = database.getStreamByName(name);
|
||||||
|
if (waveform == null) {
|
||||||
|
int pos = name.lastIndexOf('.');
|
||||||
|
waveform = database.getStreamByName(name.substring(0, pos));
|
||||||
|
if(waveform!=null) {
|
||||||
|
List<IHierNode> childs = waveform.getChildNodes();
|
||||||
|
waveform = (IWaveform) childs.stream().filter(node -> name.substring(pos+1).equals(node.getName()))
|
||||||
|
.findAny()
|
||||||
|
.orElse(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
if (waveform != null) {
|
if (waveform != null) {
|
||||||
TrackEntry trackEntry = waveformPane.addWaveform(waveform, -1);
|
TrackEntry trackEntry = waveformPane.addWaveform(waveform, -1);
|
||||||
//check if t is selected
|
//check if t is selected
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.minres.scviewer</groupId>
|
<groupId>com.minres.scviewer</groupId>
|
||||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||||
<version>2.18.0</version>
|
<version>2.19.3</version>
|
||||||
<relativePath>../..</relativePath>
|
<relativePath>../..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<packaging>eclipse-plugin</packaging>
|
<packaging>eclipse-plugin</packaging>
|
||||||
|
8
pom.xml
8
pom.xml
@ -4,7 +4,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>com.minres.scviewer</groupId>
|
<groupId>com.minres.scviewer</groupId>
|
||||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||||
<version>2.18.0</version>
|
<version>2.19.3</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<modules>
|
<modules>
|
||||||
<module>releng/com.minres.scviewer.target</module>
|
<module>releng/com.minres.scviewer.target</module>
|
||||||
@ -71,13 +71,13 @@
|
|||||||
<artifact>
|
<artifact>
|
||||||
<groupId>com.minres.scviewer</groupId>
|
<groupId>com.minres.scviewer</groupId>
|
||||||
<artifactId>com.minres.scviewer.target</artifactId>
|
<artifactId>com.minres.scviewer.target</artifactId>
|
||||||
<version>2.18.0</version>
|
<version>2.19.3</version>
|
||||||
</artifact>
|
</artifact>
|
||||||
</target>
|
</target>
|
||||||
<executionEnvironment>
|
<executionEnvironment>
|
||||||
org.eclipse.justj.openjdk.hotspot.jre.minimal-15</executionEnvironment>
|
org.eclipse.justj.openjdk.hotspot.jre.minimal-17</executionEnvironment>
|
||||||
<executionEnvironmentDefault>
|
<executionEnvironmentDefault>
|
||||||
org.eclipse.justj.openjdk.hotspot.jre.minimal-15</executionEnvironmentDefault>
|
org.eclipse.justj.openjdk.hotspot.jre.minimal-17</executionEnvironmentDefault>
|
||||||
<includePackedArtifacts>true</includePackedArtifacts>
|
<includePackedArtifacts>true</includePackedArtifacts>
|
||||||
<environments>
|
<environments>
|
||||||
<environment>
|
<environment>
|
||||||
|
@ -6,11 +6,11 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.minres.scviewer</groupId>
|
<groupId>com.minres.scviewer</groupId>
|
||||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||||
<version>2.18.0</version>
|
<version>2.19.3</version>
|
||||||
<relativePath>../..</relativePath>
|
<relativePath>../..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>com.minres.scviewer.e4.product</artifactId>
|
<artifactId>com.minres.scviewer.e4.product</artifactId>
|
||||||
<version>2.18.0</version>
|
<version>2.19.3</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.18.0" useFeatures="true" includeLaunchers="true">
|
<product name="SCViewer" uid="scviewer" id="com.minres.scviewer.e4.application.product" application="org.eclipse.e4.ui.workbench.swt.E4Application" version="2.19.3" useFeatures="true" includeLaunchers="true" autoIncludeRequirements="true">
|
||||||
|
|
||||||
<configIni use="default">
|
<configIni use="default">
|
||||||
</configIni>
|
</configIni>
|
||||||
@ -34,7 +34,7 @@
|
|||||||
</launcher>
|
</launcher>
|
||||||
|
|
||||||
<vm>
|
<vm>
|
||||||
<linux include="true">org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11</linux>
|
<linux include="true">org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17</linux>
|
||||||
<macos include="true">org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11</macos>
|
<macos include="true">org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11</macos>
|
||||||
<windows include="true">org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11</windows>
|
<windows include="true">org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11</windows>
|
||||||
</vm>
|
</vm>
|
||||||
@ -53,7 +53,6 @@
|
|||||||
<feature id="org.eclipse.emf.ecore" installMode="root"/>
|
<feature id="org.eclipse.emf.ecore" installMode="root"/>
|
||||||
<feature id="org.eclipse.emf.common" installMode="root"/>
|
<feature id="org.eclipse.emf.common" installMode="root"/>
|
||||||
<feature id="org.eclipse.ecf.core.feature" installMode="root"/>
|
<feature id="org.eclipse.ecf.core.feature" installMode="root"/>
|
||||||
<feature id="org.eclipse.ecf.filetransfer.httpclient45.feature" installMode="root"/>
|
|
||||||
<feature id="org.eclipse.ecf.filetransfer.feature" installMode="root"/>
|
<feature id="org.eclipse.ecf.filetransfer.feature" installMode="root"/>
|
||||||
<feature id="org.eclipse.ecf.core.ssl.feature" installMode="root"/>
|
<feature id="org.eclipse.ecf.core.ssl.feature" installMode="root"/>
|
||||||
<feature id="com.minres.scviewer.ui.feature" installMode="root"/>
|
<feature id="com.minres.scviewer.ui.feature" installMode="root"/>
|
||||||
@ -64,6 +63,7 @@
|
|||||||
<feature id="com.opcoach.e4.preferences.feature" installMode="root"/>
|
<feature id="com.opcoach.e4.preferences.feature" installMode="root"/>
|
||||||
<feature id="com.minres.scviewer.e4.help.feature" installMode="root"/>
|
<feature id="com.minres.scviewer.e4.help.feature" installMode="root"/>
|
||||||
<feature id="org.eclipse.justj.openjdk.hotspot.jre.minimal.stripped" installMode="root"/>
|
<feature id="org.eclipse.justj.openjdk.hotspot.jre.minimal.stripped" installMode="root"/>
|
||||||
|
<feature id="org.eclipse.ecf.filetransfer.httpclient5.feature" installMode="root"/>
|
||||||
</features>
|
</features>
|
||||||
|
|
||||||
<configurations>
|
<configurations>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<target name="com.minres.scviewer.target" sequenceNumber="138">
|
<target name="com.minres.scviewer.target" sequenceNumber="138">
|
||||||
<locations>
|
<locations>
|
||||||
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
|
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
|
||||||
<repository location="http://download.eclipse.org/releases/2021-12/"/>
|
<repository location="http://download.eclipse.org/releases/2022-12/"/>
|
||||||
<unit id="org.eclipse.equinox.executable.feature.group" version="0.0.0"/>
|
<unit id="org.eclipse.equinox.executable.feature.group" version="0.0.0"/>
|
||||||
<unit id="org.eclipse.equinox.p2.sdk.feature.jar" version="0.0.0"/> <!-- needed by Linux exectable-->
|
<unit id="org.eclipse.equinox.p2.sdk.feature.jar" version="0.0.0"/> <!-- needed by Linux exectable-->
|
||||||
<unit id="org.eclipse.equinox.sdk.feature.group" version="0.0.0"/>
|
<unit id="org.eclipse.equinox.sdk.feature.group" version="0.0.0"/>
|
||||||
@ -11,12 +11,12 @@
|
|||||||
<unit id="org.eclipse.sdk.feature.group" version="0.0.0"/> <!-- org.eclipse.equinox.p2.iu -->
|
<unit id="org.eclipse.sdk.feature.group" version="0.0.0"/> <!-- org.eclipse.equinox.p2.iu -->
|
||||||
<unit id="org.eclipse.rcptt.core.feature.group" version="0.0.0"/><!-- com.google.guave-->
|
<unit id="org.eclipse.rcptt.core.feature.group" version="0.0.0"/><!-- com.google.guave-->
|
||||||
<unit id="org.eclipse.pde.feature.group" version="0.0.0"/> <!-- org.junit for testing -->
|
<unit id="org.eclipse.pde.feature.group" version="0.0.0"/> <!-- org.junit for testing -->
|
||||||
<unit id="javax.servlet" version="0.0.0"/>
|
<unit id="jakarta.servlet" version="0.0.0"/>
|
||||||
<unit id="org.eclipse.equinox.core.feature.feature.group" version="0.0.0"/>
|
<unit id="org.eclipse.equinox.core.feature.feature.group" version="0.0.0"/>
|
||||||
<unit id="org.eclipse.equinox.p2.core.feature.feature.group" version="0.0.0"/>
|
<unit id="org.eclipse.equinox.p2.core.feature.feature.group" version="0.0.0"/>
|
||||||
</location>
|
</location>
|
||||||
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
|
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
|
||||||
<repository location="https://www.opcoach.com/repository/2021-12/"/>
|
<repository location="https://www.opcoach.com/repository/2022-12/"/>
|
||||||
<unit id="com.opcoach.e4.preferences.feature.feature.group" version="0.0.0"/>
|
<unit id="com.opcoach.e4.preferences.feature.feature.group" version="0.0.0"/>
|
||||||
</location>
|
</location>
|
||||||
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
|
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
|
||||||
@ -36,7 +36,7 @@
|
|||||||
<unit id="org.eclipse.collections.feature.source.feature.group" version="0.0.0"/>
|
<unit id="org.eclipse.collections.feature.source.feature.group" version="0.0.0"/>
|
||||||
</location>
|
</location>
|
||||||
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
|
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
|
||||||
<repository location="https://download.eclipse.org/justj/jres/15/updates/release/latest"/>
|
<repository location="https://download.eclipse.org/justj/jres/17/updates/release/latest"/>
|
||||||
<unit id="org.eclipse.justj.openjdk.hotspot.jre.minimal.stripped.feature.group" version="0.0.0"/>
|
<unit id="org.eclipse.justj.openjdk.hotspot.jre.minimal.stripped.feature.group" version="0.0.0"/>
|
||||||
</location>
|
</location>
|
||||||
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
|
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.minres.scviewer</groupId>
|
<groupId>com.minres.scviewer</groupId>
|
||||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||||
<version>2.18.0</version>
|
<version>2.19.3</version>
|
||||||
<relativePath>../..</relativePath>
|
<relativePath>../..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.minres.scviewer</groupId>
|
<groupId>com.minres.scviewer</groupId>
|
||||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||||
<version>2.18.0</version>
|
<version>2.19.3</version>
|
||||||
<relativePath>../..</relativePath>
|
<relativePath>../..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<build>
|
<build>
|
||||||
|
@ -5,11 +5,11 @@
|
|||||||
<xsl:for-each select="site">
|
<xsl:for-each select="site">
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>com.itjw.txviewer.updateSite</title>
|
<title>com.minres.scviewer.updateSite</title>
|
||||||
<style>@import url("web/site.css");</style>
|
<style>@import url("web/site.css");</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1 class="title">com.itjw.txviewer.updateSite</h1>
|
<h1 class="title">com.minres.scviewer.updateSite</h1>
|
||||||
<p class="bodyText"><xsl:value-of select="description"/></p>
|
<p class="bodyText"><xsl:value-of select="description"/></p>
|
||||||
<table width="100%" border="0" cellspacing="1" cellpadding="2">
|
<table width="100%" border="0" cellspacing="1" cellpadding="2">
|
||||||
<xsl:for-each select="category-def">
|
<xsl:for-each select="category-def">
|
||||||
|
BIN
tests/com.minres.scviewer.database.test/inputs/test.0.fst
Executable file
BIN
tests/com.minres.scviewer.database.test/inputs/test.0.fst
Executable file
Binary file not shown.
BIN
tests/com.minres.scviewer.database.test/inputs/test.0.ftr
Executable file
BIN
tests/com.minres.scviewer.database.test/inputs/test.0.ftr
Executable file
Binary file not shown.
BIN
tests/com.minres.scviewer.database.test/inputs/test.fst
Normal file
BIN
tests/com.minres.scviewer.database.test/inputs/test.fst
Normal file
Binary file not shown.
@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.minres.scviewer</groupId>
|
<groupId>com.minres.scviewer</groupId>
|
||||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||||
<version>2.18.0</version>
|
<version>2.19.3</version>
|
||||||
<relativePath>../..</relativePath>
|
<relativePath>../..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<packaging>eclipse-test-plugin</packaging>
|
<packaging>eclipse-test-plugin</packaging>
|
||||||
|
Reference in New Issue
Block a user