Compare commits

..

35 Commits

Author SHA1 Message Date
1ebf9ba382 update version numbers 2021-07-11 13:47:48 +02:00
929408d08c fix missing gzip txlog file filter in file dialog 2021-07-11 13:47:27 +02:00
f57fb93525 fix reload issues 2021-07-11 13:46:35 +02:00
788065e456 Merge branch 'release/2.13.1' 2021-03-25 21:09:49 +00:00
22b46e0525 fix fit zoom level calculation 2021-03-25 21:07:05 +00:00
b75018239a Merge branch 'master' into develop
Conflicts:
	features/com.minres.scviewer.database.feature/pom.xml
	features/com.minres.scviewer.e4.feature/pom.xml
	features/com.minres.scviewer.e4.platform.feature/pom.xml
	features/com.minres.scviewer.feature/pom.xml
	features/com.minres.scviewer.ui.feature/pom.xml
	plugins/com.minres.scviewer.database.sqlite/pom.xml
	plugins/com.minres.scviewer.database.text/pom.xml
	plugins/com.minres.scviewer.database.ui.swt/pom.xml
	plugins/com.minres.scviewer.database.vcd/pom.xml
	plugins/com.minres.scviewer.database/pom.xml
	plugins/com.minres.scviewer.e4.application/META-INF/MANIFEST.MF
	plugins/com.minres.scviewer.e4.application/pom.xml
	plugins/com.minres.scviewer.ui/pom.xml
	pom.xml
	products/com.minres.scviewer.e4.product/pom.xml
	products/com.minres.scviewer.e4.product/scviewer.product
	releng/com.minres.scviewer.target/pom.xml
	releng/com.minres.scviewer.updateSite/pom.xml
	tests/com.minres.scviewer.database.test/pom.xml
2021-03-25 20:46:30 +00:00
598bb8eec7 Merge remote-tracking branch 'origin/master' 2021-03-25 20:33:25 +00:00
869265fc13 add gzip files to file dialog filter 2021-03-25 20:27:55 +00:00
5ad813527a fix CLI handling 2021-03-25 20:27:55 +00:00
73f8d3d50a fix full name display of generators 2021-03-25 20:27:55 +00:00
da1701195d update version numbers 2021-03-25 20:27:55 +00:00
9b6334509e update version numbers 2021-03-25 20:27:54 +00:00
ac4acc34a4 fix warning and left-overs 2021-03-25 20:27:54 +00:00
b6963f38d6 move interface to primitive types 2021-03-25 20:27:54 +00:00
182a036ade some more refactoring 2021-03-25 20:27:53 +00:00
97f2182290 adapt painter 2021-03-25 20:27:53 +00:00
1986a8c9c3 add explicit event list 2021-03-25 20:27:53 +00:00
6905d96329 add TreeMap facade 2021-03-25 20:27:52 +00:00
818f786b1d add dispose check in case view is closed while loading db 2021-03-25 20:27:52 +00:00
2948c1bd33 update version numbers 2021-03-25 20:22:15 +00:00
78faab404c apply UI fixes
* wrong arrow target of transaction
* wrong zomm factor calculation for zoom fit
* streams and waveforms not visible if at root level
2021-03-25 20:18:50 +00:00
64b10970a8 add gzip files to file dialog filter 2021-03-02 21:55:52 +01:00
6ab8fd232e fix CLI handling 2021-03-02 21:55:52 +01:00
f337a94112 fix full name display of generators 2021-03-02 21:55:52 +01:00
0135631a3e update version numbers 2021-03-02 21:55:52 +01:00
d0e1e8801f update version numbers 2021-03-02 21:55:52 +01:00
d1b3a91979 fix warning and left-overs 2021-03-02 21:55:52 +01:00
45c1396e0e move interface to primitive types 2021-03-02 21:55:51 +01:00
b7301733f0 some more refactoring 2021-03-02 21:55:51 +01:00
5df91dbaa8 adapt painter 2021-03-02 21:55:51 +01:00
68918689e7 add explicit event list 2021-03-02 21:55:51 +01:00
c41dd646da add TreeMap facade 2021-03-02 21:55:51 +01:00
a077389b83 add dispose check in case view is closed while loading db 2021-03-02 21:55:51 +01:00
25545dac51 Merge branch 'release/2.12.2' 2021-02-24 07:04:59 +00:00
4ee2e8bc68 Merge branch 'release/2.12.1' 2021-02-18 08:19:16 +00:00
34 changed files with 78 additions and 103 deletions

