Merge branch 'release/2.17.2'

This commit is contained in:
Eyck Jentzsch 2023-02-23 15:51:49 +01:00
commit 7a98eda464
33 changed files with 90 additions and 53 deletions

View File

@ -15,7 +15,9 @@
<booleanAttribute key="M2_WORKSPACE_RESOLUTION" value="false"/>
<booleanAttribute key="org.eclipse.debug.core.ATTR_FORCE_SYSTEM_CONSOLE_ENCODING" value="false"/>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_ATTR_USE_ARGFILE" value="false"/>
<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_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.WORKING_DIRECTORY" value="${project_loc:com.minres.scviewer.parent}"/>
</launchConfiguration>

View File

@ -13,7 +13,9 @@
<stringAttribute key="M2_USER_SETTINGS" value=""/>
<booleanAttribute key="M2_WORKSPACE_RESOLUTION" value="true"/>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_ATTR_USE_ARGFILE" value="false"/>
<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_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.WORKING_DIRECTORY" value="${project_loc:com.minres.scviewer.parent}"/>
</launchConfiguration>

View File

@ -18,7 +18,9 @@
<stringAttribute key="bad_container_name" value="/com.minres.scviewer.parent/.launch"/>
<booleanAttribute key="org.eclipse.debug.core.ATTR_FORCE_SYSTEM_CONSOLE_ENCODING" value="false"/>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_ATTR_USE_ARGFILE" value="false"/>
<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_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.WORKING_DIRECTORY" value="${project_loc:com.minres.scviewer.parent}"/>
</launchConfiguration>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.1</version>
<version>2.17.2</version>
<relativePath>../..</relativePath>
</parent>

View File

@ -5,7 +5,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.1</version>
<version>2.17.2</version>
<relativePath>../..</relativePath>
</parent>
<version>3.0.0-SNAPSHOT</version>

View File

@ -5,7 +5,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.1</version>
<version>2.17.2</version>
<relativePath>../..</relativePath>
</parent>
<version>1.1.0-SNAPSHOT</version>

View File

@ -5,7 +5,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.1</version>
<version>2.17.2</version>
<relativePath>../..</relativePath>
</parent>
<version>1.0.0-SNAPSHOT</version>

View File

@ -5,7 +5,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.1</version>
<version>2.17.2</version>
<relativePath>../..</relativePath>
</parent>
<version>1.0.0-SNAPSHOT</version>

View File

@ -5,7 +5,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.1</version>
<version>2.17.2</version>
<relativePath>../..</relativePath>
</parent>
<version>1.1.0-SNAPSHOT</version>

View File

@ -5,7 +5,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.1</version>
<version>2.17.2</version>
<relativePath>../..</relativePath>
</parent>
<version>1.1.0-SNAPSHOT</version>

View File

@ -6,7 +6,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.1</version>
<version>2.17.2</version>
<relativePath>../..</relativePath>
</parent>
<packaging>eclipse-plugin</packaging>

View File

@ -182,8 +182,7 @@ abstract class AbstractTxStream extends HierNode implements IWaveform {
}
}
rowCount=rowEndTime.size()>0?rowEndTime.size():1;
//getChildNodes().parallelStream().forEach(c -> ((TxGenerator)c).calculateConcurrency());
getChildNodes().stream().forEach(c -> ((TxGenerator)c).calculateConcurrency());
getChildNodes().parallelStream().forEach(c -> ((TxGenerator)c).calculateConcurrency());
}
}

View File

