diff --git a/features/com.minres.scviewer.database.feature/pom.xml b/features/com.minres.scviewer.database.feature/pom.xml index ea25b11..582e79f 100644 --- a/features/com.minres.scviewer.database.feature/pom.xml +++ b/features/com.minres.scviewer.database.feature/pom.xml @@ -5,7 +5,7 @@ com.minres.scviewer com.minres.scviewer.parent - 2.13.0 + 2.13.1 ../.. 3.0.0-SNAPSHOT diff --git a/features/com.minres.scviewer.e4.feature/pom.xml b/features/com.minres.scviewer.e4.feature/pom.xml index d57ec1c..63aa6a4 100644 --- a/features/com.minres.scviewer.e4.feature/pom.xml +++ b/features/com.minres.scviewer.e4.feature/pom.xml @@ -5,7 +5,7 @@ com.minres.scviewer com.minres.scviewer.parent - 2.13.0 + 2.13.1 ../.. 1.1.0-SNAPSHOT diff --git a/features/com.minres.scviewer.e4.platform.feature/pom.xml b/features/com.minres.scviewer.e4.platform.feature/pom.xml index 5dbe3e1..a84ceb1 100644 --- a/features/com.minres.scviewer.e4.platform.feature/pom.xml +++ b/features/com.minres.scviewer.e4.platform.feature/pom.xml @@ -5,7 +5,7 @@ com.minres.scviewer com.minres.scviewer.parent - 2.13.0 + 2.13.1 ../.. 1.0.0-SNAPSHOT diff --git a/features/com.minres.scviewer.feature/pom.xml b/features/com.minres.scviewer.feature/pom.xml index ad64afc..0fe4e1c 100644 --- a/features/com.minres.scviewer.feature/pom.xml +++ b/features/com.minres.scviewer.feature/pom.xml @@ -5,7 +5,7 @@ com.minres.scviewer com.minres.scviewer.parent - 2.13.0 + 2.13.1 ../.. 1.1.0-SNAPSHOT diff --git a/features/com.minres.scviewer.ui.feature/pom.xml b/features/com.minres.scviewer.ui.feature/pom.xml index a39b1bc..17d4a97 100644 --- a/features/com.minres.scviewer.ui.feature/pom.xml +++ b/features/com.minres.scviewer.ui.feature/pom.xml @@ -5,7 +5,7 @@ com.minres.scviewer com.minres.scviewer.parent - 2.13.0 + 2.13.1 ../.. 1.1.0-SNAPSHOT diff --git a/plugins/com.minres.scviewer.database.sqlite/pom.xml b/plugins/com.minres.scviewer.database.sqlite/pom.xml index 5df3451..26100cf 100644 --- a/plugins/com.minres.scviewer.database.sqlite/pom.xml +++ b/plugins/com.minres.scviewer.database.sqlite/pom.xml @@ -4,7 +4,7 @@ com.minres.scviewer com.minres.scviewer.parent - 2.13.0 + 2.13.1 ../.. eclipse-plugin diff --git a/plugins/com.minres.scviewer.database.text/pom.xml b/plugins/com.minres.scviewer.database.text/pom.xml index d3971c3..57ba7cf 100644 --- a/plugins/com.minres.scviewer.database.text/pom.xml +++ b/plugins/com.minres.scviewer.database.text/pom.xml @@ -6,7 +6,7 @@ com.minres.scviewer com.minres.scviewer.parent - 2.13.0 + 2.13.1 ../.. eclipse-plugin diff --git a/plugins/com.minres.scviewer.database.ui.swt/pom.xml b/plugins/com.minres.scviewer.database.ui.swt/pom.xml index 836a34a..8c340d5 100644 --- a/plugins/com.minres.scviewer.database.ui.swt/pom.xml +++ b/plugins/com.minres.scviewer.database.ui.swt/pom.xml @@ -5,7 +5,7 @@ com.minres.scviewer com.minres.scviewer.parent - 2.13.0 + 2.13.1 ../.. 4.0.0-SNAPSHOT diff --git a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/ArrowPainter.java b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/ArrowPainter.java index 7a817d3..7243110 100644 --- a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/ArrowPainter.java +++ b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/ArrowPainter.java @@ -110,48 +110,23 @@ public class ArrowPainter implements IPainter { protected void deriveGeom(Collection relations, List 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; diff --git a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/WaveformCanvas.java b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/WaveformCanvas.java index e96ee6c..fe50833 100644 --- a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/WaveformCanvas.java +++ b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/WaveformCanvas.java @@ -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>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= maxTime) + return tempLevel; + } + magnitude_factor*=1000; + } + return -1; + } + public long getScaleFactor() { return scaleFactor; } diff --git a/plugins/com.minres.scviewer.database.vcd/pom.xml b/plugins/com.minres.scviewer.database.vcd/pom.xml index dfad617..509664b 100644 --- a/plugins/com.minres.scviewer.database.vcd/pom.xml +++ b/plugins/com.minres.scviewer.database.vcd/pom.xml @@ -5,7 +5,7 @@ com.minres.scviewer com.minres.scviewer.parent - 2.13.0 + 2.13.1 ../.. eclipse-plugin diff --git a/plugins/com.minres.scviewer.database/pom.xml b/plugins/com.minres.scviewer.database/pom.xml index ac9aa04..6892d64 100644 --- a/plugins/com.minres.scviewer.database/pom.xml +++ b/plugins/com.minres.scviewer.database/pom.xml @@ -4,7 +4,7 @@ com.minres.scviewer com.minres.scviewer.parent - 2.13.0 + 2.13.1 ../.. eclipse-plugin diff --git a/plugins/com.minres.scviewer.e4.application/META-INF/MANIFEST.MF b/plugins/com.minres.scviewer.e4.application/META-INF/MANIFEST.MF index b1d0326..5b4c51b 100644 --- a/plugins/com.minres.scviewer.e4.application/META-INF/MANIFEST.MF +++ b/plugins/com.minres.scviewer.e4.application/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Bundle-SymbolicName: com.minres.scviewer.e4.application;singleton:=true -Bundle-Version: 2.13.0 +Bundle-Version: 2.13.1 Bundle-Vendor: %Bundle-Vendor Require-Bundle: javax.inject;bundle-version="1.0.0", org.eclipse.core.runtime;bundle-version="3.11.1", diff --git a/plugins/com.minres.scviewer.e4.application/pom.xml b/plugins/com.minres.scviewer.e4.application/pom.xml index f81be42..d117c7f 100644 --- a/plugins/com.minres.scviewer.e4.application/pom.xml +++ b/plugins/com.minres.scviewer.e4.application/pom.xml @@ -6,7 +6,7 @@ com.minres.scviewer com.minres.scviewer.parent - 2.13.0 + 2.13.1 ../.. eclipse-plugin diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/WaveformViewer.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/WaveformViewer.java index 54e71b3..2a31471 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/WaveformViewer.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/WaveformViewer.java @@ -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); @@ -1026,27 +1027,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= 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(); } diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/provider/TxDbContentProvider.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/provider/TxDbContentProvider.java index 8be23c4..668cf08 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/provider/TxDbContentProvider.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/provider/TxDbContentProvider.java @@ -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 nodes = new ArrayList<>(((IHierNode)inputElement).getChildNodes()); return nodes.stream().filter(n -> diff --git a/plugins/com.minres.scviewer.ui/pom.xml b/plugins/com.minres.scviewer.ui/pom.xml index 79856d2..74947b5 100644 --- a/plugins/com.minres.scviewer.ui/pom.xml +++ b/plugins/com.minres.scviewer.ui/pom.xml @@ -4,7 +4,7 @@ com.minres.scviewer com.minres.scviewer.parent - 2.13.0 + 2.13.1 ../.. eclipse-plugin diff --git a/pom.xml b/pom.xml index ed8eb1e..419e72a 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.minres.scviewer com.minres.scviewer.parent - 2.13.0 + 2.13.1 pom releng/com.minres.scviewer.target @@ -67,7 +67,7 @@ com.minres.scviewer com.minres.scviewer.target - 2.13.0 + 2.13.1 diff --git a/products/com.minres.scviewer.e4.product/pom.xml b/products/com.minres.scviewer.e4.product/pom.xml index fea2e34..44b9d34 100644 --- a/products/com.minres.scviewer.e4.product/pom.xml +++ b/products/com.minres.scviewer.e4.product/pom.xml @@ -6,11 +6,11 @@ com.minres.scviewer com.minres.scviewer.parent - 2.13.0 + 2.13.1 ../.. com.minres.scviewer.e4.product - 2.13.0 + 2.13.1 eclipse-repository com.minres.scviewer diff --git a/products/com.minres.scviewer.e4.product/scviewer.product b/products/com.minres.scviewer.e4.product/scviewer.product index b35d3c8..0358f2f 100644 --- a/products/com.minres.scviewer.e4.product/scviewer.product +++ b/products/com.minres.scviewer.e4.product/scviewer.product @@ -1,7 +1,7 @@ - + diff --git a/releng/com.minres.scviewer.target/pom.xml b/releng/com.minres.scviewer.target/pom.xml index 0edf361..6cc98a7 100644 --- a/releng/com.minres.scviewer.target/pom.xml +++ b/releng/com.minres.scviewer.target/pom.xml @@ -12,7 +12,7 @@ com.minres.scviewer com.minres.scviewer.parent - 2.13.0 + 2.13.1 ../.. diff --git a/releng/com.minres.scviewer.updateSite/pom.xml b/releng/com.minres.scviewer.updateSite/pom.xml index 131bd9c..067246e 100644 --- a/releng/com.minres.scviewer.updateSite/pom.xml +++ b/releng/com.minres.scviewer.updateSite/pom.xml @@ -7,7 +7,7 @@ com.minres.scviewer com.minres.scviewer.parent - 2.13.0 + 2.13.1 ../.. diff --git a/tests/com.minres.scviewer.database.test/inputs/my_ldb.txldb/000005.sst b/tests/com.minres.scviewer.database.test/inputs/my_ldb.txldb/000005.sst deleted file mode 100644 index 425b1dd..0000000 Binary files a/tests/com.minres.scviewer.database.test/inputs/my_ldb.txldb/000005.sst and /dev/null differ diff --git a/tests/com.minres.scviewer.database.test/inputs/my_ldb.txldb/000046.log b/tests/com.minres.scviewer.database.test/inputs/my_ldb.txldb/000046.log deleted file mode 100644 index 9e0f96a..0000000 Binary files a/tests/com.minres.scviewer.database.test/inputs/my_ldb.txldb/000046.log and /dev/null differ diff --git a/tests/com.minres.scviewer.database.test/inputs/my_ldb.txldb/CURRENT b/tests/com.minres.scviewer.database.test/inputs/my_ldb.txldb/CURRENT deleted file mode 100644 index 800d995..0000000 --- a/tests/com.minres.scviewer.database.test/inputs/my_ldb.txldb/CURRENT +++ /dev/null @@ -1 +0,0 @@ -MANIFEST-000045 diff --git a/tests/com.minres.scviewer.database.test/inputs/my_ldb.txldb/LOCK b/tests/com.minres.scviewer.database.test/inputs/my_ldb.txldb/LOCK deleted file mode 100644 index e69de29..0000000 diff --git a/tests/com.minres.scviewer.database.test/inputs/my_ldb.txldb/LOG b/tests/com.minres.scviewer.database.test/inputs/my_ldb.txldb/LOG deleted file mode 100644 index 742e653..0000000 --- a/tests/com.minres.scviewer.database.test/inputs/my_ldb.txldb/LOG +++ /dev/null @@ -1 +0,0 @@ -2018/11/03-15:38:59.715484 139851522529088Delete type=3 #1 diff --git a/tests/com.minres.scviewer.database.test/inputs/my_ldb.txldb/MANIFEST-000045 b/tests/com.minres.scviewer.database.test/inputs/my_ldb.txldb/MANIFEST-000045 deleted file mode 100644 index 0f6af62..0000000 Binary files a/tests/com.minres.scviewer.database.test/inputs/my_ldb.txldb/MANIFEST-000045 and /dev/null differ diff --git a/tests/com.minres.scviewer.database.test/pom.xml b/tests/com.minres.scviewer.database.test/pom.xml index 9058cff..d5b3043 100644 --- a/tests/com.minres.scviewer.database.test/pom.xml +++ b/tests/com.minres.scviewer.database.test/pom.xml @@ -6,7 +6,7 @@ com.minres.scviewer com.minres.scviewer.parent - 2.13.0 + 2.13.1 ../.. eclipse-test-plugin