Merge branch 'release/2.14.2'
This commit is contained in:
commit
6ef91bb5e7
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.minres.scviewer</groupId>
|
||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||
<version>2.14.1</version>
|
||||
<version>2.14.2</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
<version>3.0.0-SNAPSHOT</version>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.minres.scviewer</groupId>
|
||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||
<version>2.14.1</version>
|
||||
<version>2.14.2</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
<version>1.1.0-SNAPSHOT</version>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.minres.scviewer</groupId>
|
||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||
<version>2.14.1</version>
|
||||
<version>2.14.2</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.minres.scviewer</groupId>
|
||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||
<version>2.14.1</version>
|
||||
<version>2.14.2</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
<version>1.1.0-SNAPSHOT</version>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.minres.scviewer</groupId>
|
||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||
<version>2.14.1</version>
|
||||
<version>2.14.2</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
<version>1.1.0-SNAPSHOT</version>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>com.minres.scviewer</groupId>
|
||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||
<version>2.14.1</version>
|
||||
<version>2.14.2</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<parent>
|
||||
<groupId>com.minres.scviewer</groupId>
|
||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||
<version>2.14.1</version>
|
||||
<version>2.14.2</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.minres.scviewer</groupId>
|
||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||
<version>2.14.1</version>
|
||||
<version>2.14.2</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
<version>4.0.0-SNAPSHOT</version>
|
||||
|
|
|
@ -179,6 +179,7 @@ public class WaveformCanvas extends Canvas {
|
|||
}
|
||||
|
||||
public void setZoomLevel(int level, long centerTime) {
|
||||
int maxLevel = findFitZoomLevel(maxTime);
|
||||
if(level<0) {
|
||||
if(level<-1) {
|
||||
long cTime = getCursorPainters().get(0).getTime();
|
||||
|
@ -186,11 +187,11 @@ public class WaveformCanvas extends Canvas {
|
|||
level = findFitZoomLevel(time_diff);
|
||||
centerTime = (centerTime>cTime?cTime:centerTime)+time_diff/2;
|
||||
} else
|
||||
level = findFitZoomLevel(maxTime);
|
||||
level=maxLevel;
|
||||
if(level<0) level = 0;
|
||||
}
|
||||
//FIXME: keep center if zoom-out and cursor is not in view
|
||||
if(level<Constants.SCALE_MULTIPLIER.length*Constants.UNIT_STRING.length){
|
||||
if(level<Constants.SCALE_MULTIPLIER.length*Constants.UNIT_STRING.length && level <= maxLevel){
|
||||
int scale = level%Constants.SCALE_MULTIPLIER.length;
|
||||
int unit = level/Constants.SCALE_MULTIPLIER.length;
|
||||
this.scaleFactor = Constants.UNIT_MULTIPLIER[unit]*Constants.SCALE_MULTIPLIER[scale];
|
||||
|
|
|
@ -122,12 +122,6 @@ public class WaveformView implements IWaveformView {
|
|||
|
||||
protected ObservableList<TrackEntry> streams;
|
||||
|
||||
private boolean waveformsContainTx=false;
|
||||
|
||||
public boolean isWaveformsContainTx() {
|
||||
return waveformsContainTx;
|
||||
}
|
||||
|
||||
int selectedMarker = 0;
|
||||
|
||||
private int tracksVerticalHeight;
|
||||
|
@ -166,8 +160,7 @@ public class WaveformView implements IWaveformView {
|
|||
: streams.subList(firstIdx, lastIdx + 1);
|
||||
setSelection(new StructuredSelection(res), (e.stateMask & SWT.CTRL) != 0, false);
|
||||
} else
|
||||
setSelection(new StructuredSelection(entry.getValue()), (e.stateMask & SWT.CTRL) != 0,
|
||||
false);
|
||||
setSelection(new StructuredSelection(entry.getValue()), (e.stateMask & SWT.CTRL) != 0, false);
|
||||
} else {
|
||||
setSelection(new StructuredSelection(entry.getValue()), (e.stateMask & SWT.CTRL) != 0, false);
|
||||
}
|
||||
|
@ -295,8 +288,15 @@ public class WaveformView implements IWaveformView {
|
|||
@Override
|
||||
public void handleEvent(Event e) {
|
||||
switch (e.type) {
|
||||
// case SWT.MouseWheel:
|
||||
// break;
|
||||
case SWT.MouseWheel:
|
||||
if((e.stateMask & SWT.CTRL) != 0) {
|
||||
int zoom = waveformCanvas.getZoomLevel();
|
||||
if(e.count<0)
|
||||
waveformCanvas.setZoomLevel(zoom+1);
|
||||
else
|
||||
waveformCanvas.setZoomLevel(zoom-1);
|
||||
}
|
||||
break;
|
||||
case SWT.MouseDown:
|
||||
start = new Point(e.x, e.y);
|
||||
end = new Point(e.x, e.y);
|
||||
|
@ -469,6 +469,17 @@ public class WaveformView implements IWaveformView {
|
|||
|
||||
toolTipHandler = new ToolTipHandler(parent.getShell());
|
||||
toolTipHandler.activateHoverHelp(waveformCanvas);
|
||||
// This is the filter that prevents it
|
||||
getControl().getDisplay().addFilter(SWT.MouseWheel, new Listener() {
|
||||
@Override
|
||||
public void handleEvent(Event e) {
|
||||
// Check if it's the correct widget
|
||||
if((e.widget.equals(waveformCanvas) || e.widget.equals(this)) && (e.stateMask & SWT.CTRL) != 0) {
|
||||
waveformMouseListener.handleEvent(e);
|
||||
e.doit = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void createTextPane(Composite namePane, String text) {
|
||||
|
@ -518,7 +529,6 @@ public class WaveformView implements IWaveformView {
|
|||
boolean even = true;
|
||||
TextLayout tl = new TextLayout(waveformCanvas.getDisplay());
|
||||
tl.setFont(styleProvider.getNameFont());
|
||||
waveformsContainTx=false;
|
||||
for (TrackEntry streamEntry : streams) {
|
||||
streamEntry.height = styleProvider.getTrackHeight();
|
||||
streamEntry.vOffset = tracksVerticalHeight;
|
||||
|
@ -526,7 +536,6 @@ public class WaveformView implements IWaveformView {
|
|||
streamEntry.currentValue = "";
|
||||
streamEntry.height *= streamEntry.waveform.getRowCount();
|
||||
painter = new StreamPainter(waveformCanvas, even, streamEntry);
|
||||
waveformsContainTx=true;
|
||||
} else if (streamEntry.waveform.getType() == WaveformType.SIGNAL) {
|
||||
streamEntry.currentValue = "---";
|
||||
painter = new SignalPainter(waveformCanvas, even, streamEntry);
|
||||
|
@ -762,27 +771,30 @@ public class WaveformView implements IWaveformView {
|
|||
if (!add)
|
||||
currentWaveformSelection.clear();
|
||||
List<?> selList = sel.toList();
|
||||
if (selList.get(0) instanceof ITx) {
|
||||
ITx txSel = (ITx) selList.get(0);
|
||||
TrackEntry trackEntry = selList.size() == 2 && selList.get(1) instanceof TrackEntry
|
||||
? (TrackEntry) selList.get(1)
|
||||
: null;
|
||||
if (trackEntry == null) {
|
||||
trackEntry = getEntryFor(txSel);
|
||||
if (trackEntry == null && addIfNeeded) {
|
||||
trackEntry = new TrackEntry(txSel.getStream(), styleProvider);
|
||||
streams.add(trackEntry);
|
||||
for(Object o: selList) {
|
||||
if (o instanceof ITx) {
|
||||
ITx txSel = (ITx) o;
|
||||
TrackEntry trackEntry = selList.size() == 2 && selList.get(1) instanceof TrackEntry
|
||||
? (TrackEntry) selList.get(1)
|
||||
: null;
|
||||
if (trackEntry == null) {
|
||||
trackEntry = getEntryFor(txSel);
|
||||
if (trackEntry == null && addIfNeeded) {
|
||||
trackEntry = new TrackEntry(txSel.getStream(), styleProvider);
|
||||
streams.add(trackEntry);
|
||||
}
|
||||
}
|
||||
currentTxSelection = txSel;
|
||||
currentWaveformSelection.clear();
|
||||
currentWaveformSelection.add(trackEntry);
|
||||
selectionChanged = true;
|
||||
} else if (o instanceof TrackEntry) {
|
||||
TrackEntry e = (TrackEntry)o;
|
||||
if(!currentWaveformSelection.contains(e))
|
||||
currentWaveformSelection.add(e);
|
||||
selectionChanged = true;
|
||||
}
|
||||
currentTxSelection = txSel;
|
||||
currentWaveformSelection.clear();
|
||||
currentWaveformSelection.add(trackEntry);
|
||||
selectionChanged = true;
|
||||
} else if (selList.size() == 1 && selList.get(0) instanceof TrackEntry) {
|
||||
currentWaveformSelection.add((TrackEntry) selList.get(0));
|
||||
if (currentTxSelection != null)
|
||||
currentTxSelection = null;
|
||||
selectionChanged = true;
|
||||
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -1563,4 +1575,9 @@ public class WaveformView implements IWaveformView {
|
|||
getStreamList().add(idx, e);
|
||||
return e;
|
||||
}
|
||||
|
||||
public boolean waveformsContainsTx() {
|
||||
return streams.stream().filter(e -> e.waveform.getType() == WaveformType.TRANSACTION).findFirst().isPresent();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.minres.scviewer</groupId>
|
||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||
<version>2.14.1</version>
|
||||
<version>2.14.2</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>com.minres.scviewer</groupId>
|
||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||
<version>2.14.1</version>
|
||||
<version>2.14.2</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
|
|
|
@ -12,18 +12,19 @@
|
|||
<children xsi:type="basic:Part" xmi:id="_hXh-kEYFEeyPM8G0E2EYww" elementId="com.minres.scviewer.e4.application.dialog.onlinehelp" toBeRendered="false" visible="false" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.parts.HelpDialog" label="SCViewer Online Help" bindingContexts="_95Pfu3NmEeWBq8z1Dv39LA" closeable="true"/>
|
||||
<mainMenu xmi:id="_95PfyXNmEeWBq8z1Dv39LA" elementId="menu:org.eclipse.ui.main.menu">
|
||||
<children xsi:type="menu:Menu" xmi:id="_95QGwHNmEeWBq8z1Dv39LA" elementId="com.minres.scviewer.e4.application.menu.file" label="File">
|
||||
<children xsi:type="menu:HandledMenuItem" xmi:id="_igsK0BkREeudD5MqrWoETQ" elementId="" label="Open Database" iconURI="platform:/plugin/com.minres.scviewer.e4.application/icons/folder_database.png" mnemonics="M1+O" command="_95PfwHNmEeWBq8z1Dv39LA"/>
|
||||
<children xsi:type="menu:HandledMenuItem" xmi:id="_VJG3YHgvEeWwZ-9vrAR2UQ" elementId="" label="Re-load Database" iconURI="platform:/plugin/com.minres.scviewer.e4.application/icons/database_refresh.png" mnemonics="M1+R" command="_srACsBkREeudD5MqrWoETQ"/>
|
||||
<children xsi:type="menu:HandledMenuItem" xmi:id="_igsK0BkREeudD5MqrWoETQ" elementId="" label="Open Database" iconURI="platform:/plugin/com.minres.scviewer.e4.application/icons/folder_database.png" mnemonics="" command="_95PfwHNmEeWBq8z1Dv39LA"/>
|
||||
<children xsi:type="menu:HandledMenuItem" xmi:id="_VJG3YHgvEeWwZ-9vrAR2UQ" elementId="" label="Re-load Database" iconURI="platform:/plugin/com.minres.scviewer.e4.application/icons/database_refresh.png" mnemonics="" command="_srACsBkREeudD5MqrWoETQ"/>
|
||||
<children xsi:type="menu:HandledMenuItem" xmi:id="_e7MOYJedEeW09eyIbHsdvg" elementId="" label="Load active tab settings" iconURI="platform:/plugin/com.minres.scviewer.e4.application/icons/folder_page.png" command="_7-AIMJebEeW09eyIbHsdvg">
|
||||
<parameters xmi:id="_4vtYgJehEeW09eyIbHsdvg" elementId="com.minres.scviewer.e4.application.parameter.30" name="com.minres.scviewer.e4.application.commandparameter.loadStore" value="load"/>
|
||||
</children>
|
||||
<children xsi:type="menu:HandledMenuItem" xmi:id="_95QGwnNmEeWBq8z1Dv39LA" label="Save active tab settings" iconURI="platform:/plugin/com.minres.scviewer.e4.application/icons/script_save.png" command="_7-AIMJebEeW09eyIbHsdvg">
|
||||
<children xsi:type="menu:HandledMenuItem" xmi:id="_95QGwnNmEeWBq8z1Dv39LA" label="Save active tab settings" iconURI="platform:/plugin/com.minres.scviewer.e4.application/icons/script_save.png" mnemonics="" command="_7-AIMJebEeW09eyIbHsdvg">
|
||||
<parameters xmi:id="_61QIsJehEeW09eyIbHsdvg" elementId="com.minres.scviewer.e4.application.parameter.31" name="com.minres.scviewer.e4.application.commandparameter.loadStore" value="store"/>
|
||||
</children>
|
||||
<children xsi:type="menu:HandledMenuItem" xmi:id="_95QGw3NmEeWBq8z1Dv39LA" label="Quit" command="_95PfvHNmEeWBq8z1Dv39LA"/>
|
||||
</children>
|
||||
<children xsi:type="menu:Menu" xmi:id="_ZyHC0HgvEeWwZ-9vrAR2UQ" elementId="" label="Edit">
|
||||
<children xsi:type="menu:HandledMenuItem" xmi:id="_cPlx4HgvEeWwZ-9vrAR2UQ" elementId="com.minres.scviewer.e4.application.handledmenuitem.delete" label="Delete" iconURI="platform:/plugin/com.minres.scviewer.e4.application/icons/cross.png" command="_WUZ2wHXHEeWwZ-9vrAR2UQ"/>
|
||||
<children xsi:type="menu:HandledMenuItem" xmi:id="_FiwZcEhdEeyp3vLifEzGbQ" elementId="com.minres.scviewer.e4.application.handledmenuitem.delete" label="Delete" iconURI="platform:/plugin/com.minres.scviewer.e4.application/icons/cross.png" command="_WUZ2wHXHEeWwZ-9vrAR2UQ"/>
|
||||
<children xsi:type="menu:HandledMenuItem" xmi:id="_cPlx4HgvEeWwZ-9vrAR2UQ" elementId="com.minres.scviewer.e4.application.handledmenuitem.delete" label="Select All" iconURI="" command="_bV-TMHXHEeWwZ-9vrAR2UQ"/>
|
||||
</children>
|
||||
<children xsi:type="menu:Menu" xmi:id="_XmZY4HchEeWwZ-9vrAR2UQ" elementId="com.minres.scviewer.e4.application.menu.navigate" label="Navigate">
|
||||
<children xsi:type="menu:Menu" xmi:id="_VCn_cHgwEeWwZ-9vrAR2UQ" elementId="com.minres.scviewer.e4.application.menu.waveform" label="Waveform ...">
|
||||
|
@ -109,10 +110,10 @@
|
|||
<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 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" command="_693GoHcqEeWwZ-9vrAR2UQ">
|
||||
<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 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" command="_693GoHcqEeWwZ-9vrAR2UQ">
|
||||
<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>
|
||||
|
@ -134,9 +135,6 @@
|
|||
</children>
|
||||
</trimBars>
|
||||
</children>
|
||||
<children xsi:type="basic:Window" xmi:id="_Gm0qAEamEeyPDuc8x6Ggxw" elementId="com.minres.scviewer.e4.application.window.help" toBeRendered="false" selectedElement="_M5eT0EamEeyPDuc8x6Ggxw" label="SC Viewer Help" width="800" height="600">
|
||||
<children xsi:type="basic:Part" xmi:id="_M5eT0EamEeyPDuc8x6Ggxw" elementId="com.minres.scviewer.e4.application.part.container" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.parts.help.HelpBrowser"/>
|
||||
</children>
|
||||
<handlers xmi:id="_95PfvXNmEeWBq8z1Dv39LA" elementId="com.minres.scviewer.e4.application.handler.quitCommand" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.QuitHandler" command="_95PfvHNmEeWBq8z1Dv39LA"/>
|
||||
<handlers xmi:id="_95PfwXNmEeWBq8z1Dv39LA" elementId="com.minres.scviewer.e4.application.handler.openCommand" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.OpenHandler" command="_95PfwHNmEeWBq8z1Dv39LA"/>
|
||||
<handlers xmi:id="_95PfxHNmEeWBq8z1Dv39LA" elementId="com.minres.scviewer.e4.application.handler.saveCommand" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.SaveHandler" command="_95Pfw3NmEeWBq8z1Dv39LA"/>
|
||||
|
@ -156,16 +154,7 @@
|
|||
<bindings xmi:id="_95Pfv3NmEeWBq8z1Dv39LA" elementId="com.minres.scviewer.e4.application.keybinding.quit" keySequence="M1+Q" command="_95PfvHNmEeWBq8z1Dv39LA">
|
||||
<tags>type:user</tags>
|
||||
</bindings>
|
||||
</bindingTables>
|
||||
<bindingTables xmi:id="_zZFy0GVNEeqSQM-A6dw9ig" elementId="com.minres.scviewer.e4.application.bindingtable.waveform" bindingContext="_q4VSsGVNEeqSQM-A6dw9ig">
|
||||
<bindings xmi:id="_1o3dEGVNEeqSQM-A6dw9ig" elementId="com.minres.scviewer.e4.application.keybinding.zoom_in" keySequence="M1++" command="_693GoHcqEeWwZ-9vrAR2UQ">
|
||||
<tags>type:user</tags>
|
||||
<parameters xmi:id="_53UagGVNEeqSQM-A6dw9ig" elementId="com.minres.scviewer.e4.application.parameter.33" name="com.minres.scviewer.e4.application.command.zoomcommand.parameter.level" value="in"/>
|
||||
</bindings>
|
||||
<bindings xmi:id="_8i3awGVNEeqSQM-A6dw9ig" elementId="com.minres.scviewer.e4.application.keybinding.zoom_out" keySequence="M1+-" command="_693GoHcqEeWwZ-9vrAR2UQ">
|
||||
<tags>type:user</tags>
|
||||
<parameters xmi:id="__UCh4GVNEeqSQM-A6dw9ig" elementId="com.minres.scviewer.e4.application.parameter.34" name="com.minres.scviewer.e4.application.command.zoomcommand.parameter.level" value="out"/>
|
||||
</bindings>
|
||||
<bindings xmi:id="_2-008EhnEeyp3vLifEzGbQ" elementId="com.minres.scviewer.e4.application.keybinding.help" keySequence="F1" command="_lqjIYEYEEeyPM8G0E2EYww"/>
|
||||
</bindingTables>
|
||||
<bindingTables xmi:id="_XullMGVOEeqSQM-A6dw9ig" elementId="com.minres.scviewer.e4.application.bindingtable.window" bindingContext="_95PfunNmEeWBq8z1Dv39LA">
|
||||
<bindings xmi:id="_95PfwnNmEeWBq8z1Dv39LA" elementId="com.minres.scviewer.e4.application.keybinding.load" keySequence="M1+L" command="_7-AIMJebEeW09eyIbHsdvg">
|
||||
|
@ -182,20 +171,22 @@
|
|||
<bindings xmi:id="_3PRIQGVPEeqSQM-A6dw9ig" elementId="com.minres.scviewer.e4.application.keybinding.open" keySequence="M1+O" command="_95PfwHNmEeWBq8z1Dv39LA">
|
||||
<tags>type:user</tags>
|
||||
</bindings>
|
||||
</bindingTables>
|
||||
<bindingTables xmi:id="_mnMrUGVmEeqSQM-A6dw9ig" elementId="com.minres.scviewer.e4.application.bindingtable.0" bindingContext="_iQ3kQGVmEeqSQM-A6dw9ig">
|
||||
<bindings xmi:id="_n9yDwGVmEeqSQM-A6dw9ig" elementId="com.minres.scviewer.e4.application.keybinding.0" keySequence="M1+A" command="_bV-TMHXHEeWwZ-9vrAR2UQ">
|
||||
<bindings xmi:id="_QcOn8EheEeyp3vLifEzGbQ" elementId="com.minres.scviewer.e4.application.keybinding.1" keySequence="M1+A" command="_bV-TMHXHEeWwZ-9vrAR2UQ"/>
|
||||
<bindings xmi:id="_1o3dEGVNEeqSQM-A6dw9ig" elementId="com.minres.scviewer.e4.application.keybinding.zoom_in" keySequence="M1++" command="_693GoHcqEeWwZ-9vrAR2UQ">
|
||||
<tags>type:user</tags>
|
||||
<parameters xmi:id="_53UagGVNEeqSQM-A6dw9ig" elementId="com.minres.scviewer.e4.application.parameter.33" name="com.minres.scviewer.e4.application.command.zoomcommand.parameter.level" value="in"/>
|
||||
</bindings>
|
||||
<bindings xmi:id="_8i3awGVNEeqSQM-A6dw9ig" elementId="com.minres.scviewer.e4.application.keybinding.zoom_out" keySequence="M1+-" command="_693GoHcqEeWwZ-9vrAR2UQ">
|
||||
<tags>type:user</tags>
|
||||
<parameters xmi:id="__UCh4GVNEeqSQM-A6dw9ig" elementId="com.minres.scviewer.e4.application.parameter.34" name="com.minres.scviewer.e4.application.command.zoomcommand.parameter.level" value="out"/>
|
||||
</bindings>
|
||||
<bindings xmi:id="_KjmnsEheEeyp3vLifEzGbQ" elementId="com.minres.scviewer.e4.application.keybinding.0" keySequence="M1+R" command="_srACsBkREeudD5MqrWoETQ"/>
|
||||
</bindingTables>
|
||||
<rootContext xmi:id="_95PfuXNmEeWBq8z1Dv39LA" elementId="org.eclipse.ui.contexts.dialogAndWindow" name="In Dialog and Windows">
|
||||
<children xmi:id="_95PfunNmEeWBq8z1Dv39LA" elementId="org.eclipse.ui.contexts.window" name="In Windows">
|
||||
<children xmi:id="_q4VSsGVNEeqSQM-A6dw9ig" elementId="com.minres.scviewer.e4.application.bindingcontext.waveform" name="In Waveform Part"/>
|
||||
<children xmi:id="_iQ3kQGVmEeqSQM-A6dw9ig" elementId="com.minres.scviewer.e4.application.bindingcontext.indesignbrowser" name="In DesignBrowser"/>
|
||||
</children>
|
||||
<children xmi:id="_95PfunNmEeWBq8z1Dv39LA" elementId="org.eclipse.ui.contexts.window" name="In Windows"/>
|
||||
<children xmi:id="_95Pfu3NmEeWBq8z1Dv39LA" elementId="org.eclipse.ui.contexts.dialog" name="In Dialogs"/>
|
||||
</rootContext>
|
||||
<descriptors xmi:id="_KicY0HRMEeWBq8z1Dv39LA" elementId="com.minres.scviewer.e4.application.partdescriptor.waveformviewer" label="SCViewer" iconURI="platform:/plugin/com.minres.scviewer.e4.application/icons/scviewer.png" bindingContexts="_q4VSsGVNEeqSQM-A6dw9ig" allowMultiple="true" category="General" closeable="true" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.parts.WaveformViewer">
|
||||
<descriptors xmi:id="_KicY0HRMEeWBq8z1Dv39LA" elementId="com.minres.scviewer.e4.application.partdescriptor.waveformviewer" label="SCViewer" iconURI="platform:/plugin/com.minres.scviewer.e4.application/icons/scviewer.png" allowMultiple="true" category="General" closeable="true" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.parts.WaveformViewer">
|
||||
<tags>categoryTag:General</tags>
|
||||
<handlers xmi:id="_BSIuEHacEeWwZ-9vrAR2UQ" elementId="com.minres.scviewer.e4.application.handler.navigateEventCommand" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.NavigateEvent" command="_79rx4HabEeWwZ-9vrAR2UQ"/>
|
||||
<handlers xmi:id="_JpdGwHXKEeWwZ-9vrAR2UQ" elementId="com.minres.scviewer.e4.application.handler.navigateTransCommand" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.NavigateTrans" command="_Gn3lEHXKEeWwZ-9vrAR2UQ"/>
|
||||
|
@ -251,6 +242,9 @@
|
|||
</children>
|
||||
</menus>
|
||||
</descriptors>
|
||||
<snippets xsi:type="basic:Window" xmi:id="_R8mJUEhwEeyp3vLifEzGbQ" elementId="com.minres.scviewer.e4.application.window.help" selectedElement="_R8mJUUhwEeyp3vLifEzGbQ" label="SC Viewer Help" width="800" height="600">
|
||||
<children xsi:type="basic:Part" xmi:id="_R8mJUUhwEeyp3vLifEzGbQ" elementId="com.minres.scviewer.e4.application.part.container" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.parts.help.HelpBrowser"/>
|
||||
</snippets>
|
||||
<commands xmi:id="_95PfvHNmEeWBq8z1Dv39LA" elementId="org.eclipse.ui.file.exit" commandName="Quit Command"/>
|
||||
<commands xmi:id="_95PfwHNmEeWBq8z1Dv39LA" elementId="com.minres.scviewer.e4.application.open" commandName="Open Command"/>
|
||||
<commands xmi:id="_95Pfw3NmEeWBq8z1Dv39LA" elementId="org.eclipse.ui.file.save" commandName="Save Command"/>
|
||||
|
|
|
@ -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.14.1
|
||||
Bundle-Version: 2.14.2
|
||||
Bundle-Vendor: %Bundle-Vendor
|
||||
Require-Bundle: javax.inject;bundle-version="1.0.0",
|
||||
org.eclipse.core.runtime;bundle-version="3.11.1",
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<parent>
|
||||
<groupId>com.minres.scviewer</groupId>
|
||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||
<version>2.14.1</version>
|
||||
<version>2.14.2</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
|
|
|
@ -10,23 +10,24 @@
|
|||
*******************************************************************************/
|
||||
package com.minres.scviewer.e4.application.handlers;
|
||||
|
||||
import org.eclipse.e4.core.di.annotations.CanExecute;
|
||||
import org.eclipse.e4.core.di.annotations.Execute;
|
||||
import org.eclipse.e4.ui.model.application.MApplication;
|
||||
import org.eclipse.e4.ui.model.application.ui.MUIElement;
|
||||
import org.eclipse.e4.ui.model.application.ui.basic.MWindow;
|
||||
import org.eclipse.e4.ui.workbench.modeling.EModelService;
|
||||
|
||||
public class HelpHandler {
|
||||
|
||||
static final String DIALOG_ID="com.minres.scviewer.e4.application.dialog.onlinehelp"; //$NON-NLS-1$
|
||||
static final String WINDOW_ID="com.minres.scviewer.e4.application.window.help"; //$NON-NLS-1$
|
||||
@CanExecute
|
||||
public boolean canExecute(MApplication app) {
|
||||
return !app.getChildren().stream().filter(e -> e.getElementId().equals(WINDOW_ID)).findFirst().isPresent();
|
||||
}
|
||||
|
||||
@Execute
|
||||
public void execute(MApplication app, /*MWindow window,*/ EModelService ms /*@Named("mdialog01.dialog.0") MDialog dialog*/) {
|
||||
// MPart mel = (MPart) ms.find(DIALOG_ID, app); //$NON-NLS-1$
|
||||
// mel.setToBeRendered(true);
|
||||
// mel.setToBeRendered(false);
|
||||
MUIElement w = ms.find(WINDOW_ID, app);
|
||||
if(w!=null) w.setToBeRendered(true);
|
||||
public void execute(MApplication app, MWindow window, EModelService modelService /*@Named("mdialog01.dialog.0") MDialog dialog*/) {
|
||||
MWindow newWin = (MWindow)modelService.cloneSnippet(app, WINDOW_ID, null);
|
||||
app.getChildren().add(newWin);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -11,33 +11,26 @@
|
|||
|
||||
package com.minres.scviewer.e4.application.handlers;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import org.eclipse.e4.core.di.annotations.CanExecute;
|
||||
import org.eclipse.e4.core.di.annotations.Execute;
|
||||
import org.eclipse.e4.core.di.annotations.Optional;
|
||||
import org.eclipse.e4.ui.model.application.ui.basic.MPart;
|
||||
import org.eclipse.e4.ui.workbench.modeling.EPartService;
|
||||
|
||||
import com.minres.scviewer.e4.application.parts.DesignBrowser;
|
||||
import com.minres.scviewer.e4.application.parts.WaveformViewer;
|
||||
|
||||
public class SelectAllHandler {
|
||||
|
||||
@Inject @Optional DesignBrowser designBrowser;
|
||||
@CanExecute
|
||||
public boolean canExecute(EPartService partService) {
|
||||
MPart part = partService.getActivePart();
|
||||
return part.getObject() instanceof WaveformViewer;
|
||||
}
|
||||
|
||||
@Execute
|
||||
public void execute(EPartService partService) {
|
||||
if(designBrowser==null) designBrowser = getListPart(partService);
|
||||
if(designBrowser!=null){
|
||||
designBrowser.selectAllWaveforms();
|
||||
}
|
||||
MPart part = partService.getActivePart();
|
||||
if(part.getObject() instanceof WaveformViewer)
|
||||
((WaveformViewer) part.getObject()).selectAll();
|
||||
}
|
||||
|
||||
protected DesignBrowser getListPart(EPartService partService){
|
||||
MPart part = partService.getActivePart();
|
||||
if(part.getObject() instanceof DesignBrowser)
|
||||
return (DesignBrowser) part.getObject();
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
|
@ -85,7 +85,7 @@ 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_6=https://minres.github.io/SCViewer/#key-shortcuts
|
||||
HelpDialog_7=Could not instantiate Browser:
|
||||
marker=Marker
|
||||
marker_text=Marker TExt
|
||||
|
|
|
@ -226,6 +226,10 @@ public class DesignBrowser {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
public Control getControl() {
|
||||
return top;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the table composite.
|
||||
|
|
|
@ -337,6 +337,8 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
|||
case SWT.ARROW_DOWN:
|
||||
waveformPane.moveSelectedTrack(1);
|
||||
return;
|
||||
case 'a':
|
||||
selectAll();
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -1269,4 +1271,11 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
|||
} catch (BackingStoreException e) {}
|
||||
}
|
||||
}
|
||||
|
||||
public void selectAll() {
|
||||
List<TrackEntry> entries = waveformPane.getStreamList();
|
||||
ISelection sel = new StructuredSelection(entries);
|
||||
waveformPane.setSelection(sel);
|
||||
designBrowser.selectAllWaveforms();
|
||||
}
|
||||
}
|
|
@ -3,8 +3,11 @@ package com.minres.scviewer.e4.application.parts.help;
|
|||
import java.io.File;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.annotation.PreDestroy;
|
||||
import javax.inject.Inject;
|
||||
|
||||
import org.eclipse.e4.core.contexts.IEclipseContext;
|
||||
import org.eclipse.e4.ui.model.application.ui.MUIElement;
|
||||
import org.eclipse.jface.dialogs.MessageDialog;
|
||||
import org.eclipse.jface.resource.ImageDescriptor;
|
||||
import org.eclipse.jface.resource.ResourceLocator;
|
||||
|
@ -21,6 +24,7 @@ import org.eclipse.swt.widgets.Control;
|
|||
import org.eclipse.swt.widgets.Label;
|
||||
import org.eclipse.swt.widgets.Listener;
|
||||
import org.eclipse.swt.widgets.ProgressBar;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
import org.eclipse.swt.widgets.Text;
|
||||
import org.eclipse.swt.widgets.ToolBar;
|
||||
import org.eclipse.swt.widgets.ToolItem;
|
||||
|
@ -29,6 +33,10 @@ import com.minres.scviewer.e4.application.Messages;
|
|||
|
||||
public class HelpBrowser {
|
||||
|
||||
@Inject IEclipseContext ctx;
|
||||
|
||||
@Inject MUIElement element;
|
||||
|
||||
private static void decorateItem(ToolItem item, String label, String imageName) {
|
||||
String fullpath = File.separator+"icons"+File.separator+imageName; //$NON-NLS-1$
|
||||
ImageDescriptor descr = ResourceLocator.imageDescriptorFromBundle("com.minres.scviewer.e4.application", fullpath).orElse(null); //$NON-NLS-1$
|
||||
|
@ -41,13 +49,12 @@ public class HelpBrowser {
|
|||
item.setData(label);
|
||||
}
|
||||
|
||||
@Inject
|
||||
public HelpBrowser() {
|
||||
|
||||
}
|
||||
|
||||
@PostConstruct
|
||||
protected Control createComposite(Composite container) {
|
||||
// container.getShell().addListener(SWT.Close, e -> {
|
||||
// e.doit= false;
|
||||
// element.setVisible(false);
|
||||
// });
|
||||
GridLayout gridLayout = new GridLayout();
|
||||
gridLayout.numColumns = 3;
|
||||
container.setLayout(gridLayout);
|
||||
|
@ -141,6 +148,8 @@ public class HelpBrowser {
|
|||
}
|
||||
return container;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void handleShellCloseEvent(){
|
||||
|
||||
}
|
||||
}
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>com.minres.scviewer</groupId>
|
||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||
<version>2.14.1</version>
|
||||
<version>2.14.2</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
|
|
4
pom.xml
4
pom.xml
|
@ -4,7 +4,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.minres.scviewer</groupId>
|
||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||
<version>2.14.1</version>
|
||||
<version>2.14.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.14.1</version>
|
||||
<version>2.14.2</version>
|
||||
</artifact>
|
||||
</target>
|
||||
<environments>
|
||||
|
|
|
@ -6,11 +6,11 @@
|
|||
<parent>
|
||||
<groupId>com.minres.scviewer</groupId>
|
||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||
<version>2.14.1</version>
|
||||
<version>2.14.2</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
<artifactId>com.minres.scviewer.e4.product</artifactId>
|
||||
<version>2.14.1</version>
|
||||
<version>2.14.2</version>
|
||||
<packaging>eclipse-repository</packaging>
|
||||
<groupId>com.minres.scviewer</groupId>
|
||||
<build>
|
||||
|
|
|
@ -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.14.1" 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.2" useFeatures="true" includeLaunchers="true">
|
||||
|
||||
<configIni use="default">
|
||||
</configIni>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<parent>
|
||||
<groupId>com.minres.scviewer</groupId>
|
||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||
<version>2.14.1</version>
|
||||
<version>2.14.2</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<parent>
|
||||
<groupId>com.minres.scviewer</groupId>
|
||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||
<version>2.14.1</version>
|
||||
<version>2.14.2</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
<build>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<parent>
|
||||
<groupId>com.minres.scviewer</groupId>
|
||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||
<version>2.14.1</version>
|
||||
<version>2.14.2</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
<packaging>eclipse-test-plugin</packaging>
|
||||
|
|
Loading…
Reference in New Issue