Refactor viewer sessions and selections and optimize transaction queries

This commit is contained in:
eyck committed 2026-11-15 10:08:36 +01:00
1 parent 4824d48828
commit 589762b220
42 files changed
+1118 -720

No files matched your search

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
@@ -1,11 +1,11 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=11
org.eclipse.jdt.core.compiler.source=17
@@ -12,6 +12,11 @@
package com.minres.scviewer.database.text;
import java.util.List;
import com.minres.scviewer.database.LazyValue;
import com.minres.scviewer.database.tx.ITx;
import com.minres.scviewer.database.tx.TransactionLists;
import com.minres.scviewer.database.tx.ITransactionProvider;
import com.minres.scviewer.database.EventEntry;
import com.minres.scviewer.database.EventList;
import com.minres.scviewer.database.HierNode;
@@ -25,7 +30,22 @@ import com.minres.scviewer.database.tx.ITxEvent;
/**
* The Class AbstractTxStream.
*/
abstract class AbstractTxStream extends HierNode implements IWaveform {
abstract class AbstractTxStream extends HierNode implements IWaveform, ITransactionProvider {
private final LazyValue<List<ITx>> transactionList = new LazyValue<>();
@Override
public List<ITx> getTransactionList() {
return transactionList.get(() -> TransactionLists.fromEvents(getEvents(), () -> false));
}
@Override
public ITx getTransaction(long id) {
ITx transaction;
try { transaction = loader.getTransaction(id); }
catch (IllegalArgumentException missing) { return null; }
return transaction != null && (transaction.getStream() == this || transaction.getGenerator() == this) ? transaction : null;
}
private final String fullName;