Compare commits

..

1 Commits

Author SHA1 Message Date
ccc8d80ac2 add help plugin and handler, eclipse help does not start 2021-11-16 18:24:30 +01:00
58 changed files with 526 additions and 326 deletions

View File

@@ -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>

View File

@@ -5,8 +5,8 @@
<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.14.2</version> <version>2.14.1</version>
<relativePath>../..</relativePath> <relativePath>../../..</relativePath>
</parent> </parent>
<version>3.0.0-SNAPSHOT</version> <version>3.0.0-SNAPSHOT</version>
</project> </project>

View File

@@ -64,4 +64,11 @@
version="0.0.0" version="0.0.0"
unpack="false"/> unpack="false"/>
<plugin
id="com.minres.scviewer.help"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
</feature> </feature>

View File

@@ -5,8 +5,8 @@
<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.14.2</version> <version>2.14.1</version>
<relativePath>../..</relativePath> <relativePath>../../..</relativePath>
</parent> </parent>
<version>1.1.0-SNAPSHOT</version> <version>1.1.0-SNAPSHOT</version>
</project> </project>

View File

@@ -5,8 +5,8 @@
<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.14.2</version> <version>2.14.1</version>
<relativePath>../..</relativePath> <relativePath>../../..</relativePath>
</parent> </parent>
<version>1.0.0-SNAPSHOT</version> <version>1.0.0-SNAPSHOT</version>
</project> </project>

View File

@@ -5,8 +5,8 @@
<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.14.2</version> <version>2.14.1</version>
<relativePath>../..</relativePath> <relativePath>../../..</relativePath>
</parent> </parent>
<version>1.1.0-SNAPSHOT</version> <version>1.1.0-SNAPSHOT</version>
</project> </project>

View File

@@ -5,8 +5,8 @@
<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.14.2</version> <version>2.14.1</version>
<relativePath>../..</relativePath> <relativePath>../../..</relativePath>
</parent> </parent>
<version>1.1.0-SNAPSHOT</version> <version>1.1.0-SNAPSHOT</version>
</project> </project>

View File

@@ -4,8 +4,8 @@
<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.14.2</version> <version>2.14.1</version>
<relativePath>../..</relativePath> <relativePath>../../..</relativePath>
</parent> </parent>
<packaging>eclipse-plugin</packaging> <packaging>eclipse-plugin</packaging>
<dependencies> <dependencies>

View File

@@ -6,8 +6,8 @@
<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.14.2</version> <version>2.14.1</version>
<relativePath>../..</relativePath> <relativePath>../../..</relativePath>
</parent> </parent>
<packaging>eclipse-plugin</packaging> <packaging>eclipse-plugin</packaging>

View File

@@ -5,8 +5,8 @@
<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.14.2</version> <version>2.14.1</version>
<relativePath>../..</relativePath> <relativePath>../../..</relativePath>
</parent> </parent>
<version>4.0.0-SNAPSHOT</version> <version>4.0.0-SNAPSHOT</version>
</project> </project>

View File