@ -131,7 +131,7 @@ public class FtrDbLoader implements IWaveformDbLoader {
* @param txId the tx id
* @return the transaction
*/
public ITx getTransaction(long txId) {
public synchronized ITx getTransaction(long txId) {
if (txCache.containsKey(txId))
return txCache.get(txId);
if(transactions.containsKey(txId)) {
@ -185,8 +185,10 @@ public class FtrDbLoader implements IWaveformDbLoader {
this.file=file;
try(FileInputStream fis = new FileInputStream(file)) {
new CborDbParser(this, fis);
} catch (IOException e) {
LOG.warn("Problem parsing file "+file.getName()+": " , e);
} catch (Exception e) {
LOG.error("Error parsing file "+file.getName(), e);
LOG.error("Error parsing file "+file.getName()+ ": ", e);
transactions.clear();
throw new InputFormatException(e.toString());
}
@ -242,17 +244,15 @@ public class FtrDbLoader implements IWaveformDbLoader {
long name_id = cborDecoder.readInt();
long type_id = cborDecoder.readInt();
String attrName = strDict.get((int)name_id);
if(!attributeTypes.containsKey(attrName)) {
attributeTypes.put(attrName, new TxAttributeType(attrName, DataType.values()[(int)type_id], AssociationType.values()[(int)tag-7]));
}
TxAttributeType attrType = attributeTypes.get(attrName);
TxAttributeType attrType = getOrAddAttributeType(tag, type_id, attrName);
switch((int)type_id) {
case 0: // BOOLEAN
ITxAttribute b = new TxAttribute(attrType, cborDecoder.readInt()>0?"True":"False");
ITxAttribute b = new TxAttribute(attrType, cborDecoder.readBoolean()?"True":"False");
ret.add(b);
break;
case 2: // INTEGER
case 3: // UNSIGNED
case 10: // POINTER
ITxAttribute a = new TxAttribute(attrType, String.valueOf(cborDecoder.readInt()));
ret.add(a);
break;
@ -269,6 +269,8 @@ public class FtrDbLoader implements IWaveformDbLoader {
ITxAttribute s = new TxAttribute(attrType, strDict.get((int)cborDecoder.readInt()));
ret.add(s);
break;
default:
LOG.warn("Unsupported data type: "+type_id);
}
}
}
@ -279,6 +281,14 @@ public class FtrDbLoader implements IWaveformDbLoader {
return ret;
}
private synchronized TxAttributeType getOrAddAttributeType(long tag, long type_id, String attrName) {
if(!attributeTypes.containsKey(attrName)) {
attributeTypes.put(attrName, new TxAttributeType(attrName, DataType.values()[(int)type_id], AssociationType.values()[(int)tag-7]));
}
TxAttributeType attrType = attributeTypes.get(attrName);
return attrType;
}
/**
* Dispose.
*/
@ -318,6 +328,7 @@ public class FtrDbLoader implements IWaveformDbLoader {
long array_len = readArrayLength();
assert(array_len==-1);
CborType next = peekType();
int chunk_idx=0;
while(next != null && !break_type.isEqualType(next)) {
long tag = readTag();
switch((int)tag) {
@ -393,9 +404,12 @@ public class FtrDbLoader implements IWaveformDbLoader {
}
}
next = peekType();
chunk_idx++;
}
} catch(IOException e) {
LOG.error("Error parsing file input stream", e);
long pos = 0;
try {pos=inputStream.getChannel().position(); } catch (Exception ee) {}
LOG.error("Error parsing file input stream at position" + pos, e);
}
}
@ -441,7 +455,8 @@ public class FtrDbLoader implements IWaveformDbLoader {
long gen_id = cborDecoder.readInt();
long name_id = cborDecoder.readInt();
long stream_id = cborDecoder.readInt();
add(gen_id, new TxGenerator(loader, gen_id, loader.strDict.get((int)name_id), loader.txStreams.get(stream_id)));
if(loader.txStreams.containsKey(stream_id))
add(gen_id, new TxGenerator(loader, gen_id, loader.strDict.get((int)name_id), loader.txStreams.get(stream_id)));
} else {
throw new IOException("Illegal tage ncountered: "+id);
}
@ -455,14 +470,17 @@ public class FtrDbLoader implements IWaveformDbLoader {
while(next != null && !break_type.isEqualType(next)) {
long blockOffset = cborDecoder.getPos();
long tx_size = cborDecoder.readArrayLength();
long txId = 0;
long genId = 0;
long attr_idx=0;
for(long i = 0; i<tx_size; ++i) {
long tag = cborDecoder.readTag();
switch((int)tag) {
case 6: // id/generator/start/end
long len = cborDecoder.readArrayLength();
assert(len==4);
long txId = cborDecoder.readInt();
long genId = cborDecoder.readInt();
txId = cborDecoder.readInt();
genId = cborDecoder.readInt();
long startTime = cborDecoder.readInt()*loader.time_scale_factor;
long endTime = cborDecoder.readInt()*loader.time_scale_factor;
TxGenerator gen = loader.txGenerators.get(genId);
@ -483,8 +501,22 @@ public class FtrDbLoader implements IWaveformDbLoader {
default: { // skip over 7:begin attr, 8:record attr, 9:end attr
long sz = cborDecoder.readArrayLength();
assert(sz==3);
for(long j = 0; j<sz; ++j)
long name_id = cborDecoder.readInt();
String name = loader.strDict.get((int)name_id);
long type_id = cborDecoder.readInt();
switch((int)type_id) {
case 0: // BOOLEAN
cborDecoder.readBoolean();
break;
case 4: // FLOATING_POINT_NUMBER
case 7: // FIXED_POINT_INTEGER
case 8: // UNSIGNED_FIXED_POINT_INTEGER
cborDecoder.readFloat();
break;
default:
cborDecoder.readInt();
}
attr_idx++;
}
}
}

View File

@ -435,9 +435,10 @@ public class CborDecoder {
} else if (breakAllowed && length == BREAK) {
return -1;
}
if (result < 0) {
fail("Not well-formed CBOR integer found, invalid length: %d!", result);
}
// unsigned values larger than long.MAX are shown as negative values
// if (result < 0) {
// fail("Not well-formed CBOR integer found, invalid length: %d!", result);
// }
return result;
}

View File

@ -4,7 +4,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.1</version>
<version>2.17.2</version>
<relativePath>../..</relativePath>
</parent>
<packaging>eclipse-plugin</packaging>

View File

@ -6,7 +6,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.1</version>
<version>2.17.2</version>
<relativePath>../..</relativePath>
</parent>
<packaging>eclipse-plugin</packaging>

View File

@ -5,7 +5,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.1</version>
<version>2.17.2</version>
<relativePath>../..</relativePath>
</parent>
<version>4.0.0-SNAPSHOT</version>

View File

@ -5,7 +5,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.1</version>
<version>2.17.2</version>
<relativePath>../..</relativePath>
</parent>
<packaging>eclipse-plugin</packaging>

View File

@ -4,7 +4,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.1</version>
<version>2.17.2</version>
<relativePath>../..</relativePath>
</parent>
<packaging>eclipse-plugin</packaging>

View File

@ -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.17.1
Bundle-Version: 2.17.2
Bundle-Vendor: MINRES Technologies GmbH
Automatic-Module-Name: com.minres.scviewer.e4.application.help
Bundle-RequiredExecutionEnvironment: JavaSE-11

View File

@ -6,7 +6,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.1</version>
<version>2.17.2</version>
<relativePath>../..</relativePath>
</parent>
<packaging>eclipse-plugin</packaging>

View File

@ -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.17.1
Bundle-Version: 2.17.2
Bundle-Vendor: %Bundle-Vendor
Require-Bundle: javax.inject;bundle-version="1.0.0",
org.eclipse.core.runtime;bundle-version="3.11.1",

View File

@ -6,7 +6,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.1</version>
<version>2.17.2</version>
<relativePath>../..</relativePath>
</parent>
<packaging>eclipse-plugin</packaging>

View File

@ -21,7 +21,7 @@
class="com.minres.scviewer.ui.TxEditorPart"
contributorClass="com.minres.scviewer.ui.TxEditorActionBarContributor"
extensions="txdb"
filenames="*.txdb,*.txlog,*.vcd"
filenames="*.txdb,*.txlog,*.vcd,*.ftr"
icon="res/images/scviewer.png"
id="com.minres.scviewer.ui.TxEditorPart"
name="Wave Viewer">

View File

@ -4,7 +4,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.1</version>
<version>2.17.2</version>
<relativePath>../..</relativePath>
</parent>
<packaging>eclipse-plugin</packaging>

View File

@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.1</version>
<version>2.17.2</version>
<packaging>pom</packaging>
<modules>
<module>releng/com.minres.scviewer.target</module>
@ -70,7 +70,7 @@
<artifact>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.target</artifactId>
<version>2.17.1</version>
<version>2.17.2</version>
</artifact>
</target>
<executionEnvironment>org.eclipse.justj.openjdk.hotspot.jre.minimal-15</executionEnvironment>

View File

@ -6,11 +6,11 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.1</version>
<version>2.17.2</version>
<relativePath>../..</relativePath>
</parent>
<artifactId>com.minres.scviewer.e4.product</artifactId>
<version>2.17.1</version>
<version>2.17.2</version>
<packaging>eclipse-repository</packaging>
<groupId>com.minres.scviewer</groupId>
<build>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?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.17.1" 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.17.2" useFeatures="true" includeLaunchers="true">
<configIni use="default">
</configIni>

View File

@ -40,13 +40,13 @@
<unit id="org.eclipse.justj.openjdk.hotspot.jre.minimal.stripped.feature.group" version="0.0.0"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<repository location="https://download.eclipse.org/tools/orbit/downloads/2021-12"/>
<unit id="org.apache.commons.compress" version="1.21.0.v20211103-2100"/>
<unit id="org.apache.commons.compress.source" version="1.21.0.v20211103-2100"/>
<unit id="ch.qos.logback.slf4j" version="1.0.7.v201505121915"/>
<unit id="ch.qos.logback.slf4j.source" version="1.0.7.v201505121915"/>
<unit id="org.slf4j.api" version="1.7.2.v20121108-1250"/>
<unit id="org.slf4j.api.source" version="1.7.2.v20121108-1250"/>
<repository location="https://download.eclipse.org/tools/orbit/downloads/2022-12"/>
<unit id="org.apache.commons.compress" version="0.0.0"/>
<unit id="org.apache.commons.compress.source" version="0.0.0"/>
<unit id="ch.qos.logback.slf4j" version="0.0.0"/>
<unit id="ch.qos.logback.slf4j.source" version="0.0.0"/>
<unit id="org.slf4j.api" version="0.0.0"/>
<unit id="org.slf4j.api.source" version="0.0.0"/>
</location>
</locations>
<targetJRE path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-15"/>

View File

@ -12,7 +12,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.1</version>
<version>2.17.2</version>
<relativePath>../..</relativePath>
</parent>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.1</version>
<version>2.17.2</version>
<relativePath>../..</relativePath>
</parent>
<build>

View File

@ -9,8 +9,7 @@ Require-Bundle: com.minres.scviewer.database,
com.minres.scviewer.database.sqlite;bundle-version="1.0.0",
com.minres.scviewer.database.text;bundle-version="1.0.0",
com.minres.scviewer.database.vcd;bundle-version="1.0.0",
org.junit,
org.junit.jupiter.api
org.junit
Bundle-ActivationPolicy: lazy
Service-Component: OSGI-INF/component.xml
Automatic-Module-Name: com.minres.scviewer.database.test

View File

@ -6,7 +6,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.1</version>
<version>2.17.2</version>
<relativePath>../..</relativePath>
</parent>
<packaging>eclipse-test-plugin</packaging>