View File

@ -5,7 +5,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.13.0</version>
<version>2.13.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.13.0</version>
<version>2.13.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.13.0</version>
<version>2.13.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.13.0</version>
<version>2.13.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.13.0</version>
<version>2.13.2</version>
<relativePath>../..</relativePath>
</parent>
<version>1.1.0-SNAPSHOT</version>

View File

@ -4,7 +4,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.13.0</version>
<version>2.13.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.13.0</version>
<version>2.13.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.13.0</version>
<version>2.13.2</version>
<relativePath>../..</relativePath>
</parent>
<version>4.0.0-SNAPSHOT</version>

View File

@ -110,48 +110,23 @@ public class ArrowPainter implements IPainter {
protected void deriveGeom(Collection<ITxRelation> relations, List<LinkEntry> res, boolean useTarget) {
for (ITxRelation iTxRelation : relations) {
ITx otherTx = useTarget ? iTxRelation.getTarget() : iTxRelation.getSource();
Rectangle bb = createLinkEntry(otherTx, otherTx.getStream());
if(bb!=null){
res.add(new LinkEntry(bb, iTxRelation.getRelationType()));
return;
} else {
for(IHierNode gen:otherTx.getStream().getChildNodes()) {
if(gen instanceof IWaveform) {
bb = createLinkEntry(otherTx, (IWaveform) gen);
if(bb!=null){
res.add(new LinkEntry(bb, iTxRelation.getRelationType()));
return;
}
for(IWaveform iWaveform: new IWaveform[]{otherTx.getStream(), otherTx.getGenerator()}) {
if (waveCanvas.wave2painterMap.containsKey(iWaveform)) {
IWaveformPainter painter = waveCanvas.wave2painterMap.get(iWaveform);
if(painter!=null) {
int height = waveCanvas.styleProvider.getTrackHeight();
Rectangle bb = new Rectangle(
(int) (otherTx.getBeginTime() / scaleFactor),
waveCanvas.rulerHeight + painter.getVerticalOffset() + height * getConcurrencyIndex(otherTx),
(int) ((otherTx.getEndTime() - otherTx.getBeginTime()) / scaleFactor),
height);
res.add(new LinkEntry(bb, iTxRelation.getRelationType()));
}
}
}
}
}
private Rectangle createLinkEntry(ITx otherTx, IWaveform iWaveform) {
if (waveCanvas.wave2painterMap.containsKey(iWaveform)) {
IWaveformPainter painter = waveCanvas.wave2painterMap.get(otherTx.getStream());
if(painter==null) {
for(IHierNode gen:otherTx.getStream().getChildNodes()) {
if(gen instanceof IWaveform) {
painter = waveCanvas.wave2painterMap.get(gen);
if(painter!=null)
break;
}
}
}
if(painter!=null) {
int height = waveCanvas.styleProvider.getTrackHeight();
return new Rectangle(
(int) (otherTx.getBeginTime() / scaleFactor),
waveCanvas.rulerHeight + painter.getVerticalOffset() + height * getConcurrencyIndex(otherTx),
(int) ((otherTx.getEndTime() - otherTx.getBeginTime()) / scaleFactor),
height);
}
}
return null;
}
@Override
public void paintArea(Projection proj, Rectangle clientRect) {
yCtrlOffset = waveCanvas.styleProvider.getTrackHeight()/2;

View File

@ -179,8 +179,11 @@ public class WaveformCanvas extends Canvas {
}
public void setZoomLevel(int level, long centerTime) {
if(level<0) {
level = findFitZoomLevel();
if(level<0) level = 0;
}
//FIXME: keep center if zoom-out and cursor is not in view
if(level<0) level = 0;
long xc=centerTime/this.scaleFactor; // cursor total x-offset
if(level<Constants.UNIT_MULTIPLIER.length*Constants.UNIT_STRING.length){
this.scaleFactor = (long) Math.pow(10, level>>1);
@ -208,6 +211,24 @@ public class WaveformCanvas extends Canvas {
}
}
private int findFitZoomLevel() {
//get area actually capable of displaying data, i.e. area of the receiver which is capable of displaying data
Rectangle clientArea = getClientArea();
long clientAreaWidth = clientArea.width;
//try to find existing zoomlevel where scaleFactor*clientAreaWidth >= maxTime, if one is found set it as new zoomlevel
int magnitude_factor=1;
for(int magnitude=0; magnitude<Constants.UNIT_STRING.length; magnitude++) {
for (int multiplier=0; multiplier<Constants.UNIT_MULTIPLIER.length; multiplier++){
int tempLevel = magnitude*Constants.UNIT_MULTIPLIER.length+multiplier;
long scaleFactor = Constants.UNIT_MULTIPLIER[multiplier]*magnitude_factor;
if(scaleFactor*clientAreaWidth >= maxTime)
return tempLevel;
}
magnitude_factor*=1000;
}
return -1;
}
public long getScaleFactor() {
return scaleFactor;
}

View File

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

View File

@ -12,5 +12,5 @@ org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=11

View File

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

View File

@ -62,9 +62,4 @@ public interface IWaveformDb extends IHierNode {
*/
public boolean isLoaded();
/**
* Clear.
*/
public void clear();
}

View File

@ -165,16 +165,6 @@ public class WaveformDb extends HierNode implements IWaveformDb, PropertyChangeL
return ext;
}
/**
* Clear.
*/
@Override
public void clear() {
waveforms.clear();
childNodes.clear();
loaded = false;
}
/**
* Checks if is loaded.
*

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.13.0
Bundle-Version: 2.13.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.13.0</version>
<version>2.13.2</version>
<relativePath>../..</relativePath>
</parent>
<packaging>eclipse-plugin</packaging>

View File

@ -9,7 +9,7 @@ DesignBrowser_8=Insert before
LoadingWaveformDb_0=Database loading...
LoadStoreSettingsHandler_2=*.scview
LoadStoreSettingsHandler_3=SCViewer.scview
OpenHandler_0=*.vcd;*.vcd.gz;*.txdb;*.txdb.gz;*.txlog;*.fbrdb
OpenHandler_0=*.vcd;*.vcd.gz;*.txlog;*.txlog.gz;*.txdb;*.fbrdb
QuitHandler_0=Confirmation
QuitHandler_1=Do you want to exit?
RelationTypeToolControl_0=------------

View File

@ -3,6 +3,7 @@ package com.minres.scviewer.e4.application.parts;
import java.io.File;
import java.nio.file.FileSystems;
import java.nio.file.PathMatcher;
import java.text.DateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@ -229,6 +230,14 @@ public class FileBrowserDialog extends TrayDialog {
colSize.getColumn().setText("Size");
colSize.getColumn().addSelectionListener(getSelectionAdapter(colSize.getColumn(), 1));
TableViewerColumn colDate = new TableViewerColumn(tableViewer, SWT.RIGHT);
colDate.setLabelProvider(new FileTableLabelProvider() {
@Override public String getText(Object element) { return DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.MEDIUM).format(((File) element).lastModified()); }
});
colDate.getColumn().setWidth(200);
colDate.getColumn().setText("Modification Date");
colDate.getColumn().addSelectionListener(getSelectionAdapter(colDate.getColumn(), 2));
TableViewerColumn colEmpty = new TableViewerColumn(tableViewer, SWT.CENTER);
colEmpty.setLabelProvider(new FileTableLabelProvider() {
@Override public String getText(Object element) { return ""; }
@ -264,7 +273,7 @@ public class FileBrowserDialog extends TrayDialog {
tableViewer.setInput(selectedDir.listFiles());
}
});
sashForm.setWeights(new int[]{3, 3});
sashForm.setWeights(new int[]{2, 3});
return area;
}
@ -445,6 +454,9 @@ public class FileBrowserDialog extends TrayDialog {
case 1:
rc = Long.valueOf(p1.length()).compareTo(p2.length());
break;
case 2:
rc = Long.valueOf(p1.lastModified()).compareTo(p2.lastModified());
break;
default:
rc = 0;
}

View File

@ -570,6 +570,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
(result.isMultiStatus() && result.getChildren().length > 0 && result.getChildren()[0].getCode() != Status.OK_STATUS.getCode() ) ){
// kill editor and pop up warning for user
sync.asyncExec(() -> {
if(myParent.isDisposed()) return;
final Display display = myParent.getDisplay();
MessageDialog.openWarning(display.getActiveShell(), "Error loading database", "Database cannot be loaded. Aborting...");
ePartService.hidePart(myPart, true);
@ -612,7 +613,12 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
Map<String, String> state = new HashMap<>();
saveWaveformViewerState(state);
waveformPane.getStreamList().clear();
database.clear();
database = dbFactory.getDatabase();
database.addPropertyChangeListener(evt -> {
if (IHierNode.WAVEFORMS.equals(evt.getPropertyName())) { //$NON-NLS-1$
myParent.getDisplay().syncExec(() -> waveformPane.setMaxTime(database.getMaxTime()));
}
});
if (!filesToLoad.isEmpty())
loadDatabase(state, 0L);
}
@ -1026,27 +1032,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
* Sets the zoom fit.
*/
public void setZoomFit() {
//actual max time of signal
long maxTime = waveformPane.getMaxTime();
//get area actually capable of displaying data, i.e. area of the receiver which is capable of displaying data
Rectangle clientArea = myParent.getClientArea();
long clientAreaWidth = clientArea.width;
boolean foundZoom=false;
//try to find existing zoomlevel where scaleFactor*clientAreaWidth >= maxTime, if one is found set it as new zoomlevel
for (int level=0; level<Constants.UNIT_MULTIPLIER.length*Constants.UNIT_STRING.length; level++){
long scaleFactor = (long) Math.pow(10, level/2d);
if(level%2==1) scaleFactor*=3;
if(scaleFactor*clientAreaWidth >= maxTime) {
setZoomLevel(level);
foundZoom=true;
break;
}
}
//if no zoom level is found, set biggest one available
if(!foundZoom) setZoomLevel(Constants.UNIT_MULTIPLIER.length*Constants.UNIT_STRING.length-1);
waveformPane.setZoomLevel(-1);
updateAll();
}

View File

@ -52,9 +52,7 @@ public class TxDbContentProvider implements ITreeContentProvider {
*/
@Override
public Object[] getElements(Object inputElement) {
if(tableEntries && inputElement instanceof IWaveformDb){
return new Object[]{};
}else if(inputElement instanceof IHierNode){
if(inputElement instanceof IHierNode){
// make a copy as the laoder might continue to add waveforms
ArrayList<IHierNode> nodes = new ArrayList<>(((IHierNode)inputElement).getChildNodes());
return nodes.stream().filter(n ->

View File

@ -4,7 +4,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.13.0</version>
<version>2.13.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.13.0</version>
<version>2.13.2</version>
<packaging>pom</packaging>
<modules>
<module>releng/com.minres.scviewer.target</module>
@ -67,7 +67,7 @@
<artifact>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.target</artifactId>
<version>2.13.0</version>
<version>2.13.2</version>
</artifact>
</target>
<environments>

View File

@ -6,11 +6,11 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.13.0</version>
<version>2.13.2</version>
<relativePath>../..</relativePath>
</parent>
<artifactId>com.minres.scviewer.e4.product</artifactId>
<version>2.13.0</version>
<version>2.13.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="product" id="com.minres.scviewer.e4.application.product" application="org.eclipse.e4.ui.workbench.swt.E4Application" version="2.13.0" useFeatures="true" includeLaunchers="true">
<product name="SCViewer" uid="product" id="com.minres.scviewer.e4.application.product" application="org.eclipse.e4.ui.workbench.swt.E4Application" version="2.13.2" useFeatures="true" includeLaunchers="true">
<configIni use="default">
</configIni>

View File

@ -12,7 +12,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.13.0</version>
<version>2.13.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.13.0</version>
<version>2.13.2</version>
<relativePath>../..</relativePath>
</parent>
<build>

View File

@ -1 +0,0 @@
2018/11/03-15:38:59.715484 139851522529088Delete type=3 #1

View File

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