Merge branch 'release/2.14.0'
This commit is contained in:
commit
bad34dd1d1
17
.project
17
.project
|
@ -1,17 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<projectDescription>
|
|
||||||
<name>com.minres.scviewer.parent</name>
|
|
||||||
<comment></comment>
|
|
||||||
<projects>
|
|
||||||
</projects>
|
|
||||||
<buildSpec>
|
|
||||||
<buildCommand>
|
|
||||||
<name>org.eclipse.m2e.core.maven2Builder</name>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
</buildCommand>
|
|
||||||
</buildSpec>
|
|
||||||
<natures>
|
|
||||||
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
|
||||||
</natures>
|
|
||||||
</projectDescription>
|
|
|
@ -18,9 +18,7 @@ The viewer has the following features
|
||||||
- sqlite based
|
- sqlite based
|
||||||
- visualization of transaction relations
|
- visualization of transaction relations
|
||||||
|
|
||||||
To build the plugins the Eclipse SDK or PDE can be used. In both cases the Groovy
|
To build the plugins the Eclipse SDK or PDE can be used.
|
||||||
eclipse plugin (http://groovy.codehaus.org/Eclipse+Plugin or Market) has to be
|
|
||||||
installed.
|
|
||||||
|
|
||||||
Key Shortcuts
|
Key Shortcuts
|
||||||
=============
|
=============
|
||||||
|
|
|
@ -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.13.2</version>
|
<version>2.14.0</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.13.2</version>
|
<version>2.14.0</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.13.2</version>
|
<version>2.14.0</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.13.2</version>
|
<version>2.14.0</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.13.2</version>
|
<version>2.14.0</version>
|
||||||
<relativePath>../../..</relativePath>
|
<relativePath>../../..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<version>1.1.0-SNAPSHOT</version>
|
<version>1.1.0-SNAPSHOT</version>
|
||||||
|
|
|
@ -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.13.2</version>
|
<version>2.14.0</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.13.2</version>
|
<version>2.14.0</version>
|
||||||
<relativePath>../../..</relativePath>
|
<relativePath>../../..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<packaging>eclipse-plugin</packaging>
|
<packaging>eclipse-plugin</packaging>
|
||||||
|
|
|
@ -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.13.2</version>
|
<version>2.14.0</version>
|
||||||
<relativePath>../../..</relativePath>
|
<relativePath>../../..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<version>4.0.0-SNAPSHOT</version>
|
<version>4.0.0-SNAPSHOT</version>
|
||||||
|
|
|
@ -180,7 +180,13 @@ public class WaveformCanvas extends Canvas {
|
||||||
|
|
||||||
public void setZoomLevel(int level, long centerTime) {
|
public void setZoomLevel(int level, long centerTime) {
|
||||||
if(level<0) {
|
if(level<0) {
|
||||||
level = findFitZoomLevel();
|
if(level<-1) {
|
||||||
|
long cTime = getCursorPainters().get(0).getTime();
|
||||||
|
long time_diff = centerTime>cTime?centerTime-cTime:cTime-centerTime;
|
||||||
|
level = findFitZoomLevel(time_diff);
|
||||||
|
centerTime = (centerTime>cTime?cTime:centerTime)+time_diff/2;
|
||||||
|
} else
|
||||||
|
level = findFitZoomLevel(maxTime);
|
||||||
if(level<0) level = 0;
|
if(level<0) level = 0;
|
||||||
}
|
}
|
||||||
//FIXME: keep center if zoom-out and cursor is not in view
|
//FIXME: keep center if zoom-out and cursor is not in view
|
||||||
|
@ -211,7 +217,7 @@ public class WaveformCanvas extends Canvas {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private int findFitZoomLevel() {
|
private int findFitZoomLevel(long timeRange) {
|
||||||
//get area actually capable of displaying data, i.e. area of the receiver which is capable of displaying data
|
//get area actually capable of displaying data, i.e. area of the receiver which is capable of displaying data
|
||||||
Rectangle clientArea = getClientArea();
|
Rectangle clientArea = getClientArea();
|
||||||
long clientAreaWidth = clientArea.width;
|
long clientAreaWidth = clientArea.width;
|
||||||
|
@ -221,7 +227,7 @@ public class WaveformCanvas extends Canvas {
|
||||||
for (int multiplier=0; multiplier<Constants.UNIT_MULTIPLIER.length; multiplier++){
|
for (int multiplier=0; multiplier<Constants.UNIT_MULTIPLIER.length; multiplier++){
|
||||||
int tempLevel = magnitude*Constants.UNIT_MULTIPLIER.length+multiplier;
|
int tempLevel = magnitude*Constants.UNIT_MULTIPLIER.length+multiplier;
|
||||||
long scaleFactor = Constants.UNIT_MULTIPLIER[multiplier]*magnitude_factor;
|
long scaleFactor = Constants.UNIT_MULTIPLIER[multiplier]*magnitude_factor;
|
||||||
if(scaleFactor*clientAreaWidth >= maxTime)
|
if(scaleFactor*clientAreaWidth >= timeRange)
|
||||||
return tempLevel;
|
return tempLevel;
|
||||||
}
|
}
|
||||||
magnitude_factor*=1000;
|
magnitude_factor*=1000;
|
||||||
|
|
|
@ -125,6 +125,12 @@ public class WaveformView implements IWaveformView {
|
||||||
|
|
||||||
protected ObservableList<TrackEntry> streams;
|
protected ObservableList<TrackEntry> streams;
|
||||||
|
|
||||||
|
private boolean waveformsContainTx=false;
|
||||||
|
|
||||||
|
public boolean isWaveformsContainTx() {
|
||||||
|
return waveformsContainTx;
|
||||||
|
}
|
||||||
|
|
||||||
int selectedMarker = 0;
|
int selectedMarker = 0;
|
||||||
|
|
||||||
private int tracksVerticalHeight;
|
private int tracksVerticalHeight;
|
||||||
|
@ -515,6 +521,7 @@ public class WaveformView implements IWaveformView {
|
||||||
boolean even = true;
|
boolean even = true;
|
||||||
TextLayout tl = new TextLayout(waveformCanvas.getDisplay());
|
TextLayout tl = new TextLayout(waveformCanvas.getDisplay());
|
||||||
tl.setFont(styleProvider.getNameFont());
|
tl.setFont(styleProvider.getNameFont());
|
||||||
|
waveformsContainTx=false;
|
||||||
for (TrackEntry streamEntry : streams) {
|
for (TrackEntry streamEntry : streams) {
|
||||||
streamEntry.height = styleProvider.getTrackHeight();
|
streamEntry.height = styleProvider.getTrackHeight();
|
||||||
streamEntry.vOffset = tracksVerticalHeight;
|
streamEntry.vOffset = tracksVerticalHeight;
|
||||||
|
@ -522,6 +529,7 @@ public class WaveformView implements IWaveformView {
|
||||||
streamEntry.currentValue = "";
|
streamEntry.currentValue = "";
|
||||||
streamEntry.height *= streamEntry.waveform.getRowCount();
|
streamEntry.height *= streamEntry.waveform.getRowCount();
|
||||||
painter = new StreamPainter(waveformCanvas, even, streamEntry);
|
painter = new StreamPainter(waveformCanvas, even, streamEntry);
|
||||||
|
waveformsContainTx=true;
|
||||||
} else if (streamEntry.waveform.getType() == WaveformType.SIGNAL) {
|
} else if (streamEntry.waveform.getType() == WaveformType.SIGNAL) {
|
||||||
streamEntry.currentValue = "---";
|
streamEntry.currentValue = "---";
|
||||||
painter = new SignalPainter(waveformCanvas, even, streamEntry);
|
painter = new SignalPainter(waveformCanvas, even, streamEntry);
|
||||||
|
@ -1147,8 +1155,12 @@ public class WaveformView implements IWaveformView {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void setZoomLevel(int scale) {
|
public void setZoomLevel(int scale) {
|
||||||
waveformCanvas.setZoomLevel(scale);
|
if(scale<-1) {
|
||||||
waveformCanvas.reveal(getCursorTime());
|
waveformCanvas.setZoomLevel(scale, getMarkerTime(selectedMarker));
|
||||||
|
} else {
|
||||||
|
waveformCanvas.setZoomLevel(scale);
|
||||||
|
waveformCanvas.reveal(getCursorTime());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1554,14 +1566,4 @@ public class WaveformView implements IWaveformView {
|
||||||
getStreamList().add(idx, e);
|
getStreamList().add(idx, e);
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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.13.2</version>
|
<version>2.14.0</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.13.2</version>
|
<version>2.14.0</version>
|
||||||
<relativePath>../../..</relativePath>
|
<relativePath>../../..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<packaging>eclipse-plugin</packaging>
|
<packaging>eclipse-plugin</packaging>
|
||||||
|
|
|
@ -102,19 +102,25 @@
|
||||||
</children>
|
</children>
|
||||||
</children>
|
</children>
|
||||||
<children xsi:type="menu:ToolBar" xmi:id="_oQdMUHcqEeWwZ-9vrAR2UQ" elementId="com.minres.scviewer.e4.application.toolbar.1">
|
<children xsi:type="menu:ToolBar" xmi:id="_oQdMUHcqEeWwZ-9vrAR2UQ" elementId="com.minres.scviewer.e4.application.toolbar.1">
|
||||||
<children xsi:type="menu:HandledToolItem" xmi:id="_5DrGQHf4EeWwZ-9vrAR2UQ" elementId="com.minres.scviewer.e4.application.handledtoolitem.zoomfit" label="Zoom out" iconURI="platform:/plugin/com.minres.scviewer.e4.application/icons/magnifier.png" tooltip="Restore default zoom level" command="_693GoHcqEeWwZ-9vrAR2UQ">
|
<children xsi:type="menu:HandledToolItem" xmi:id="_LFGfsEZEEeyKK_icsY7Xjg" elementId="com.minres.scviewer.e4.application.handledtoolitem.zoomfull" label="Zoom full" iconURI="platform:/plugin/com.minres.scviewer.e4.application/icons/zoom_full.png" tooltip="Zoom full range" command="_693GoHcqEeWwZ-9vrAR2UQ">
|
||||||
<parameters xmi:id="_5DrGQXf4EeWwZ-9vrAR2UQ" elementId="com.minres.scviewer.e4.application.parameter.14" name="com.minres.scviewer.e4.application.command.zoomcommand.parameter.level" value="fit"/>
|
<parameters xmi:id="_LFGfsUZEEeyKK_icsY7Xjg" elementId="com.minres.scviewer.e4.application.parameter.full" name="com.minres.scviewer.e4.application.command.zoomcommand.parameter.level" value="full"/>
|
||||||
|
</children>
|
||||||
|
<children xsi:type="menu:HandledToolItem" xmi:id="_5DrGQHf4EeWwZ-9vrAR2UQ" elementId="com.minres.scviewer.e4.application.handledtoolitem.zoomfit" label="Zoom fit" iconURI="platform:/plugin/com.minres.scviewer.e4.application/icons/zoom_fit.png" tooltip="Zoom between cursor and marker" command="_693GoHcqEeWwZ-9vrAR2UQ">
|
||||||
|
<parameters xmi:id="_5DrGQXf4EeWwZ-9vrAR2UQ" elementId="com.minres.scviewer.e4.application.parameter.fit" name="com.minres.scviewer.e4.application.command.zoomcommand.parameter.level" value="fit"/>
|
||||||
</children>
|
</children>
|
||||||
<children xsi:type="menu:ToolBarSeparator" xmi:id="_p1AvUHcqEeWwZ-9vrAR2UQ" elementId="com.minres.scviewer.e4.application.toolbarseparator.1"/>
|
<children xsi:type="menu:ToolBarSeparator" xmi:id="_p1AvUHcqEeWwZ-9vrAR2UQ" elementId="com.minres.scviewer.e4.application.toolbarseparator.1"/>
|
||||||
<children xsi:type="menu:HandledToolItem" xmi:id="_XMQPAHcrEeWwZ-9vrAR2UQ" elementId="com.minres.scviewer.e4.application.handledtoolitem.zoomin" label="Zoom in" iconURI="platform:/plugin/com.minres.scviewer.e4.application/icons/magnifier_zoom_in.png" tooltip="Zoom in by a factor of 3" command="_693GoHcqEeWwZ-9vrAR2UQ">
|
<children xsi:type="menu:HandledToolItem" xmi:id="_XMQPAHcrEeWwZ-9vrAR2UQ" elementId="com.minres.scviewer.e4.application.handledtoolitem.zoomin" label="Zoom in" iconURI="platform:/plugin/com.minres.scviewer.e4.application/icons/magnifier_zoom_in.png" tooltip="Zoom in by a factor of 3" command="_693GoHcqEeWwZ-9vrAR2UQ">
|
||||||
<parameters xmi:id="_fi5w4HcrEeWwZ-9vrAR2UQ" elementId="com.minres.scviewer.e4.application.parameter.15" name="com.minres.scviewer.e4.application.command.zoomcommand.parameter.level" value="in"/>
|
<parameters xmi:id="_fi5w4HcrEeWwZ-9vrAR2UQ" elementId="com.minres.scviewer.e4.application.parameter.in" name="com.minres.scviewer.e4.application.command.zoomcommand.parameter.level" value="in"/>
|
||||||
</children>
|
</children>
|
||||||
<children xsi:type="menu:HandledToolItem" xmi:id="_XqTc8HcrEeWwZ-9vrAR2UQ" elementId="com.minres.scviewer.e4.application.handledtoolitem.zoomout" label="Zoom out" iconURI="platform:/plugin/com.minres.scviewer.e4.application/icons/magifier_zoom_out.png" tooltip="Zoom out by a factor of 3" command="_693GoHcqEeWwZ-9vrAR2UQ">
|
<children xsi:type="menu:HandledToolItem" xmi:id="_XqTc8HcrEeWwZ-9vrAR2UQ" elementId="com.minres.scviewer.e4.application.handledtoolitem.zoomout" label="Zoom out" iconURI="platform:/plugin/com.minres.scviewer.e4.application/icons/magifier_zoom_out.png" tooltip="Zoom out by a factor of 3" command="_693GoHcqEeWwZ-9vrAR2UQ">
|
||||||
<parameters xmi:id="_d7OBYHcrEeWwZ-9vrAR2UQ" elementId="com.minres.scviewer.e4.application.parameter.14" name="com.minres.scviewer.e4.application.command.zoomcommand.parameter.level" value="out"/>
|
<parameters xmi:id="_d7OBYHcrEeWwZ-9vrAR2UQ" elementId="com.minres.scviewer.e4.application.parameter.out" name="com.minres.scviewer.e4.application.command.zoomcommand.parameter.level" value="out"/>
|
||||||
</children>
|
</children>
|
||||||
</children>
|
</children>
|
||||||
<children xsi:type="menu:ToolBar" xmi:id="_fwn8wGtTEeqmlpoaaMHoiw" elementId="com.minres.scviewer.e4.application.toolbar.2">
|
<children xsi:type="menu:ToolBar" xmi:id="_fwn8wGtTEeqmlpoaaMHoiw" elementId="com.minres.scviewer.e4.application.toolbar.2">
|
||||||
<children xsi:type="menu:HandledToolItem" xmi:id="_j-XIgGtTEeqmlpoaaMHoiw" elementId="com.minres.scviewer.e4.application.handledtoolitem.hover" label="Hover" iconURI="platform:/plugin/com.minres.scviewer.e4.application/icons/lightbulb.png" tooltip="Enable hover window in waveform" selected="true" type="Check" command="_uyeyYGtTEeqmlpoaaMHoiw">
|
<children xsi:type="menu:HandledToolItem" xmi:id="_j-XIgGtTEeqmlpoaaMHoiw" elementId="com.minres.scviewer.e4.application.handledtoolitem.txdetails" label="TX Details" iconURI="platform:/plugin/com.minres.scviewer.e4.application/icons/application_side_expand.png" tooltip="Show tx details parts" selected="true" type="Check" command="_Fj1gQEYoEeyKK_icsY7Xjg">
|
||||||
|
<tags>EnableTxDetails</tags>
|
||||||
|
</children>
|
||||||
|
<children xsi:type="menu:HandledToolItem" xmi:id="_33tugEYnEeyKK_icsY7Xjg" elementId="com.minres.scviewer.e4.application.handledtoolitem.hover" label="Hover" iconURI="platform:/plugin/com.minres.scviewer.e4.application/icons/lightbulb.png" tooltip="Enable hover window in waveform" selected="true" type="Check" command="_uyeyYGtTEeqmlpoaaMHoiw">
|
||||||
<tags>EnableHover</tags>
|
<tags>EnableHover</tags>
|
||||||
</children>
|
</children>
|
||||||
</children>
|
</children>
|
||||||
|
@ -137,11 +143,12 @@
|
||||||
<handlers xmi:id="_UUnX8IoNEeWxJ_wPkM6yGQ" elementId="com.minres.scviewer.e4.application.handler.set_them" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.ThemeSetHandler" command="_KlGlsIoNEeWxJ_wPkM6yGQ"/>
|
<handlers xmi:id="_UUnX8IoNEeWxJ_wPkM6yGQ" elementId="com.minres.scviewer.e4.application.handler.set_them" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.ThemeSetHandler" command="_KlGlsIoNEeWxJ_wPkM6yGQ"/>
|
||||||
<handlers xmi:id="_V4EscIuGEeWid7xO48ZBXw" elementId="com.minres.scviewer.e4.application.handler.setreleationtype" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.SetRelationTypeHandler" command="_E9lUgIt2EeWid7xO48ZBXw"/>
|
<handlers xmi:id="_V4EscIuGEeWid7xO48ZBXw" elementId="com.minres.scviewer.e4.application.handler.setreleationtype" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.SetRelationTypeHandler" command="_E9lUgIt2EeWid7xO48ZBXw"/>
|
||||||
<handlers xmi:id="__99WoJebEeW09eyIbHsdvg" elementId="com.minres.scviewer.e4.application.handler.loadStoreSettings" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.LoadStoreSettingsHandler" command="_7-AIMJebEeW09eyIbHsdvg"/>
|
<handlers xmi:id="__99WoJebEeW09eyIbHsdvg" elementId="com.minres.scviewer.e4.application.handler.loadStoreSettings" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.LoadStoreSettingsHandler" command="_7-AIMJebEeW09eyIbHsdvg"/>
|
||||||
<handlers xmi:id="_x4pSEGtTEeqmlpoaaMHoiw" elementId="com.minres.scviewer.e4.application.handler.0" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.EnableHover" command="_uyeyYGtTEeqmlpoaaMHoiw"/>
|
<handlers xmi:id="_x4pSEGtTEeqmlpoaaMHoiw" elementId="com.minres.scviewer.e4.application.handler.enablehover" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.EnableHover" command="_uyeyYGtTEeqmlpoaaMHoiw"/>
|
||||||
<handlers xmi:id="_h3jU8BkWEeudD5MqrWoETQ" elementId="com.minres.scviewer.e4.application.handler.reloadCommand" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.ReloadHandler" command="_srACsBkREeudD5MqrWoETQ"/>
|
<handlers xmi:id="_h3jU8BkWEeudD5MqrWoETQ" elementId="com.minres.scviewer.e4.application.handler.reloadCommand" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.ReloadHandler" command="_srACsBkREeudD5MqrWoETQ"/>
|
||||||
<handlers xmi:id="_gn_boBlEEeuiP60JNw0iiA" elementId="com.minres.scviewer.e4.application.handler.txSearch" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.SearchHandler" command="_XDxTYBlEEeuiP60JNw0iiA"/>
|
<handlers xmi:id="_gn_boBlEEeuiP60JNw0iiA" elementId="com.minres.scviewer.e4.application.handler.txSearch" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.SearchHandler" command="_XDxTYBlEEeuiP60JNw0iiA"/>
|
||||||
<handlers xmi:id="_CCEtAB07EeuiP60JNw0iiA" elementId="com.minres.scviewer.e4.application.handler.update" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.UpdateHandler" command="_-9ED4B06EeuiP60JNw0iiA"/>
|
<handlers xmi:id="_CCEtAB07EeuiP60JNw0iiA" elementId="com.minres.scviewer.e4.application.handler.update" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.UpdateHandler" command="_-9ED4B06EeuiP60JNw0iiA"/>
|
||||||
<handlers xmi:id="_ru2NIEYEEeyPM8G0E2EYww" elementId="com.minres.scviewer.e4.application.handler.helpCommand" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.HelpHandler" command="_lqjIYEYEEeyPM8G0E2EYww"/>
|
<handlers xmi:id="_ru2NIEYEEeyPM8G0E2EYww" elementId="com.minres.scviewer.e4.application.handler.helpCommand" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.HelpHandler" command="_lqjIYEYEEeyPM8G0E2EYww"/>
|
||||||
|
<handlers xmi:id="_TwU0IEYoEeyKK_icsY7Xjg" elementId="com.minres.scviewer.e4.application.handler.enabletxdetails" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.EnableTxDetails" command="_Fj1gQEYoEeyKK_icsY7Xjg"/>
|
||||||
<bindingTables xmi:id="_95PfvnNmEeWBq8z1Dv39LA" bindingContext="_95PfuXNmEeWBq8z1Dv39LA">
|
<bindingTables xmi:id="_95PfvnNmEeWBq8z1Dv39LA" bindingContext="_95PfuXNmEeWBq8z1Dv39LA">
|
||||||
<bindings xmi:id="_95Pfv3NmEeWBq8z1Dv39LA" elementId="com.minres.scviewer.e4.application.keybinding.quit" keySequence="M1+Q" command="_95PfvHNmEeWBq8z1Dv39LA">
|
<bindings xmi:id="_95Pfv3NmEeWBq8z1Dv39LA" elementId="com.minres.scviewer.e4.application.keybinding.quit" keySequence="M1+Q" command="_95PfvHNmEeWBq8z1Dv39LA">
|
||||||
<tags>type:user</tags>
|
<tags>type:user</tags>
|
||||||
|
@ -284,6 +291,7 @@
|
||||||
<commands xmi:id="_XDxTYBlEEeuiP60JNw0iiA" elementId="com.minres.scviewer.e4.application.txSearch" commandName="Search Command"/>
|
<commands xmi:id="_XDxTYBlEEeuiP60JNw0iiA" elementId="com.minres.scviewer.e4.application.txSearch" commandName="Search Command"/>
|
||||||
<commands xmi:id="_-9ED4B06EeuiP60JNw0iiA" elementId="com.minres.scviewer.e4.application.command.update" commandName="Update"/>
|
<commands xmi:id="_-9ED4B06EeuiP60JNw0iiA" elementId="com.minres.scviewer.e4.application.command.update" commandName="Update"/>
|
||||||
<commands xmi:id="_lqjIYEYEEeyPM8G0E2EYww" elementId="org.eclipse.ui.help.helpAction" commandName="Help Command"/>
|
<commands xmi:id="_lqjIYEYEEeyPM8G0E2EYww" elementId="org.eclipse.ui.help.helpAction" commandName="Help Command"/>
|
||||||
|
<commands xmi:id="_Fj1gQEYoEeyKK_icsY7Xjg" elementId="com.minres.scviewer.e4.application.command.enabletxdetails" commandName="Enable Tx Details" description="Show tx details parts"/>
|
||||||
<addons xmi:id="_95PfsnNmEeWBq8z1Dv39LA" elementId="org.eclipse.e4.core.commands.service" contributionURI="bundleclass://org.eclipse.e4.core.commands/org.eclipse.e4.core.commands.CommandServiceAddon"/>
|
<addons xmi:id="_95PfsnNmEeWBq8z1Dv39LA" elementId="org.eclipse.e4.core.commands.service" contributionURI="bundleclass://org.eclipse.e4.core.commands/org.eclipse.e4.core.commands.CommandServiceAddon"/>
|
||||||
<addons xmi:id="_95Pfs3NmEeWBq8z1Dv39LA" elementId="org.eclipse.e4.ui.contexts.service" contributionURI="bundleclass://org.eclipse.e4.ui.services/org.eclipse.e4.ui.services.ContextServiceAddon"/>
|
<addons xmi:id="_95Pfs3NmEeWBq8z1Dv39LA" elementId="org.eclipse.e4.ui.contexts.service" contributionURI="bundleclass://org.eclipse.e4.ui.services/org.eclipse.e4.ui.services.ContextServiceAddon"/>
|
||||||
<addons xmi:id="_95PftHNmEeWBq8z1Dv39LA" elementId="org.eclipse.e4.ui.bindings.service" contributionURI="bundleclass://org.eclipse.e4.ui.bindings/org.eclipse.e4.ui.bindings.BindingServiceAddon"/>
|
<addons xmi:id="_95PftHNmEeWBq8z1Dv39LA" elementId="org.eclipse.e4.ui.bindings.service" contributionURI="bundleclass://org.eclipse.e4.ui.bindings/org.eclipse.e4.ui.bindings.BindingServiceAddon"/>
|
||||||
|
|
|
@ -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.13.2
|
Bundle-Version: 2.14.0
|
||||||
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",
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 547 B |
Binary file not shown.
After Width: | Height: | Size: 581 B |
Binary file not shown.
After Width: | Height: | Size: 6.0 KiB |
Binary file not shown.
After Width: | Height: | Size: 6.2 KiB |
|
@ -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.13.2</version>
|
<version>2.14.0</version>
|
||||||
<relativePath>../../..</relativePath>
|
<relativePath>../../..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<packaging>eclipse-plugin</packaging>
|
<packaging>eclipse-plugin</packaging>
|
||||||
|
|
|
@ -24,6 +24,7 @@ public class Messages extends NLS {
|
||||||
public static String SCViewerPreferencesPage_0;
|
public static String SCViewerPreferencesPage_0;
|
||||||
public static String SCViewerPreferencesPage_1;
|
public static String SCViewerPreferencesPage_1;
|
||||||
public static String SCViewerPreferencesPage_2;
|
public static String SCViewerPreferencesPage_2;
|
||||||
|
public static String SCViewerPreferencesPage_3;
|
||||||
public static String StatusBarControl_1;
|
public static String StatusBarControl_1;
|
||||||
public static String StatusBarControl_2;
|
public static String StatusBarControl_2;
|
||||||
public static String StatusBarControl_3;
|
public static String StatusBarControl_3;
|
||||||
|
@ -82,6 +83,14 @@ public class Messages extends NLS {
|
||||||
public static String cursor;
|
public static String cursor;
|
||||||
public static String cursor_drag;
|
public static String cursor_drag;
|
||||||
public static String cursor_text;
|
public static String cursor_text;
|
||||||
|
public static String HelpDialog_0;
|
||||||
|
public static String HelpDialog_1;
|
||||||
|
public static String HelpDialog_2;
|
||||||
|
public static String HelpDialog_3;
|
||||||
|
public static String HelpDialog_4;
|
||||||
|
public static String HelpDialog_5;
|
||||||
|
public static String HelpDialog_6;
|
||||||
|
public static String HelpDialog_7;
|
||||||
public static String marker;
|
public static String marker;
|
||||||
public static String marker_text;
|
public static String marker_text;
|
||||||
public static String rel_arrow;
|
public static String rel_arrow;
|
||||||
|
|
|
@ -0,0 +1,57 @@
|
||||||
|
|
||||||
|
package com.minres.scviewer.e4.application.handlers;
|
||||||
|
|
||||||
|
import java.util.LinkedList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.inject.Inject;
|
||||||
|
|
||||||
|
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
|
||||||
|
import org.eclipse.e4.core.di.annotations.Execute;
|
||||||
|
import org.eclipse.e4.core.di.annotations.Optional;
|
||||||
|
import org.eclipse.e4.core.di.extensions.Preference;
|
||||||
|
import org.eclipse.e4.ui.model.application.MApplication;
|
||||||
|
import org.eclipse.e4.ui.model.application.ui.menu.MHandledItem;
|
||||||
|
import org.eclipse.e4.ui.workbench.modeling.EModelService;
|
||||||
|
import org.eclipse.e4.ui.workbench.modeling.EPartService;
|
||||||
|
import org.osgi.service.prefs.BackingStoreException;
|
||||||
|
|
||||||
|
import com.minres.scviewer.e4.application.preferences.PreferenceConstants;
|
||||||
|
|
||||||
|
@SuppressWarnings("restriction")
|
||||||
|
public class EnableTxDetails {
|
||||||
|
static final String TAG_NAME = "EnableTxDetails"; //$NON-NLS-1$
|
||||||
|
|
||||||
|
static final String ICON_DISABLED = "platform:/plugin/com.minres.scviewer.e4.application/icons/application_side_expand.png"; //$NON-NLS-1$
|
||||||
|
static final String ICON_ENABLED = "platform:/plugin/com.minres.scviewer.e4.application/icons/application_side_contract.png"; //$NON-NLS-1$
|
||||||
|
static final String TOOLTIP_DISABLED = "Show tx details parts";
|
||||||
|
static final String TOOLTIP_ENABLED = "Hide tx details parts";
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
MApplication application;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
EPartService partService;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
@Optional
|
||||||
|
public void reactOnShowHoverChange(EModelService modelService, @Preference(value = PreferenceConstants.SHOW_TX_DETAILS) Boolean show) {
|
||||||
|
List<String> tags = new LinkedList<>();
|
||||||
|
tags.add(TAG_NAME);
|
||||||
|
List<MHandledItem> elements = modelService.findElements(application, null, MHandledItem.class, tags );
|
||||||
|
for( MHandledItem hi : elements ){
|
||||||
|
hi.setSelected(show);
|
||||||
|
hi.setIconURI(show?ICON_ENABLED:ICON_DISABLED);
|
||||||
|
hi.setTooltip(show?TOOLTIP_ENABLED:TOOLTIP_DISABLED);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Execute
|
||||||
|
public void execute(MHandledItem handledItem, @Preference(nodePath = PreferenceConstants.PREFERENCES_SCOPE) IEclipsePreferences prefs ) {
|
||||||
|
try {
|
||||||
|
prefs.putBoolean(PreferenceConstants.SHOW_TX_DETAILS, handledItem.isSelected());
|
||||||
|
prefs.flush();
|
||||||
|
} catch (BackingStoreException e) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -42,6 +42,8 @@ public class ZoomHandler {
|
||||||
waveformViewerPart.setZoomLevel(zoomLevel+1);
|
waveformViewerPart.setZoomLevel(zoomLevel+1);
|
||||||
else if("fit".equalsIgnoreCase(level)) //$NON-NLS-1$
|
else if("fit".equalsIgnoreCase(level)) //$NON-NLS-1$
|
||||||
waveformViewerPart.setZoomFit();
|
waveformViewerPart.setZoomFit();
|
||||||
|
else if("full".equalsIgnoreCase(level)) //$NON-NLS-1$
|
||||||
|
waveformViewerPart.setZoomFull();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,7 @@ ResourceManager_0=Wrong decorate corner
|
||||||
SCViewerPreferencesPage_0=Check for changed database
|
SCViewerPreferencesPage_0=Check for changed database
|
||||||
SCViewerPreferencesPage_1=Show hover window in waveform
|
SCViewerPreferencesPage_1=Show hover window in waveform
|
||||||
SCViewerPreferencesPage_2=Waveform track height
|
SCViewerPreferencesPage_2=Waveform track height
|
||||||
|
SCViewerPreferencesPage_3=Show tx details in waveform
|
||||||
StatusBarControl_1=Currently running:
|
StatusBarControl_1=Currently running:
|
||||||
StatusBarControl_2=\nLast task:
|
StatusBarControl_2=\nLast task:
|
||||||
StatusBarControl_3=Currently running:
|
StatusBarControl_3=Currently running:
|
||||||
|
@ -76,6 +77,14 @@ signal_nan=Signal NaN Value
|
||||||
cursor=Cursor
|
cursor=Cursor
|
||||||
cursor_drag=dragged Cursor
|
cursor_drag=dragged Cursor
|
||||||
cursor_text=Cursor Text
|
cursor_text=Cursor Text
|
||||||
|
HelpDialog_0=Back
|
||||||
|
HelpDialog_1=Forward
|
||||||
|
HelpDialog_2=Stop
|
||||||
|
HelpDialog_3=Refresh
|
||||||
|
HelpDialog_4=Go
|
||||||
|
HelpDialog_5=Address
|
||||||
|
HelpDialog_6=https://git.minres.com/VP-Tools/SCViewer/src/branch/master/README.md\#key-shortcuts
|
||||||
|
HelpDialog_7=Could not instantiate Browser:
|
||||||
marker=Marker
|
marker=Marker
|
||||||
marker_text=Marker TExt
|
marker_text=Marker TExt
|
||||||
rel_arrow=Relation arrow
|
rel_arrow=Relation arrow
|
||||||
|
|
|
@ -24,6 +24,8 @@ import org.eclipse.swt.widgets.Text;
|
||||||
import org.eclipse.swt.widgets.ToolBar;
|
import org.eclipse.swt.widgets.ToolBar;
|
||||||
import org.eclipse.swt.widgets.ToolItem;
|
import org.eclipse.swt.widgets.ToolItem;
|
||||||
|
|
||||||
|
import com.minres.scviewer.e4.application.Messages;
|
||||||
|
|
||||||
public class HelpDialog extends Dialog {
|
public class HelpDialog extends Dialog {
|
||||||
/**
|
/**
|
||||||
* Create the dialog.
|
* Create the dialog.
|
||||||
|
@ -61,22 +63,22 @@ public class HelpDialog extends Dialog {
|
||||||
container.setLayout(gridLayout);
|
container.setLayout(gridLayout);
|
||||||
ToolBar toolbar = new ToolBar(container, SWT.NONE);
|
ToolBar toolbar = new ToolBar(container, SWT.NONE);
|
||||||
ToolItem itemBack = new ToolItem(toolbar, SWT.PUSH);
|
ToolItem itemBack = new ToolItem(toolbar, SWT.PUSH);
|
||||||
itemBack.setText("Back");
|
itemBack.setText(Messages.HelpDialog_0);
|
||||||
ToolItem itemForward = new ToolItem(toolbar, SWT.PUSH);
|
ToolItem itemForward = new ToolItem(toolbar, SWT.PUSH);
|
||||||
itemForward.setText("Forward");
|
itemForward.setText(Messages.HelpDialog_1);
|
||||||
ToolItem itemStop = new ToolItem(toolbar, SWT.PUSH);
|
ToolItem itemStop = new ToolItem(toolbar, SWT.PUSH);
|
||||||
itemStop.setText("Stop");
|
itemStop.setText(Messages.HelpDialog_2);
|
||||||
ToolItem itemRefresh = new ToolItem(toolbar, SWT.PUSH);
|
ToolItem itemRefresh = new ToolItem(toolbar, SWT.PUSH);
|
||||||
itemRefresh.setText("Refresh");
|
itemRefresh.setText(Messages.HelpDialog_3);
|
||||||
ToolItem itemGo = new ToolItem(toolbar, SWT.PUSH);
|
ToolItem itemGo = new ToolItem(toolbar, SWT.PUSH);
|
||||||
itemGo.setText("Go");
|
itemGo.setText(Messages.HelpDialog_4);
|
||||||
|
|
||||||
GridData data = new GridData();
|
GridData data = new GridData();
|
||||||
data.horizontalSpan = 3;
|
data.horizontalSpan = 3;
|
||||||
toolbar.setLayoutData(data);
|
toolbar.setLayoutData(data);
|
||||||
|
|
||||||
Label labelAddress = new Label(container, SWT.NONE);
|
Label labelAddress = new Label(container, SWT.NONE);
|
||||||
labelAddress.setText("Address");
|
labelAddress.setText(Messages.HelpDialog_5);
|
||||||
|
|
||||||
final Text location = new Text(container, SWT.BORDER);
|
final Text location = new Text(container, SWT.BORDER);
|
||||||
data = new GridData();
|
data = new GridData();
|
||||||
|
@ -112,15 +114,15 @@ public class HelpDialog extends Dialog {
|
||||||
Listener listener = event -> {
|
Listener listener = event -> {
|
||||||
ToolItem item = (ToolItem) event.widget;
|
ToolItem item = (ToolItem) event.widget;
|
||||||
String string = item.getText();
|
String string = item.getText();
|
||||||
if (string.equals("Back"))
|
if (string.equals(Messages.HelpDialog_0))
|
||||||
browser.back();
|
browser.back();
|
||||||
else if (string.equals("Forward"))
|
else if (string.equals(Messages.HelpDialog_1))
|
||||||
browser.forward();
|
browser.forward();
|
||||||
else if (string.equals("Stop"))
|
else if (string.equals(Messages.HelpDialog_2))
|
||||||
browser.stop();
|
browser.stop();
|
||||||
else if (string.equals("Refresh"))
|
else if (string.equals(Messages.HelpDialog_3))
|
||||||
browser.refresh();
|
browser.refresh();
|
||||||
else if (string.equals("Go"))
|
else if (string.equals(Messages.HelpDialog_4))
|
||||||
browser.setUrl(location.getText());
|
browser.setUrl(location.getText());
|
||||||
};
|
};
|
||||||
browser.addProgressListener(new ProgressListener() {
|
browser.addProgressListener(new ProgressListener() {
|
||||||
|
@ -147,9 +149,9 @@ public class HelpDialog extends Dialog {
|
||||||
itemGo.addListener(SWT.Selection, listener);
|
itemGo.addListener(SWT.Selection, listener);
|
||||||
location.addListener(SWT.DefaultSelection, e -> browser.setUrl(location.getText()));
|
location.addListener(SWT.DefaultSelection, e -> browser.setUrl(location.getText()));
|
||||||
|
|
||||||
browser.setUrl("http://eclipse.org");
|
browser.setUrl(Messages.HelpDialog_6);
|
||||||
} catch (SWTError e) {
|
} catch (SWTError e) {
|
||||||
System.out.println("Could not instantiate Browser: " + e.getMessage());
|
System.out.println(Messages.HelpDialog_7 + e.getMessage());
|
||||||
}
|
}
|
||||||
return container;
|
return container;
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,6 +74,7 @@ import org.eclipse.swt.widgets.Table;
|
||||||
import org.eclipse.swt.widgets.TableColumn;
|
import org.eclipse.swt.widgets.TableColumn;
|
||||||
import org.eclipse.swt.widgets.TableItem;
|
import org.eclipse.swt.widgets.TableItem;
|
||||||
import org.eclipse.swt.widgets.Widget;
|
import org.eclipse.swt.widgets.Widget;
|
||||||
|
import org.osgi.service.prefs.BackingStoreException;
|
||||||
|
|
||||||
import com.minres.scviewer.database.DataType;
|
import com.minres.scviewer.database.DataType;
|
||||||
import com.minres.scviewer.database.IHierNode;
|
import com.minres.scviewer.database.IHierNode;
|
||||||
|
@ -82,6 +83,7 @@ import com.minres.scviewer.database.IWaveformDb;
|
||||||
import com.minres.scviewer.database.IWaveformDbFactory;
|
import com.minres.scviewer.database.IWaveformDbFactory;
|
||||||
import com.minres.scviewer.database.RelationType;
|
import com.minres.scviewer.database.RelationType;
|
||||||
import com.minres.scviewer.database.RelationTypeFactory;
|
import com.minres.scviewer.database.RelationTypeFactory;
|
||||||
|
import com.minres.scviewer.database.WaveformType;
|
||||||
import com.minres.scviewer.database.tx.ITx;
|
import com.minres.scviewer.database.tx.ITx;
|
||||||
import com.minres.scviewer.database.tx.ITxAttribute;
|
import com.minres.scviewer.database.tx.ITxAttribute;
|
||||||
import com.minres.scviewer.database.tx.ITxEvent;
|
import com.minres.scviewer.database.tx.ITxEvent;
|
||||||
|
@ -117,35 +119,38 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
|
|
||||||
/** The Constant DATABASE_FILE. */
|
/** The Constant DATABASE_FILE. */
|
||||||
protected static final String DATABASE_FILE = "DATABASE_FILE"; //$NON-NLS-1$
|
protected static final String DATABASE_FILE = "DATABASE_FILE"; //$NON-NLS-1$
|
||||||
|
|
||||||
/** The Constant SHOWN_WAVEFORM. */
|
/** The Constant SHOWN_WAVEFORM. */
|
||||||
protected static final String SHOWN_WAVEFORM = "SHOWN_WAVEFORM"; //$NON-NLS-1$
|
protected static final String SHOWN_WAVEFORM = "SHOWN_WAVEFORM"; //$NON-NLS-1$
|
||||||
|
|
||||||
protected static final String VALUE_DISPLAY = ".VALUE_DISPLAY"; //$NON-NLS-1$
|
protected static final String VALUE_DISPLAY = ".VALUE_DISPLAY"; //$NON-NLS-1$
|
||||||
|
|
||||||
protected static final String WAVE_DISPLAY = ".WAVE_DISPLAY"; //$NON-NLS-1$
|
protected static final String WAVE_DISPLAY = ".WAVE_DISPLAY"; //$NON-NLS-1$
|
||||||
|
|
||||||
/** The Constant SHOWN_CURSOR. */
|
/** The Constant SHOWN_CURSOR. */
|
||||||
protected static final String SHOWN_CURSOR = "SHOWN_CURSOR"; //$NON-NLS-1$
|
protected static final String SHOWN_CURSOR = "SHOWN_CURSOR"; //$NON-NLS-1$
|
||||||
|
|
||||||
/** The Constant ZOOM_LEVEL. */
|
/** The Constant ZOOM_LEVEL. */
|
||||||
protected static final String ZOOM_LEVEL = "ZOOM_LEVEL"; //$NON-NLS-1$
|
protected static final String ZOOM_LEVEL = "ZOOM_LEVEL"; //$NON-NLS-1$
|
||||||
|
|
||||||
/** The Constant BASE_LINE_TIME. */
|
/** The Constant BASE_LINE_TIME. */
|
||||||
protected static final String BASE_LINE_TIME = "BASE_LINE_TIME"; //$NON-NLS-1$
|
protected static final String BASE_LINE_TIME = "BASE_LINE_TIME"; //$NON-NLS-1$
|
||||||
|
|
||||||
/** The Constant SELECTED_TX_ID. */
|
/** The Constant SELECTED_TX_ID. */
|
||||||
protected static final String SELECTED_TX_ID = "SELECTED_TX_ID"; //$NON-NLS-1$
|
protected static final String SELECTED_TX_ID = "SELECTED_TX_ID"; //$NON-NLS-1$
|
||||||
|
|
||||||
/** The Constant SELECTED_TRACKENTRY_NAME. */
|
/** The Constant SELECTED_TRACKENTRY_NAME. */
|
||||||
protected static final String SELECTED_TRACKENTRY_NAME = "SELECTED_TRACKENTRY_NAME"; //$NON-NLS-1$
|
protected static final String SELECTED_TRACKENTRY_NAME = "SELECTED_TRACKENTRY_NAME"; //$NON-NLS-1$
|
||||||
|
|
||||||
/** The Constant WAVEFORM_SELECTED. */
|
/** The Constant WAVEFORM_SELECTED. */
|
||||||
protected static final String WAVEFORM_SELECTED = ".WAVEFORM_SELECTED"; //$NON-NLS-1$
|
protected static final String WAVEFORM_SELECTED = ".WAVEFORM_SELECTED"; //$NON-NLS-1$
|
||||||
|
|
||||||
/** The Constant FILE_CHECK_INTERVAL. */
|
/** The Constant FILE_CHECK_INTERVAL. */
|
||||||
protected static final long FILE_CHECK_INTERVAL = 60000;
|
protected static final long FILE_CHECK_INTERVAL = 60000;
|
||||||
|
|
||||||
|
/** The Constant TX_DETAILS_SHOWN. */
|
||||||
|
protected static final String TX_DETAILS_SHOWN = "TX_DETAILS_SHOWN"; //$NON-NLS-1$
|
||||||
|
|
||||||
/** The zoom level. */
|
/** The zoom level. */
|
||||||
private String[] zoomLevel;
|
private String[] zoomLevel;
|
||||||
|
|
||||||
|
@ -156,19 +161,19 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
public static final String WAVE_ACTION_ID = "com.minres.scviewer.ui.action.AddToWave"; //$NON-NLS-1$
|
public static final String WAVE_ACTION_ID = "com.minres.scviewer.ui.action.AddToWave"; //$NON-NLS-1$
|
||||||
|
|
||||||
private static final String MENU_CONTEXT = "com.minres.scviewer.e4.application.popupmenu.wavecontext"; //$NON-NLS-1$
|
private static final String MENU_CONTEXT = "com.minres.scviewer.e4.application.popupmenu.wavecontext"; //$NON-NLS-1$
|
||||||
|
|
||||||
/** The number of active DisposeListeners */
|
/** The number of active DisposeListeners */
|
||||||
private int disposeListenerNumber = 0;
|
private int disposeListenerNumber = 0;
|
||||||
|
|
||||||
/** The factory. */
|
/** The factory. */
|
||||||
WaveformViewFactory factory = new WaveformViewFactory();
|
WaveformViewFactory factory = new WaveformViewFactory();
|
||||||
|
|
||||||
DesignBrowser browser = null;
|
DesignBrowser browser = null;
|
||||||
|
|
||||||
TransactionDetails detailsView = null;
|
TransactionDetails detailsView = null;
|
||||||
|
|
||||||
TransactionListView transactionList = null;
|
TransactionListView transactionList = null;
|
||||||
|
|
||||||
/** The waveform pane. */
|
/** The waveform pane. */
|
||||||
private IWaveformView waveformPane;
|
private IWaveformView waveformPane;
|
||||||
|
|
||||||
|
@ -211,7 +216,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
ArrayList<File> filesToLoad = new ArrayList<>();
|
ArrayList<File> filesToLoad = new ArrayList<>();
|
||||||
|
|
||||||
String partConfig = "";
|
String partConfig = "";
|
||||||
|
|
||||||
/** The persisted state. */
|
/** The persisted state. */
|
||||||
Map<String, String> persistedState;
|
Map<String, String> persistedState;
|
||||||
|
|
||||||
|
@ -231,11 +236,16 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
IModificationChecker fileChecker;
|
IModificationChecker fileChecker;
|
||||||
|
|
||||||
@Inject IWaveformDbFactory dbFactory;
|
@Inject IWaveformDbFactory dbFactory;
|
||||||
|
|
||||||
@Inject Composite parent;
|
@Inject Composite parent;
|
||||||
|
|
||||||
private boolean showHover;
|
private boolean showHover;
|
||||||
|
|
||||||
|
@Preference(nodePath = PreferenceConstants.PREFERENCES_SCOPE, value = PreferenceConstants.SHOW_TX_DETAILS) Boolean blah;
|
||||||
|
|
||||||
|
private SashForm topSash = null;
|
||||||
|
private SashForm middleSash = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates the composite.
|
* Creates the composite.
|
||||||
*
|
*
|
||||||
|
@ -246,7 +256,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
@PostConstruct
|
@PostConstruct
|
||||||
public void createComposite(MPart part, EMenuService menuService, @Preference(nodePath = PreferenceConstants.PREFERENCES_SCOPE) IEclipsePreferences prefs, @Preference(value = PreferenceConstants.SHOW_HOVER) Boolean hover) {
|
public void createComposite(MPart part, EMenuService menuService, @Preference(nodePath = PreferenceConstants.PREFERENCES_SCOPE) IEclipsePreferences prefs, @Preference(value = PreferenceConstants.SHOW_HOVER) Boolean hover) {
|
||||||
disposeListenerNumber += 1;
|
disposeListenerNumber += 1;
|
||||||
|
|
||||||
myPart = part;
|
myPart = part;
|
||||||
myParent = parent;
|
myParent = parent;
|
||||||
store=prefs;
|
store=prefs;
|
||||||
|
@ -258,14 +268,14 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
parent.setLayout(new FillLayout(SWT.HORIZONTAL));
|
parent.setLayout(new FillLayout(SWT.HORIZONTAL));
|
||||||
|
|
||||||
IEclipseContext ctx = myPart.getContext();
|
IEclipseContext ctx = myPart.getContext();
|
||||||
ctx.set(WaveformViewer.class, this);
|
ctx.set(WaveformViewer.class, this);
|
||||||
ctx.set(IWaveformDb.class, database);
|
ctx.set(IWaveformDb.class, database);
|
||||||
|
|
||||||
SashForm topSash = new SashForm(parent, SWT.BORDER | SWT.SMOOTH | SWT.HORIZONTAL);
|
topSash = new SashForm(parent, SWT.BORDER | SWT.SMOOTH | SWT.HORIZONTAL);
|
||||||
Composite left = new Composite(topSash, SWT.NONE);
|
Composite left = new Composite(topSash, SWT.NONE);
|
||||||
SashForm middleSash = new SashForm(topSash, SWT.BORDER | SWT.SMOOTH | SWT.VERTICAL);
|
middleSash = new SashForm(topSash, SWT.BORDER | SWT.SMOOTH | SWT.VERTICAL);
|
||||||
Composite right = new Composite(topSash, SWT.NONE);
|
Composite right = new Composite(topSash, SWT.NONE);
|
||||||
topSash.setWeights(new int[] {20, 60, 20});
|
topSash.setWeights(new int[] {20, 60, 20});
|
||||||
|
|
||||||
|
@ -275,101 +285,101 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
|
|
||||||
ctx.set(Composite.class, left);
|
ctx.set(Composite.class, left);
|
||||||
browser = ContextInjectionFactory.make(DesignBrowser.class, ctx);
|
browser = 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);
|
||||||
|
|
||||||
waveformPane = factory.createPanel(middleTop);
|
waveformPane = factory.createPanel(middleTop);
|
||||||
|
|
||||||
ctx.set(Composite.class, middleBottom);
|
ctx.set(Composite.class, middleBottom);
|
||||||
transactionList = ContextInjectionFactory.make(TransactionListView.class, ctx);
|
transactionList = ContextInjectionFactory.make(TransactionListView.class, ctx);
|
||||||
|
|
||||||
waveformPane.setMaxTime(0);
|
waveformPane.setMaxTime(0);
|
||||||
//set selection to empty selection when opening a new waveformPane
|
//set selection to empty selection when opening a new waveformPane
|
||||||
selectionService.setSelection(new StructuredSelection());
|
selectionService.setSelection(new StructuredSelection());
|
||||||
|
|
||||||
waveformPane.addPropertyChangeListener(IWaveformView.CURSOR_PROPERTY, evt -> {
|
waveformPane.addPropertyChangeListener(IWaveformView.CURSOR_PROPERTY, evt -> {
|
||||||
Long time = (Long) evt.getNewValue();
|
Long time = (Long) evt.getNewValue();
|
||||||
eventBroker.post(WaveStatusBarControl.CURSOR_TIME, waveformPane.getScaledTime(time));
|
eventBroker.post(WaveStatusBarControl.CURSOR_TIME, waveformPane.getScaledTime(time));
|
||||||
long marker = waveformPane.getMarkerTime(waveformPane.getSelectedMarkerId());
|
long marker = waveformPane.getMarkerTime(waveformPane.getSelectedMarkerId());
|
||||||
eventBroker.post(WaveStatusBarControl.MARKER_DIFF, waveformPane.getScaledTime(time - marker));
|
eventBroker.post(WaveStatusBarControl.MARKER_DIFF, waveformPane.getScaledTime(time - marker));
|
||||||
});
|
});
|
||||||
waveformPane.addPropertyChangeListener(IWaveformView.MARKER_PROPERTY, evt -> {
|
waveformPane.addPropertyChangeListener(IWaveformView.MARKER_PROPERTY, evt -> {
|
||||||
Long time = (Long) evt.getNewValue();
|
Long time = (Long) evt.getNewValue();
|
||||||
eventBroker.post(WaveStatusBarControl.MARKER_TIME, waveformPane.getScaledTime(time));
|
eventBroker.post(WaveStatusBarControl.MARKER_TIME, waveformPane.getScaledTime(time));
|
||||||
long cursor = waveformPane.getCursorTime();
|
long cursor = waveformPane.getCursorTime();
|
||||||
eventBroker.post(WaveStatusBarControl.MARKER_DIFF, waveformPane.getScaledTime(cursor - time));
|
eventBroker.post(WaveStatusBarControl.MARKER_DIFF, waveformPane.getScaledTime(cursor - time));
|
||||||
});
|
});
|
||||||
|
|
||||||
waveformPane.addSelectionChangedListener(event -> {
|
waveformPane.addSelectionChangedListener(event -> {
|
||||||
if (event.getSelection() instanceof IStructuredSelection) {
|
if (event.getSelection() instanceof IStructuredSelection) {
|
||||||
selectionService.setSelection(event.getSelection());
|
selectionService.setSelection(event.getSelection());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
waveformPane.getWaveformControl().addListener(SWT.KeyDown, e -> {
|
waveformPane.getWaveformControl().addListener(SWT.KeyDown, e -> {
|
||||||
if((e.stateMask&SWT.MOD3)!=0) { // Alt key
|
if((e.stateMask&SWT.MOD3)!=0) { // Alt key
|
||||||
} else if((e.stateMask&SWT.MOD1)!=0) { //Ctrl/Cmd
|
} else if((e.stateMask&SWT.MOD1)!=0) { //Ctrl/Cmd
|
||||||
int zoomlevel = waveformPane.getZoomLevel();
|
int zoomlevel = waveformPane.getZoomLevel();
|
||||||
switch(e.keyCode) {
|
switch(e.keyCode) {
|
||||||
case '+':
|
case '+':
|
||||||
case SWT.KEYPAD_ADD:
|
case SWT.KEYPAD_ADD:
|
||||||
if(zoomlevel>0)
|
if(zoomlevel>0)
|
||||||
waveformPane.setZoomLevel(zoomlevel-1);
|
waveformPane.setZoomLevel(zoomlevel-1);
|
||||||
return;
|
return;
|
||||||
case '-':
|
case '-':
|
||||||
case SWT.KEYPAD_SUBTRACT:
|
case SWT.KEYPAD_SUBTRACT:
|
||||||
if(zoomlevel<waveformPane.getZoomLevels().length-1)
|
if(zoomlevel<waveformPane.getZoomLevels().length-1)
|
||||||
waveformPane.setZoomLevel(zoomlevel+1);
|
waveformPane.setZoomLevel(zoomlevel+1);
|
||||||
return;
|
return;
|
||||||
case SWT.ARROW_UP:
|
case SWT.ARROW_UP:
|
||||||
waveformPane.moveSelectedTrack(-1);
|
waveformPane.moveSelectedTrack(-1);
|
||||||
return;
|
return;
|
||||||
case SWT.ARROW_DOWN:
|
case SWT.ARROW_DOWN:
|
||||||
waveformPane.moveSelectedTrack(1);
|
waveformPane.moveSelectedTrack(1);
|
||||||
return;
|
return;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
} else if((e.stateMask&SWT.MOD2)!=0) { //Shift
|
|
||||||
switch(e.keyCode) {
|
|
||||||
case SWT.ARROW_LEFT:
|
|
||||||
waveformPane.scrollHorizontal(-100);
|
|
||||||
return;
|
|
||||||
case SWT.ARROW_RIGHT:
|
|
||||||
waveformPane.scrollHorizontal(100);
|
|
||||||
return;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
switch(e.keyCode) {
|
|
||||||
case SWT.ARROW_LEFT:
|
|
||||||
waveformPane.scrollHorizontal(-10);
|
|
||||||
return;
|
|
||||||
case SWT.ARROW_RIGHT:
|
|
||||||
waveformPane.scrollHorizontal(10);
|
|
||||||
return;
|
|
||||||
case SWT.ARROW_UP:
|
|
||||||
waveformPane.moveSelection(GotoDirection.UP);
|
|
||||||
return;
|
|
||||||
case SWT.ARROW_DOWN:
|
|
||||||
waveformPane.moveSelection(GotoDirection.DOWN);
|
|
||||||
return;
|
|
||||||
case SWT.HOME:
|
|
||||||
waveformPane.scrollTo(IWaveformView.MARKER_POS);
|
|
||||||
return;
|
|
||||||
case SWT.END:
|
|
||||||
waveformPane.scrollTo(IWaveformView.CURSOR_POS);
|
|
||||||
return;
|
|
||||||
case SWT.DEL:
|
|
||||||
waveformPane.deleteSelectedTracks();
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
} else if((e.stateMask&SWT.MOD2)!=0) { //Shift
|
||||||
|
switch(e.keyCode) {
|
||||||
|
case SWT.ARROW_LEFT:
|
||||||
|
waveformPane.scrollHorizontal(-100);
|
||||||
|
return;
|
||||||
|
case SWT.ARROW_RIGHT:
|
||||||
|
waveformPane.scrollHorizontal(100);
|
||||||
|
return;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
switch(e.keyCode) {
|
||||||
|
case SWT.ARROW_LEFT:
|
||||||
|
waveformPane.scrollHorizontal(-10);
|
||||||
|
return;
|
||||||
|
case SWT.ARROW_RIGHT:
|
||||||
|
waveformPane.scrollHorizontal(10);
|
||||||
|
return;
|
||||||
|
case SWT.ARROW_UP:
|
||||||
|
waveformPane.moveSelection(GotoDirection.UP);
|
||||||
|
return;
|
||||||
|
case SWT.ARROW_DOWN:
|
||||||
|
waveformPane.moveSelection(GotoDirection.DOWN);
|
||||||
|
return;
|
||||||
|
case SWT.HOME:
|
||||||
|
waveformPane.scrollTo(IWaveformView.MARKER_POS);
|
||||||
|
return;
|
||||||
|
case SWT.END:
|
||||||
|
waveformPane.scrollTo(IWaveformView.CURSOR_POS);
|
||||||
|
return;
|
||||||
|
case SWT.DEL:
|
||||||
|
waveformPane.deleteSelectedTracks();
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
zoomLevel = waveformPane.getZoomLevels();
|
zoomLevel = waveformPane.getZoomLevels();
|
||||||
checkForUpdates = store.getBoolean(PreferenceConstants.DATABASE_RELOAD, true);
|
checkForUpdates = store.getBoolean(PreferenceConstants.DATABASE_RELOAD, true);
|
||||||
filesToLoad = new ArrayList<>();
|
filesToLoad = new ArrayList<>();
|
||||||
|
@ -461,8 +471,8 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
valueCol.pack();
|
valueCol.pack();
|
||||||
table.setSize(table.computeSize(SWT.DEFAULT, SWT.DEFAULT));
|
table.setSize(table.computeSize(SWT.DEFAULT, SWT.DEFAULT));
|
||||||
parent.addPaintListener( e -> {
|
parent.addPaintListener( e -> {
|
||||||
Rectangle area = parent.getClientArea();
|
Rectangle area = parent.getClientArea();
|
||||||
valueCol.setWidth(area.width - nameCol.getWidth());
|
valueCol.setWidth(area.width - nameCol.getWidth());
|
||||||
});
|
});
|
||||||
parent.addFocusListener(FocusListener.focusGainedAdapter(e -> table.setFocus()));
|
parent.addFocusListener(FocusListener.focusGainedAdapter(e -> table.setFocus()));
|
||||||
return true;
|
return true;
|
||||||
|
@ -484,21 +494,28 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
waveformPane.setStyleProvider(new WaveformStyleProvider(store));
|
waveformPane.setStyleProvider(new WaveformStyleProvider(store));
|
||||||
|
showTxDetails(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
@Optional
|
@Optional
|
||||||
public void reactOnPrefsChange(@Preference(nodePath = PreferenceConstants.PREFERENCES_SCOPE) IEclipsePreferences prefs) {
|
public void reactOnPrefsChange(@Preference(nodePath = PreferenceConstants.PREFERENCES_SCOPE) IEclipsePreferences prefs) {
|
||||||
prefs.addPreferenceChangeListener(this);
|
prefs.addPreferenceChangeListener(this);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
@Optional
|
@Optional
|
||||||
public void reactOnShowHoverChange(@Preference(nodePath = PreferenceConstants.PREFERENCES_SCOPE, value = PreferenceConstants.SHOW_HOVER) Boolean hover) {
|
public void reactOnShowHoverChange(@Preference(nodePath = PreferenceConstants.PREFERENCES_SCOPE, value = PreferenceConstants.SHOW_HOVER) Boolean hover) {
|
||||||
showHover=hover;
|
showHover=hover;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
@Optional
|
||||||
|
public void reactOnShowTxDetailsChange(@Preference(nodePath = PreferenceConstants.PREFERENCES_SCOPE, value = PreferenceConstants.SHOW_TX_DETAILS) Boolean show) {
|
||||||
|
showTxDetails(show);
|
||||||
|
}
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
@Optional
|
@Optional
|
||||||
public void reactOnReloadDatabaseChange(@Preference(nodePath = PreferenceConstants.PREFERENCES_SCOPE, value = PreferenceConstants.DATABASE_RELOAD) Boolean checkForUpdates) {
|
public void reactOnReloadDatabaseChange(@Preference(nodePath = PreferenceConstants.PREFERENCES_SCOPE, value = PreferenceConstants.DATABASE_RELOAD) Boolean checkForUpdates) {
|
||||||
|
@ -568,7 +585,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
if (monitor.isCanceled())
|
if (monitor.isCanceled())
|
||||||
throw new OperationCanceledException(Messages.WaveformViewer_14);
|
throw new OperationCanceledException(Messages.WaveformViewer_14);
|
||||||
|
|
||||||
|
|
||||||
IStatus result = jobGroup.getResult();
|
IStatus result = jobGroup.getResult();
|
||||||
if( (!result.isMultiStatus() && result.getCode() != Status.OK_STATUS.getCode() ) ||
|
if( (!result.isMultiStatus() && result.getCode() != Status.OK_STATUS.getCode() ) ||
|
||||||
(result.isMultiStatus() && result.getChildren().length > 0 && result.getChildren()[0].getCode() != Status.OK_STATUS.getCode() ) ){
|
(result.isMultiStatus() && result.getChildren().length > 0 && result.getChildren()[0].getCode() != Status.OK_STATUS.getCode() ) ){
|
||||||
|
@ -605,10 +622,10 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
public void fileChanged(List<File> file) {
|
public void fileChanged(List<File> file) {
|
||||||
final Display display = myParent.getDisplay();
|
final Display display = myParent.getDisplay();
|
||||||
display.asyncExec(() -> {
|
display.asyncExec(() -> {
|
||||||
if (MessageDialog.openQuestion(display.getActiveShell(), Messages.WaveformViewer_17,
|
if (MessageDialog.openQuestion(display.getActiveShell(), Messages.WaveformViewer_17,
|
||||||
Messages.WaveformViewer_18)) {
|
Messages.WaveformViewer_18)) {
|
||||||
reloadDatabase();
|
reloadDatabase();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
fileMonitor.removeFileChangeListener(this);
|
fileMonitor.removeFileChangeListener(this);
|
||||||
}
|
}
|
||||||
|
@ -684,14 +701,14 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
saveWaveformViewerState(persistingState);
|
saveWaveformViewerState(persistingState);
|
||||||
Properties props = new Properties();
|
Properties props = new Properties();
|
||||||
props.putAll(persistingState);
|
props.putAll(persistingState);
|
||||||
|
|
||||||
try (FileOutputStream out = new FileOutputStream(fileName)) {
|
try (FileOutputStream out = new FileOutputStream(fileName)) {
|
||||||
props.store(out, "Written by SCViewer"); //$NON-NLS-1$
|
props.store(out, "Written by SCViewer"); //$NON-NLS-1$
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void loadState(String fileName){
|
public void loadState(String fileName){
|
||||||
//clear old streams before loading tab settings
|
//clear old streams before loading tab settings
|
||||||
if(!waveformPane.getStreamList().isEmpty()) {
|
if(!waveformPane.getStreamList().isEmpty()) {
|
||||||
|
@ -709,7 +726,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Save waveform viewer state.
|
* Save waveform viewer state.
|
||||||
*
|
*
|
||||||
|
@ -734,7 +751,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
}
|
}
|
||||||
persistingState.put(ZOOM_LEVEL, Integer.toString(waveformPane.getZoomLevel()));
|
persistingState.put(ZOOM_LEVEL, Integer.toString(waveformPane.getZoomLevel()));
|
||||||
persistingState.put(BASE_LINE_TIME, Long.toString(waveformPane.getBaselineTime()));
|
persistingState.put(BASE_LINE_TIME, Long.toString(waveformPane.getBaselineTime()));
|
||||||
|
|
||||||
// get selected transaction of a stream
|
// get selected transaction of a stream
|
||||||
ISelection selection = waveformPane.getSelection();
|
ISelection selection = waveformPane.getSelection();
|
||||||
if (!selection.isEmpty()) {
|
if (!selection.isEmpty()) {
|
||||||
|
@ -749,24 +766,25 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
persistingState.put(SELECTED_TRACKENTRY_NAME, name);
|
persistingState.put(SELECTED_TRACKENTRY_NAME, name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
persistingState.put(TX_DETAILS_SHOWN, Boolean.toString(store.getBoolean(PreferenceConstants.SHOW_TX_DETAILS, false)));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected List<Object> getISelection(ISelection selection){
|
protected List<Object> getISelection(ISelection selection){
|
||||||
List<Object> result = new LinkedList<> ();
|
List<Object> result = new LinkedList<> ();
|
||||||
|
|
||||||
if ( selection instanceof IStructuredSelection ) {
|
if ( selection instanceof IStructuredSelection ) {
|
||||||
Iterator<?> i = ((IStructuredSelection)selection).iterator();
|
Iterator<?> i = ((IStructuredSelection)selection).iterator();
|
||||||
while (i.hasNext()){
|
while (i.hasNext()){
|
||||||
Object o = i.next ();
|
Object o = i.next ();
|
||||||
if (o == null) {
|
if (o == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
result.add(o);
|
result.add(o);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Restore waveform viewer state.
|
* Restore waveform viewer state.
|
||||||
*
|
*
|
||||||
|
@ -823,18 +841,24 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
String trackentryName = state.get(SELECTED_TRACKENTRY_NAME);
|
String trackentryName = state.get(SELECTED_TRACKENTRY_NAME);
|
||||||
//get TrackEntry Object based on name and TX Object by id and put into selectionList
|
//get TrackEntry Object based on name and TX Object by id and put into selectionList
|
||||||
trackEntries.stream().filter(e->trackentryName.equals(e.waveform.getFullName())).forEach(trackEntry ->
|
trackEntries.stream().filter(e->trackentryName.equals(e.waveform.getFullName())).forEach(trackEntry ->
|
||||||
trackEntry.waveform.getEvents().entrySet().stream()
|
trackEntry.waveform.getEvents().entrySet().stream()
|
||||||
.map(e->e.events)
|
.map(e->e.events)
|
||||||
.filter(Objects::nonNull)
|
.filter(Objects::nonNull)
|
||||||
.forEach(entries->
|
.forEach(entries->
|
||||||
Arrays.stream(entries)
|
Arrays.stream(entries)
|
||||||
.filter(e->e instanceof ITxEvent && txId.equals(((ITxEvent)e).getTransaction().getId()))
|
.filter(e->e instanceof ITxEvent && txId.equals(((ITxEvent)e).getTransaction().getId()))
|
||||||
.forEach(event ->
|
.forEach(event ->
|
||||||
waveformPane.setSelection(new StructuredSelection(
|
waveformPane.setSelection(new StructuredSelection(
|
||||||
new Object[] {((ITxEvent)event).getTransaction(), trackEntry}))
|
new Object[] {((ITxEvent)event).getTransaction(), trackEntry}))
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (state.containsKey(TX_DETAILS_SHOWN)) {
|
||||||
|
try {
|
||||||
|
showTxDetails(Boolean.parseBoolean(state.get(TX_DETAILS_SHOWN)));
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -970,15 +994,18 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
showTxDetails(waveformPane.getStreamList().stream().filter(t -> t.waveform.getType() == WaveformType.TRANSACTION).findFirst().isPresent());
|
||||||
setFocus();
|
setFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeSelectedStreamsFromList() {
|
public void removeSelectedStreamsFromList() {
|
||||||
waveformPane.deleteSelectedTracks();
|
waveformPane.deleteSelectedTracks();
|
||||||
|
showTxDetails(waveformPane.getStreamList().stream().filter(t -> t.waveform.getType() == WaveformType.TRANSACTION).findFirst().isPresent());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeSelectedStreamFromList() {
|
public void removeSelectedStreamFromList() {
|
||||||
waveformPane.deleteSelectedTracks();
|
waveformPane.deleteSelectedTracks();
|
||||||
|
showTxDetails(waveformPane.getStreamList().stream().filter(t -> t.waveform.getType() == WaveformType.TRANSACTION).findFirst().isPresent());
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Move selected.
|
* Move selected.
|
||||||
|
@ -989,7 +1016,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
waveformPane.moveSelectedTrack(i);
|
waveformPane.moveSelectedTrack(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Move selection.
|
* Move selection.
|
||||||
*
|
*
|
||||||
|
@ -1036,6 +1063,14 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
* Sets the zoom fit.
|
* Sets the zoom fit.
|
||||||
*/
|
*/
|
||||||
public void setZoomFit() {
|
public void setZoomFit() {
|
||||||
|
waveformPane.setZoomLevel(-2);
|
||||||
|
updateAll();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the zoom fit.
|
||||||
|
*/
|
||||||
|
public void setZoomFull() {
|
||||||
waveformPane.setZoomLevel(-1);
|
waveformPane.setZoomLevel(-1);
|
||||||
updateAll();
|
updateAll();
|
||||||
}
|
}
|
||||||
|
@ -1181,7 +1216,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
if(navigationRelationType!=relationType) waveformPane.setHighliteRelation(relationType);
|
if(navigationRelationType!=relationType) waveformPane.setHighliteRelation(relationType);
|
||||||
navigationRelationType=relationType;
|
navigationRelationType=relationType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void update() {
|
public void update() {
|
||||||
waveformPane.update();
|
waveformPane.update();
|
||||||
}
|
}
|
||||||
|
@ -1200,17 +1235,39 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
*
|
*
|
||||||
* @param e
|
* @param e
|
||||||
*/
|
*/
|
||||||
public void widgetDisposed(DisposeEvent e) {
|
public void widgetDisposed(DisposeEvent e) {
|
||||||
disposeListenerNumber -= 1;
|
disposeListenerNumber -= 1;
|
||||||
if( disposeListenerNumber == 0) { //if the last tab is closed, reset statusbar
|
if( disposeListenerNumber == 0) { //if the last tab is closed, reset statusbar
|
||||||
eventBroker.post(WaveStatusBarControl.ZOOM_LEVEL, null);
|
eventBroker.post(WaveStatusBarControl.ZOOM_LEVEL, null);
|
||||||
eventBroker.post(WaveStatusBarControl.CURSOR_TIME, null);
|
eventBroker.post(WaveStatusBarControl.CURSOR_TIME, null);
|
||||||
eventBroker.post(WaveStatusBarControl.MARKER_TIME, null);
|
eventBroker.post(WaveStatusBarControl.MARKER_TIME, null);
|
||||||
eventBroker.post(WaveStatusBarControl.MARKER_DIFF, null);
|
eventBroker.post(WaveStatusBarControl.MARKER_DIFF, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void search(String propName, DataType type, String propValue) {
|
public void search(String propName, DataType type, String propValue) {
|
||||||
transactionList.getControl().setSearchProps(propName, type, propValue);
|
transactionList.getControl().setSearchProps(propName, type, propValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void showTxDetails(boolean show) {
|
||||||
|
if(middleSash==null || topSash==null || middleSash.isDisposed() || topSash.isDisposed())
|
||||||
|
return;
|
||||||
|
if(show) {
|
||||||
|
middleSash.setWeights(new int[] {75, 25});
|
||||||
|
topSash.setWeights(new int[] {20, 60, 20});
|
||||||
|
} else {
|
||||||
|
middleSash.setWeights(new int[] {100, 0});
|
||||||
|
topSash.setWeights(new int[] {20, 80, 0});
|
||||||
|
|
||||||
|
}
|
||||||
|
detailsView.getControl().setVisible(show);
|
||||||
|
transactionList.getControl().setVisible(show);
|
||||||
|
parent.requestLayout();
|
||||||
|
if(store.getBoolean(PreferenceConstants.SHOW_TX_DETAILS, false) != show) {
|
||||||
|
store.putBoolean(PreferenceConstants.SHOW_TX_DETAILS, show);
|
||||||
|
try {
|
||||||
|
store.flush();
|
||||||
|
} catch (BackingStoreException e) {}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -68,6 +68,7 @@ public class DefaultValuesInitializer extends AbstractPreferenceInitializer {
|
||||||
|
|
||||||
store.putBoolean(PreferenceConstants.DATABASE_RELOAD, true);
|
store.putBoolean(PreferenceConstants.DATABASE_RELOAD, true);
|
||||||
store.putBoolean(PreferenceConstants.SHOW_HOVER, true);
|
store.putBoolean(PreferenceConstants.SHOW_HOVER, true);
|
||||||
|
store.putBoolean(PreferenceConstants.SHOW_TX_DETAILS, false);
|
||||||
store.putInt(PreferenceConstants.TRACK_HEIGHT, 30);
|
store.putInt(PreferenceConstants.TRACK_HEIGHT, 30);
|
||||||
for (WaveformColors c : WaveformColors.values()) {
|
for (WaveformColors c : WaveformColors.values()) {
|
||||||
store.put(c.name()+"_COLOR", StringConverter.asString(colors[c.ordinal()].getRGB())); //$NON-NLS-1$
|
store.put(c.name()+"_COLOR", StringConverter.asString(colors[c.ordinal()].getRGB())); //$NON-NLS-1$
|
||||||
|
|
|
@ -23,9 +23,12 @@ public class PreferenceConstants {
|
||||||
/** The Constant DATABASE_RELOAD. */
|
/** The Constant DATABASE_RELOAD. */
|
||||||
public static final String DATABASE_RELOAD="databaseReload"; //$NON-NLS-1$
|
public static final String DATABASE_RELOAD="databaseReload"; //$NON-NLS-1$
|
||||||
|
|
||||||
/** The Constant DATABASE_RELOAD. */
|
/** The Constant SHOW_HOVER. */
|
||||||
public static final String SHOW_HOVER="showWaveformHover"; //$NON-NLS-1$
|
public static final String SHOW_HOVER="showWaveformHover"; //$NON-NLS-1$
|
||||||
|
|
||||||
|
/** The Constant SHOW_TX_DETAILS. */
|
||||||
|
public static final String SHOW_TX_DETAILS="showTxDetails"; //$NON-NLS-1$
|
||||||
|
|
||||||
/** The Constant TRACK_HEIGHT. */
|
/** The Constant TRACK_HEIGHT. */
|
||||||
public static final String TRACK_HEIGHT="trackHeigth"; //$NON-NLS-1$
|
public static final String TRACK_HEIGHT="trackHeigth"; //$NON-NLS-1$
|
||||||
|
|
||||||
|
|
|
@ -39,6 +39,8 @@ public class SCViewerPreferencesPage extends FieldEditorPreferencePage {
|
||||||
getFieldEditorParent()));
|
getFieldEditorParent()));
|
||||||
addField(new BooleanFieldEditor(PreferenceConstants.SHOW_HOVER, Messages.SCViewerPreferencesPage_1,
|
addField(new BooleanFieldEditor(PreferenceConstants.SHOW_HOVER, Messages.SCViewerPreferencesPage_1,
|
||||||
getFieldEditorParent()));
|
getFieldEditorParent()));
|
||||||
|
addField(new BooleanFieldEditor(PreferenceConstants.SHOW_TX_DETAILS, Messages.SCViewerPreferencesPage_3,
|
||||||
|
getFieldEditorParent()));
|
||||||
addField(new IntegerFieldEditor(PreferenceConstants.TRACK_HEIGHT, Messages.SCViewerPreferencesPage_2,
|
addField(new IntegerFieldEditor(PreferenceConstants.TRACK_HEIGHT, Messages.SCViewerPreferencesPage_2,
|
||||||
getFieldEditorParent()));
|
getFieldEditorParent()));
|
||||||
|
|
||||||
|
|
|
@ -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.13.2</version>
|
<version>2.14.0</version>
|
||||||
<relativePath>../../..</relativePath>
|
<relativePath>../../..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<packaging>eclipse-plugin</packaging>
|
<packaging>eclipse-plugin</packaging>
|
||||||
|
|
|
@ -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.13.2</version>
|
<version>2.14.0</version>
|
||||||
<relativePath>../../..</relativePath>
|
<relativePath>../../..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>com.minres.scviewer.e4.product</artifactId>
|
<artifactId>com.minres.scviewer.e4.product</artifactId>
|
||||||
<version>2.13.2</version>
|
<version>2.14.0</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="product" id="com.minres.scviewer.e4.application.product" application="org.eclipse.e4.ui.workbench.swt.E4Application" version="2.13.2" 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.14.0" useFeatures="true" includeLaunchers="true">
|
||||||
|
|
||||||
<configIni use="default">
|
<configIni use="default">
|
||||||
</configIni>
|
</configIni>
|
||||||
|
|
|
@ -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.13.2</version>
|
<version>2.14.0</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.13.2</version>
|
<version>2.14.0</version>
|
||||||
<relativePath>../../..</relativePath>
|
<relativePath>../../..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<build>
|
<build>
|
||||||
|
|
|
@ -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.13.2</version>
|
<version>2.14.0</version>
|
||||||
<relativePath>../../..</relativePath>
|
<relativePath>../../..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<packaging>eclipse-test-plugin</packaging>
|
<packaging>eclipse-test-plugin</packaging>
|
||||||
|
|
Loading…
Reference in New Issue