@@ -179,7 +179,6 @@ public class WaveformCanvas extends Canvas {
} }
public void setZoomLevel(int level, long centerTime) { public void setZoomLevel(int level, long centerTime) {
int maxLevel = findFitZoomLevel(maxTime);
if(level<0) { if(level<0) {
if(level<-1) { if(level<-1) {
long cTime = getCursorPainters().get(0).getTime(); long cTime = getCursorPainters().get(0).getTime();
@@ -187,11 +186,11 @@ public class WaveformCanvas extends Canvas {
level = findFitZoomLevel(time_diff); level = findFitZoomLevel(time_diff);
centerTime = (centerTime>cTime?cTime:centerTime)+time_diff/2; centerTime = (centerTime>cTime?cTime:centerTime)+time_diff/2;
} else } else
level=maxLevel; 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
if(level<Constants.SCALE_MULTIPLIER.length*Constants.UNIT_STRING.length && level <= maxLevel){ if(level<Constants.SCALE_MULTIPLIER.length*Constants.UNIT_STRING.length){
int scale = level%Constants.SCALE_MULTIPLIER.length; int scale = level%Constants.SCALE_MULTIPLIER.length;
int unit = level/Constants.SCALE_MULTIPLIER.length; int unit = level/Constants.SCALE_MULTIPLIER.length;
this.scaleFactor = Constants.UNIT_MULTIPLIER[unit]*Constants.SCALE_MULTIPLIER[scale]; this.scaleFactor = Constants.UNIT_MULTIPLIER[unit]*Constants.SCALE_MULTIPLIER[scale];

View File

@@ -122,6 +122,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;
@@ -160,7 +166,8 @@ public class WaveformView implements IWaveformView {
: streams.subList(firstIdx, lastIdx + 1); : streams.subList(firstIdx, lastIdx + 1);
setSelection(new StructuredSelection(res), (e.stateMask & SWT.CTRL) != 0, false); setSelection(new StructuredSelection(res), (e.stateMask & SWT.CTRL) != 0, false);
} else } else
setSelection(new StructuredSelection(entry.getValue()), (e.stateMask & SWT.CTRL) != 0, false); setSelection(new StructuredSelection(entry.getValue()), (e.stateMask & SWT.CTRL) != 0,
false);
} else { } else {
setSelection(new StructuredSelection(entry.getValue()), (e.stateMask & SWT.CTRL) != 0, false); setSelection(new StructuredSelection(entry.getValue()), (e.stateMask & SWT.CTRL) != 0, false);
} }
@@ -288,15 +295,8 @@ public class WaveformView implements IWaveformView {
@Override @Override
public void handleEvent(Event e) { public void handleEvent(Event e) {
switch (e.type) { switch (e.type) {
case SWT.MouseWheel: // case SWT.MouseWheel:
if((e.stateMask & SWT.CTRL) != 0) { // break;
int zoom = waveformCanvas.getZoomLevel();
if(e.count<0)
waveformCanvas.setZoomLevel(zoom+1);
else
waveformCanvas.setZoomLevel(zoom-1);
}
break;
case SWT.MouseDown: case SWT.MouseDown:
start = new Point(e.x, e.y); start = new Point(e.x, e.y);
end = new Point(e.x, e.y); end = new Point(e.x, e.y);
@@ -469,17 +469,6 @@ public class WaveformView implements IWaveformView {
toolTipHandler = new ToolTipHandler(parent.getShell()); toolTipHandler = new ToolTipHandler(parent.getShell());
toolTipHandler.activateHoverHelp(waveformCanvas); 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) { private void createTextPane(Composite namePane, String text) {
@@ -529,6 +518,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;
@@ -536,6 +526,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);
@@ -771,30 +762,27 @@ public class WaveformView implements IWaveformView {
if (!add) if (!add)
currentWaveformSelection.clear(); currentWaveformSelection.clear();
List<?> selList = sel.toList(); List<?> selList = sel.toList();
for(Object o: selList) { if (selList.get(0) instanceof ITx) {
if (o instanceof ITx) { ITx txSel = (ITx) selList.get(0);
ITx txSel = (ITx) o; TrackEntry trackEntry = selList.size() == 2 && selList.get(1) instanceof TrackEntry
TrackEntry trackEntry = selList.size() == 2 && selList.get(1) instanceof TrackEntry ? (TrackEntry) selList.get(1)
? (TrackEntry) selList.get(1) : null;
: null; if (trackEntry == null) {
if (trackEntry == null) { trackEntry = getEntryFor(txSel);
trackEntry = getEntryFor(txSel); if (trackEntry == null && addIfNeeded) {
if (trackEntry == null && addIfNeeded) { trackEntry = new TrackEntry(txSel.getStream(), styleProvider);
trackEntry = new TrackEntry(txSel.getStream(), styleProvider); streams.add(trackEntry);
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 { } else {
@@ -1575,9 +1563,4 @@ public class WaveformView implements IWaveformView {
getStreamList().add(idx, e); getStreamList().add(idx, e);
return e; return e;
} }
public boolean waveformsContainsTx() {
return streams.stream().filter(e -> e.waveform.getType() == WaveformType.TRANSACTION).findFirst().isPresent();
}
} }

View File

@@ -5,8 +5,8 @@
<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.14.2</version> <version>2.14.1</version>
<relativePath>../..</relativePath> <relativePath>../../..</relativePath>
</parent> </parent>
<packaging>eclipse-plugin</packaging> <packaging>eclipse-plugin</packaging>
</project> </project>

View File

@@ -4,8 +4,8 @@
<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.14.2</version> <version>2.14.1</version>
<relativePath>../..</relativePath> <relativePath>../../..</relativePath>
</parent> </parent>
<packaging>eclipse-plugin</packaging> <packaging>eclipse-plugin</packaging>
<version>4.0.0-SNAPSHOT</version> <version>4.0.0-SNAPSHOT</version>

View File

@@ -12,19 +12,18 @@
<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"/> <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"> <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: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="" command="_95PfwHNmEeWBq8z1Dv39LA"/> <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="" command="_srACsBkREeudD5MqrWoETQ"/> <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="_e7MOYJedEeW09eyIbHsdvg" elementId="" label="Load active tab settings" iconURI="platform:/plugin/com.minres.scviewer.e4.application/icons/folder_page.png" command="_7-AIMJebEeW09eyIbHsdvg"> <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"/> <parameters xmi:id="_4vtYgJehEeW09eyIbHsdvg" elementId="com.minres.scviewer.e4.application.parameter.30" name="com.minres.scviewer.e4.application.commandparameter.loadStore" value="load"/>
</children> </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" mnemonics="" 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" 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"/> <parameters xmi:id="_61QIsJehEeW09eyIbHsdvg" elementId="com.minres.scviewer.e4.application.parameter.31" name="com.minres.scviewer.e4.application.commandparameter.loadStore" value="store"/>
</children> </children>
<children xsi:type="menu:HandledMenuItem" xmi:id="_95QGw3NmEeWBq8z1Dv39LA" label="Quit" command="_95PfvHNmEeWBq8z1Dv39LA"/> <children xsi:type="menu:HandledMenuItem" xmi:id="_95QGw3NmEeWBq8z1Dv39LA" label="Quit" command="_95PfvHNmEeWBq8z1Dv39LA"/>
</children> </children>
<children xsi:type="menu:Menu" xmi:id="_ZyHC0HgvEeWwZ-9vrAR2UQ" elementId="" label="Edit"> <children xsi:type="menu:Menu" xmi:id="_ZyHC0HgvEeWwZ-9vrAR2UQ" elementId="" label="Edit">
<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="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>
<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="_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 ..."> <children xsi:type="menu:Menu" xmi:id="_VCn_cHgwEeWwZ-9vrAR2UQ" elementId="com.minres.scviewer.e4.application.menu.waveform" label="Waveform ...">
@@ -110,10 +109,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"/> <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" 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.in" 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" 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.out" 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>
@@ -135,6 +134,9 @@
</children> </children>
</trimBars> </trimBars>
</children> </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="_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="_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"/> <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"/>
@@ -154,7 +156,16 @@
<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>
</bindings> </bindings>
<bindings xmi:id="_2-008EhnEeyp3vLifEzGbQ" elementId="com.minres.scviewer.e4.application.keybinding.help" keySequence="F1" command="_lqjIYEYEEeyPM8G0E2EYww"/> </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>
</bindingTables> </bindingTables>
<bindingTables xmi:id="_XullMGVOEeqSQM-A6dw9ig" elementId="com.minres.scviewer.e4.application.bindingtable.window" bindingContext="_95PfunNmEeWBq8z1Dv39LA"> <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"> <bindings xmi:id="_95PfwnNmEeWBq8z1Dv39LA" elementId="com.minres.scviewer.e4.application.keybinding.load" keySequence="M1+L" command="_7-AIMJebEeW09eyIbHsdvg">
@@ -171,22 +182,20 @@
<bindings xmi:id="_3PRIQGVPEeqSQM-A6dw9ig" elementId="com.minres.scviewer.e4.application.keybinding.open" keySequence="M1+O" command="_95PfwHNmEeWBq8z1Dv39LA"> <bindings xmi:id="_3PRIQGVPEeqSQM-A6dw9ig" elementId="com.minres.scviewer.e4.application.keybinding.open" keySequence="M1+O" command="_95PfwHNmEeWBq8z1Dv39LA">
<tags>type:user</tags> <tags>type:user</tags>
</bindings> </bindings>
<bindings xmi:id="_QcOn8EheEeyp3vLifEzGbQ" elementId="com.minres.scviewer.e4.application.keybinding.1" keySequence="M1+A" command="_bV-TMHXHEeWwZ-9vrAR2UQ"/> </bindingTables>
<bindings xmi:id="_1o3dEGVNEeqSQM-A6dw9ig" elementId="com.minres.scviewer.e4.application.keybinding.zoom_in" keySequence="M1++" command="_693GoHcqEeWwZ-9vrAR2UQ"> <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">
<tags>type:user</tags> <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>
<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> </bindingTables>
<rootContext xmi:id="_95PfuXNmEeWBq8z1Dv39LA" elementId="org.eclipse.ui.contexts.dialogAndWindow" name="In Dialog and Windows"> <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="_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="_95Pfu3NmEeWBq8z1Dv39LA" elementId="org.eclipse.ui.contexts.dialog" name="In Dialogs"/> <children xmi:id="_95Pfu3NmEeWBq8z1Dv39LA" elementId="org.eclipse.ui.contexts.dialog" name="In Dialogs"/>
</rootContext> </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" 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" bindingContexts="_q4VSsGVNEeqSQM-A6dw9ig" allowMultiple="true" category="General" closeable="true" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.parts.WaveformViewer">
<tags>categoryTag:General</tags> <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="_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"/> <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"/>
@@ -242,9 +251,6 @@
</children> </children>
</menus> </menus>
</descriptors> </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="_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="_95PfwHNmEeWBq8z1Dv39LA" elementId="com.minres.scviewer.e4.application.open" commandName="Open Command"/>
<commands xmi:id="_95Pfw3NmEeWBq8z1Dv39LA" elementId="org.eclipse.ui.file.save" commandName="Save Command"/> <commands xmi:id="_95Pfw3NmEeWBq8z1Dv39LA" elementId="org.eclipse.ui.file.save" commandName="Save Command"/>

View File

@@ -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.14.2 Bundle-Version: 2.14.1
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",
@@ -35,7 +35,8 @@ Require-Bundle: javax.inject;bundle-version="1.0.0",
org.eclipse.equinox.p2.core;bundle-version="2.6.300", org.eclipse.equinox.p2.core;bundle-version="2.6.300",
org.eclipse.equinox.p2.engine;bundle-version="2.6.600", org.eclipse.equinox.p2.engine;bundle-version="2.6.600",
org.eclipse.equinox.p2.operations;bundle-version="2.5.700", org.eclipse.equinox.p2.operations;bundle-version="2.5.700",
org.eclipse.equinox.p2.metadata.repository;bundle-version="1.3.400" org.eclipse.equinox.p2.metadata.repository;bundle-version="1.3.400",
org.eclipse.help.base;bundle-version="4.2.900"
Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-RequiredExecutionEnvironment: JavaSE-11
Import-Package: com.minres.scviewer.database, Import-Package: com.minres.scviewer.database,
javax.annotation;version="1.0.0";resolution:=optional, javax.annotation;version="1.0.0";resolution:=optional,

View File

@@ -6,8 +6,8 @@
<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.14.2</version> <version>2.14.1</version>
<relativePath>../..</relativePath> <relativePath>../../..</relativePath>
</parent> </parent>
<packaging>eclipse-plugin</packaging> <packaging>eclipse-plugin</packaging>
</project> </project>

View File

@@ -10,24 +10,41 @@
*******************************************************************************/ *******************************************************************************/
package com.minres.scviewer.e4.application.handlers; package com.minres.scviewer.e4.application.handlers;
import org.eclipse.e4.core.di.annotations.CanExecute; import java.io.File;
import java.net.URL;
import java.nio.file.Paths;
import org.eclipse.core.runtime.Platform;
import org.eclipse.e4.core.di.annotations.Execute; import org.eclipse.e4.core.di.annotations.Execute;
import org.eclipse.e4.ui.model.application.MApplication; import org.eclipse.e4.ui.model.application.MApplication;
import org.eclipse.e4.ui.model.application.ui.basic.MWindow; import org.eclipse.e4.ui.model.application.ui.MUIElement;
import org.eclipse.e4.ui.workbench.modeling.EModelService; import org.eclipse.e4.ui.workbench.modeling.EModelService;
import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
import org.eclipse.help.HelpSystem;
import org.eclipse.help.IHelp;
import org.eclipse.help.standalone.Help;
import org.eclipse.osgi.service.datalocation.Location;
public class HelpHandler { 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$ 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 @Execute
public void execute(MApplication app, MWindow window, EModelService modelService /*@Named("mdialog01.dialog.0") MDialog dialog*/) { public void execute(MApplication app, /*MWindow window,*/ EModelService ms /*@Named("mdialog01.dialog.0") MDialog dialog*/) {
MWindow newWin = (MWindow)modelService.cloneSnippet(app, WINDOW_ID, null); // MPart mel = (MPart) ms.find(DIALOG_ID, app); //$NON-NLS-1$
app.getChildren().add(newWin); // mel.setToBeRendered(true);
// mel.setToBeRendered(false);
try {
File installDir = Paths.get(Platform.getInstallLocation().getURL().toURI()).toFile();
File instanceDir = Paths.get(Platform.getInstanceLocation().getURL().toURI()).toFile();
Help helpSystem = new Help(new String[] {"-eclipseHome", installDir.getAbsolutePath(), "-data", instanceDir.getAbsolutePath()});
helpSystem.start();
helpSystem.displayHelp("/com.minres.scviewer.help/toc.xml");
} catch (Exception e) {
MUIElement w = ms.find(WINDOW_ID, app);
if(w!=null) w.setToBeRendered(true);
}
} }
} }

View File

@@ -11,26 +11,33 @@
package com.minres.scviewer.e4.application.handlers; package com.minres.scviewer.e4.application.handlers;
import org.eclipse.e4.core.di.annotations.CanExecute; import javax.inject.Inject;
import org.eclipse.e4.core.di.annotations.Execute; 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.model.application.ui.basic.MPart;
import org.eclipse.e4.ui.workbench.modeling.EPartService; import org.eclipse.e4.ui.workbench.modeling.EPartService;
import com.minres.scviewer.e4.application.parts.WaveformViewer; import com.minres.scviewer.e4.application.parts.DesignBrowser;
public class SelectAllHandler { public class SelectAllHandler {
@CanExecute @Inject @Optional DesignBrowser designBrowser;
public boolean canExecute(EPartService partService) {
MPart part = partService.getActivePart();
return part.getObject() instanceof WaveformViewer;
}
@Execute @Execute
public void execute(EPartService partService) { public void execute(EPartService partService) {
if(designBrowser==null) designBrowser = getListPart(partService);
if(designBrowser!=null){
designBrowser.selectAllWaveforms();
}
}
protected DesignBrowser getListPart(EPartService partService){
MPart part = partService.getActivePart(); MPart part = partService.getActivePart();
if(part.getObject() instanceof WaveformViewer) if(part.getObject() instanceof DesignBrowser)
((WaveformViewer) part.getObject()).selectAll(); return (DesignBrowser) part.getObject();
else
return null;
} }
} }

View File

@@ -85,7 +85,7 @@ HelpDialog_2=Stop
HelpDialog_3=Refresh HelpDialog_3=Refresh
HelpDialog_4=Go HelpDialog_4=Go
HelpDialog_5=Address HelpDialog_5=Address
HelpDialog_6=https://minres.github.io/SCViewer/#key-shortcuts HelpDialog_6=https://git.minres.com/VP-Tools/SCViewer/src/branch/master/README.md\#key-shortcuts
HelpDialog_7=Could not instantiate Browser: HelpDialog_7=Could not instantiate Browser:
marker=Marker marker=Marker
marker_text=Marker TExt marker_text=Marker TExt

View File

@@ -227,10 +227,6 @@ public class DesignBrowser {
}); });
} }
public Control getControl() {
return top;
}
/** /**
* Creates the table composite. * Creates the table composite.
* *

View File

@@ -337,8 +337,6 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
case SWT.ARROW_DOWN: case SWT.ARROW_DOWN:
waveformPane.moveSelectedTrack(1); waveformPane.moveSelectedTrack(1);
return; return;
case 'a':
selectAll();
default: default:
break; break;
} }
@@ -1271,11 +1269,4 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
} catch (BackingStoreException e) {} } catch (BackingStoreException e) {}
} }
} }
public void selectAll() {
List<TrackEntry> entries = waveformPane.getStreamList();
ISelection sel = new StructuredSelection(entries);
waveformPane.setSelection(sel);
designBrowser.selectAllWaveforms();
}
} }

View File

@@ -3,11 +3,8 @@ package com.minres.scviewer.e4.application.parts.help;
import java.io.File; import java.io.File;
import javax.annotation.PostConstruct; import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import javax.inject.Inject; 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.dialogs.MessageDialog;
import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ResourceLocator; import org.eclipse.jface.resource.ResourceLocator;
@@ -24,7 +21,6 @@ import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener; import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.ProgressBar; import org.eclipse.swt.widgets.ProgressBar;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text; 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;
@@ -33,10 +29,6 @@ import com.minres.scviewer.e4.application.Messages;
public class HelpBrowser { public class HelpBrowser {
@Inject IEclipseContext ctx;
@Inject MUIElement element;
private static void decorateItem(ToolItem item, String label, String imageName) { private static void decorateItem(ToolItem item, String label, String imageName) {
String fullpath = File.separator+"icons"+File.separator+imageName; //$NON-NLS-1$ 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$ ImageDescriptor descr = ResourceLocator.imageDescriptorFromBundle("com.minres.scviewer.e4.application", fullpath).orElse(null); //$NON-NLS-1$
@@ -49,12 +41,13 @@ public class HelpBrowser {
item.setData(label); item.setData(label);
} }
@Inject
public HelpBrowser() {
}
@PostConstruct @PostConstruct
protected Control createComposite(Composite container) { protected Control createComposite(Composite container) {
// container.getShell().addListener(SWT.Close, e -> {
// e.doit= false;
// element.setVisible(false);
// });
GridLayout gridLayout = new GridLayout(); GridLayout gridLayout = new GridLayout();
gridLayout.numColumns = 3; gridLayout.numColumns = 3;
container.setLayout(gridLayout); container.setLayout(gridLayout);
@@ -149,7 +142,5 @@ public class HelpBrowser {
return container; return container;
} }
void handleShellCloseEvent(){
}
} }

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.minres.scviewer.help</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@@ -0,0 +1,9 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=11

View File

@@ -0,0 +1,8 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: SCViewer Help
Bundle-SymbolicName: com.minres.scviewer.help;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: MINRES Technologies GmbH
Automatic-Module-Name: com.minres.scviewer.help
Bundle-RequiredExecutionEnvironment: JavaSE-11

View File

@@ -0,0 +1,7 @@
source.. = src/
output.. = bin/
bin.includes = plugin.xml,\
META-INF/,\
.,\
html/,\
*.xml

View File

@@ -0,0 +1,13 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Main Topic</title>
</head>
<body>
<h1>Main Topic</h1>
Please enter your text here.
</body>
</html>

View File

@@ -0,0 +1,13 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Sub Topic</title>
</head>
<body>
<h1>Sub Topic</h1>
Please enter your text here.
</body>
</html>

View File

@@ -0,0 +1,13 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Sub Topic 2</title>
</head>
<body>
<h1>Sub Topic 2</h1>
Please enter your text here.
</body>
</html>

View File

@@ -0,0 +1,13 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Main Topic</title>
</head>
<body>
<h1>Main Topic</h1>
Please enter your text here.
</body>
</html>

View File

@@ -0,0 +1,13 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Sub Topic</title>
</head>
<body>
<h1>Sub Topic</h1>
Please enter your text here.
</body>
</html>

View File

@@ -0,0 +1,13 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Sub Topic 2</title>
</head>
<body>
<h1>Sub Topic 2</h1>
Please enter your text here.
</body>
</html>

View File

@@ -0,0 +1,13 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Main Topic</title>
</head>
<body>
<h1>Main Topic</h1>
Please enter your text here.
</body>
</html>

View File

@@ -0,0 +1,13 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Sub Topic</title>
</head>
<body>
<h1>Sub Topic</h1>
Please enter your text here.
</body>
</html>

View File

@@ -0,0 +1,13 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Sub Topic 2</title>
</head>
<body>
<h1>Sub Topic 2</h1>
Please enter your text here.
</body>
</html>

View File

@@ -0,0 +1,13 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Main Topic</title>
</head>
<body>
<h1>Main Topic</h1>
Please enter your text here.
</body>
</html>

View File

@@ -0,0 +1,13 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Sub Topic</title>
</head>
<body>
<h1>Sub Topic</h1>
Please enter your text here.
</body>
</html>

View File

@@ -0,0 +1,13 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Sub Topic 2</title>
</head>
<body>
<h1>Sub Topic 2</h1>
Please enter your text here.
</body>
</html>

View File

@@ -0,0 +1,13 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Main Topic</title>
</head>
<body>
<h1>Main Topic</h1>
Please enter your text here.
</body>
</html>

View File

@@ -0,0 +1,13 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Sub Topic</title>
</head>
<body>
<h1>Sub Topic</h1>
Please enter your text here.
</body>
</html>

View File

@@ -0,0 +1,13 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Sub Topic 2</title>
</head>
<body>
<h1>Sub Topic 2</h1>
Please enter your text here.
</body>
</html>

View File

@@ -0,0 +1,13 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Table of Contents</title>
</head>
<body>
<h1>Table of Contents</h1>
Please enter your text here.
</body>
</html>

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension
point="org.eclipse.help.toc">
<toc
file="toc.xml"
primary="true">
</toc>
<toc
file="tocconcepts.xml">
</toc>
<toc
file="tocgettingstarted.xml">
</toc>
<toc
file="tocreference.xml">
</toc>
<toc
file="tocsamples.xml">
</toc>
<toc
file="toctasks.xml">
</toc>
</extension>
</plugin>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<?NLS TYPE="org.eclipse.help.toc"?>
<toc label="SCViewer Table of Contents" topic="html/toc.html">
<topic label="Getting Started">
<anchor id="gettingstarted"/>
</topic>
<topic label="Concepts">
<anchor id="concepts"/>
</topic>
<topic label="Tasks">
<anchor id="tasks"/>
</topic>
<topic label="Reference">
<anchor id="reference"/>
</topic>
<topic label="Samples">
<anchor id="samples"/>
</topic>
</toc>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<?NLS TYPE="org.eclipse.help.toc"?>
<toc label="Concepts" link_to="toc.xml#concepts">
<topic label="Main Topic" href="html/concepts/maintopic.html">
<topic label="Sub Topic" href="html/concepts/subtopic.html" />
</topic>
<topic label="Main Topic 2">
<topic label="Sub Topic 2" href="html/concepts/subtopic2.html" />
</topic>
</toc>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<?NLS TYPE="org.eclipse.help.toc"?>
<toc label="Getting Started" link_to="toc.xml#gettingstarted">
<topic label="Main Topic" href="html/gettingstarted/maintopic.html">
<topic label="Sub Topic" href="html/gettingstarted/subtopic.html" />
</topic>
<topic label="Main Topic 2">
<topic label="Sub Topic 2" href="html/gettingstarted/subtopic2.html" />
</topic>
</toc>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<?NLS TYPE="org.eclipse.help.toc"?>
<toc label="Reference" link_to="toc.xml#reference">
<topic label="Main Topic" href="html/reference/maintopic.html">
<topic label="Sub Topic" href="html/reference/subtopic.html" />
</topic>
<topic label="Main Topic 2">
<topic label="Sub Topic 2" href="html/reference/subtopic2.html" />
</topic>
</toc>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<?NLS TYPE="org.eclipse.help.toc"?>
<toc label="Samples" link_to="toc.xml#samples">
<topic label="Main Topic" href="html/samples/maintopic.html">
<topic label="Sub Topic" href="html/samples/subtopic.html" />
</topic>
<topic label="Main Topic 2">
<topic label="Sub Topic 2" href="html/samples/subtopic2.html" />
</topic>
</toc>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<?NLS TYPE="org.eclipse.help.toc"?>
<toc label="Tasks" link_to="toc.xml#tasks">
<topic label="Main Topic" href="html/tasks/maintopic.html">
<topic label="Sub Topic" href="html/tasks/subtopic.html" />
</topic>
<topic label="Main Topic 2">
<topic label="Sub Topic 2" href="html/tasks/subtopic2.html" />
</topic>
</toc>

View File

@@ -4,8 +4,8 @@
<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.14.2</version> <version>2.14.1</version>
<relativePath>../..</relativePath> <relativePath>../../..</relativePath>
</parent> </parent>
<packaging>eclipse-plugin</packaging> <packaging>eclipse-plugin</packaging>
<version>1.1.0-SNAPSHOT</version> <version>1.1.0-SNAPSHOT</version>

152
pom.xml
View File

@@ -1,152 +0,0 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.14.2</version>
<packaging>pom</packaging>
<modules>
<module>releng/com.minres.scviewer.target</module>
<module>plugins/com.minres.scviewer.database</module>
<module>plugins/com.minres.scviewer.database.sqlite</module>
<module>plugins/com.minres.scviewer.database.text</module>
<module>plugins/com.minres.scviewer.database.vcd</module>
<module>tests/com.minres.scviewer.database.test</module>
<module>plugins/com.minres.scviewer.database.ui.swt</module>
<module>plugins/com.minres.scviewer.e4.application</module>
<module>plugins/com.minres.scviewer.ui</module>
<module>features/com.minres.scviewer.database.feature</module>
<module>features/com.minres.scviewer.ui.feature</module>
<module>features/com.minres.scviewer.feature</module>
<module>features/com.minres.scviewer.e4.platform.feature</module>
<module>features/com.minres.scviewer.e4.feature</module>
<module>releng/com.minres.scviewer.updateSite</module>
<module>products/com.minres.scviewer.e4.product</module>
</modules>
<properties>
<tycho-version>1.5.0</tycho-version>
<groovy-eclipse-compiler-version>3.6.0-03</groovy-eclipse-compiler-version>
<groovy-eclipse-batch-version>3.0.3-01</groovy-eclipse-batch-version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>parse-version</id>
<goals>
<goal>parse-version</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>${tycho-version}</version>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-versions-plugin</artifactId>
<version>${tycho-version}</version>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho-version}</version>
<configuration>
<target>
<artifact>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.target</artifactId>
<version>2.14.2</version>
</artifact>
</target>
<environments>
<environment>
<os>linux</os>
<ws>gtk</ws>
<arch>x86_64</arch>
</environment>
<environment>
<os>win32</os>
<ws>win32</ws>
<arch>x86_64</arch>
</environment>
<environment>
<os>macosx</os>
<ws>cocoa</ws>
<arch>x86_64</arch>
</environment>
</environments>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-source-plugin</artifactId>
<version>${tycho-version}</version>
<executions>
<execution>
<id>plugin-source</id>
<goals>
<goal>plugin-source</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho.extras</groupId>
<artifactId>tycho-source-feature-plugin</artifactId>
<version>${tycho-version}</version>
<executions>
<execution>
<id>source-feature</id>
<phase>package</phase>
<goals>
<goal>source-feature</goal>
</goals>
</execution>
</executions>
<configuration>
<excludes>
<plugin id="com.google.guava" />
<plugin id="org.hamcrest.core" />
<plugin id="org.junit" />
<plugin id="com.minres.scviewer.e4.product" />
<plugin id="com.minres.scviewer.e4.product_slim" />
<plugin id="org.eclipse.core.filesystem.linux.x86_64" />
<plugin id="org.eclipse.core.filesystem.win32.x86_64" />
<plugin id="com.opcoach.e4.preferences" />
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-p2-plugin</artifactId>
<version>${tycho-version}</version>
<executions>
<execution>
<id>attach-p2-metadata</id>
<phase>package</phase>
<goals>
<goal>p2-metadata</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@@ -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.14.2</version> <version>2.14.1</version>
<relativePath>../..</relativePath> <relativePath>../../..</relativePath>
</parent> </parent>
<artifactId>com.minres.scviewer.e4.product</artifactId> <artifactId>com.minres.scviewer.e4.product</artifactId>
<version>2.14.2</version> <version>2.14.1</version>
<packaging>eclipse-repository</packaging> <packaging>eclipse-repository</packaging>
<groupId>com.minres.scviewer</groupId> <groupId>com.minres.scviewer</groupId>
<build> <build>

View File

@@ -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.14.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.1" useFeatures="true" includeLaunchers="true">
<configIni use="default"> <configIni use="default">
</configIni> </configIni>
@@ -62,6 +62,7 @@
<feature id="com.minres.scviewer.database.feature" installMode="root"/> <feature id="com.minres.scviewer.database.feature" installMode="root"/>
<feature id="org.eclipse.e4.rcp" installMode="root"/> <feature id="org.eclipse.e4.rcp" installMode="root"/>
<feature id="com.opcoach.e4.preferences.feature" installMode="root"/> <feature id="com.opcoach.e4.preferences.feature" installMode="root"/>
<feature id="org.eclipse.help" installMode="root"/>
</features> </features>
<configurations> <configurations>

View File

@@ -12,8 +12,8 @@
<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.14.2</version> <version>2.14.1</version>
<relativePath>../..</relativePath> <relativePath>../../..</relativePath>
</parent> </parent>
</project> </project>

View File

@@ -7,8 +7,8 @@
<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.14.2</version> <version>2.14.1</version>
<relativePath>../..</relativePath> <relativePath>../../..</relativePath>
</parent> </parent>
<build> <build>
<plugins> <plugins>

View File

@@ -6,8 +6,8 @@
<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.14.2</version> <version>2.14.1</version>
<relativePath>../..</relativePath> <relativePath>../../..</relativePath>
</parent> </parent>
<packaging>eclipse-test-plugin</packaging> <packaging>eclipse-test-plugin</packaging>
<build> <build>