Compare commits

..

1 Commits

Author SHA1 Message Date
601e8186ca Merge branch 'release/2.13.0' 2021-03-02 21:55:09 +01:00
99 changed files with 560 additions and 1573 deletions

17
.project Normal file
View File

@ -0,0 +1,17 @@
<?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

@ -18,37 +18,14 @@ The viewer has the following features
- sqlite based
- visualization of transaction relations
To build the plugins the Eclipse SDK or PDE can be used.
To build the plugins the Eclipse SDK or PDE can be used. In both cases the Groovy
eclipse plugin (http://groovy.codehaus.org/Eclipse+Plugin or Market) has to be
installed.
Key Shortcuts
=============
Legend:
* Left Mouse Button: LMB
* Middle Mouse Button: MMB
* Mouse Scroll wheel: MScrl
* Context any means Name List, Value List or Waveform
| Input | Modifier | Context | Action |
|-----------|----------|----------|-----------------------------------|
| LMB klick | | any | select |
| LMB klick | Shift | Waveform | move selected marker to position |
| LMB klick | Control | Waveform | move cursor to position |
| LMB drag | | Waveform | zoom to range |
| MMB klick | | Waveform | move selected marker to position |
| MScrl | | any | scroll window up/down |
| MScrl | Shift | any | scroll window left/right |
| Key left | | Waveform | scroll window to the left (slow) |
| Key right | | Waveform | scroll window to the right (slow) |
| Key left | Shift | Waveform | scroll window to the left (fast) |
| Key right | Shift | Waveform | scroll window to the right (fast) |
| Key up | | Waveform | move selection up |
| Key down | | Waveform | move selection down |
| Key up | Control | Waveform | move selected track up |
| Key down | Control | Waveform | move selected track down |
| Key + | Control | Waveform | zoom in |
| Key - | Control | Waveform | zoom out |
| Key Pos1 | | Waveform | jump to selected marker |
| Key End | | Waveform | jump to cursor |
| Key Del | | any | delete selected entries |
TODO
====
- add more tests
- move to feature based product to allow automatic updates
- improve graphics
- catch-up e3 plugin to functionality of e4 product
- add calculated traces

View File

@ -27,12 +27,12 @@ http://www.eclipse.org/legal/epl-v10.html
</url>
<requires>
<import plugin="org.codehaus.groovy" version="2.5.8" match="greaterOrEqual"/>
<import plugin="org.eclipse.osgi.services" version="3.4.0" match="greaterOrEqual"/>
<import plugin="com.google.guava" version="15.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.osgi"/>
<import plugin="com.minres.scviewer.database" version="1.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.core.runtime"/>
<import feature="org.eclipse.collections.feature" version="10.4.0.v20200820-2049"/>
</requires>
<plugin

View File

@ -5,8 +5,8 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.14.1</version>
<relativePath>../../..</relativePath>
<version>2.13.0</version>
<relativePath>../..</relativePath>
</parent>
<version>3.0.0-SNAPSHOT</version>
</project>

View File

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

View File

@ -5,8 +5,8 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.14.1</version>
<relativePath>../../..</relativePath>
<version>2.13.0</version>
<relativePath>../..</relativePath>
</parent>
<version>1.1.0-SNAPSHOT</version>
</project>

View File

@ -5,8 +5,8 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.14.1</version>
<relativePath>../../..</relativePath>
<version>2.13.0</version>
<relativePath>../..</relativePath>
</parent>
<version>1.0.0-SNAPSHOT</version>
</project>

View File

@ -5,8 +5,8 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.14.1</version>
<relativePath>../../..</relativePath>
<version>2.13.0</version>
<relativePath>../..</relativePath>
</parent>
<version>1.1.0-SNAPSHOT</version>
</project>

View File

@ -5,8 +5,8 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.14.1</version>
<relativePath>../../..</relativePath>
<version>2.13.0</version>
<relativePath>../..</relativePath>
</parent>
<version>1.1.0-SNAPSHOT</version>
</project>

View File

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

View File

@ -2,12 +2,12 @@
<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 exported="true" kind="lib" path="lib/mapdb-3.0.7.jar" sourcepath="lib/mapdb-3.0.7-sources.jar">
<attributes>
<attribute name="javadoc_location" value="jar:platform:/resource/com.minres.scviewer.database.text/lib/mapdb-3.0.7-javadoc.jar!/"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="src"/>
<classpathentry exported="true" kind="lib" path="lib/kotlin-stdlib-1.2.42.jar"/>
<classpathentry exported="true" kind="lib" path="lib/lz4-1.3.0.jar"/>
<classpathentry exported="true" kind="lib" path="lib/elsa-3.0.0-M5.jar"/>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="TextDbLoaderFactory">
<implementation class="com.minres.scviewer.database.text.TextDbLoaderFactory"/>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="TextDbLoader">
<implementation class="com.minres.scviewer.database.text.TextDbLoader"/>
<service>
<provide interface="com.minres.scviewer.database.IWaveformDbLoaderFactory"/>
<provide interface="com.minres.scviewer.database.IWaveformDbLoader"/>
</service>
</scr:component>

View File

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

View File

@ -1,77 +0,0 @@
/*******************************************************************************
* Copyright (c) 2012 IT Just working.
* Copyright (c) 2020 MINRES Technologies GmbH
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IT Just working - initial API and implementation
*******************************************************************************/
package com.minres.scviewer.database.text;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.zip.GZIPInputStream;
import com.minres.scviewer.database.IWaveformDbLoader;
import com.minres.scviewer.database.IWaveformDbLoaderFactory;
/**
* The Class TextDbLoader.
*/
public class TextDbLoaderFactory implements IWaveformDbLoaderFactory {
/** The Constant x. */
static final byte[] x = "scv_tr_stream".getBytes();
/**
* Checks if f is gzipped.
*
* @param f the f
* @return true, if is gzipped
*/
private static boolean isGzipped(File f) {
try (InputStream is = new FileInputStream(f)) {
byte[] signature = new byte[2];
int nread = is.read(signature); // read the gzip signature
return nread == 2 && signature[0] == (byte) 0x1f && signature[1] == (byte) 0x8b;
} catch (IOException e) {
return false;
}
}
/**
* Can load.
*
* @param inputFile the input file
* @return true, if successful
*/
@Override
public boolean canLoad(File inputFile) {
if (!inputFile.isDirectory() && inputFile.exists()) {
boolean gzipped = isGzipped(inputFile);
try(InputStream stream = gzipped ? new GZIPInputStream(new FileInputStream(inputFile)) : new FileInputStream(inputFile)){
byte[] buffer = new byte[x.length];
int readCnt = stream.read(buffer, 0, x.length);
if (readCnt == x.length) {
for (int i = 0; i < x.length; i++)
if (buffer[i] != x[i])
return false;
}
return true;
} catch (Exception e) {
return false;
}
}
return false;
}
@Override
public IWaveformDbLoader getLoader() {
return new TextDbLoader();
}
}

View File

@ -5,8 +5,8 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.14.1</version>
<relativePath>../../..</relativePath>
<version>2.13.0</version>
<relativePath>../..</relativePath>
</parent>
<version>4.0.0-SNAPSHOT</version>
</project>

View File

@ -27,14 +27,10 @@ import com.minres.scviewer.database.tx.ITx;
public interface IWaveformView extends PropertyChangeListener, ISelectionProvider{
static final String CURSOR_PROPERTY = "cursor_time";
String CURSOR_PROPERTY = "cursor_time";
static final String MARKER_PROPERTY = "marker_time";
String MARKER_PROPERTY = "marker_time";
static final int CURSOR_POS = 0;
static final int MARKER_POS = 1;
public static final RelationType NEXT_PREV_IN_STREAM = RelationTypeFactory.create("Prev/Next in stream");
public void addSelectionChangedListener(ISelectionChangedListener listener);
@ -117,8 +113,6 @@ public interface IWaveformView extends PropertyChangeListener, ISelectionProvide
public void scrollHorizontal(int percent);
public void scrollTo(int pos);
public void addDisposeListener( DisposeListener listener );
public void deleteSelectedTracks();

View File

@ -1,36 +1,14 @@
package com.minres.scviewer.database.ui.swt;
import java.text.DecimalFormat;
public class Constants {
public static final String[] UNIT_STRING={"fs", "ps", "ns", "us", "ms"};//, "s"};
public static final long[] UNIT_MULTIPLIER={1, 1000, 1000*1000, 1000*1000*1000, 1000*1000*1000*1000, 1000*1000*1000*1000*1000 };
//public static final int[] UNIT_MULTIPLIER={1, 3, 10, 30, 100, 300};
public static final long[] SCALE_MULTIPLIER={1, 2, 5, 10, 20, 50, 100, 200, 500};
public static final int[] UNIT_MULTIPLIER={1, 3, 10, 30, 100, 300};
public static final String CONTENT_PROVIDER_TAG = "TOOLTIP_CONTENT_PROVIDER";
public static final String HELP_PROVIDER_TAG = "TOOLTIP_HELP_PROVIDER";
public static final DecimalFormat TIME_FORMAT_FS = new DecimalFormat("#");
public static final DecimalFormat TIME_FORMAT_PS = new DecimalFormat("#");
public static final DecimalFormat TIME_FORMAT_NS = new DecimalFormat("#.0##");
public static final DecimalFormat TIME_FORMAT_US = new DecimalFormat("#.0#####");
public static final DecimalFormat TIME_FORMAT_MS = new DecimalFormat("#.0#####");
public static DecimalFormat getTimeFormatForLevel(int level) {
switch(level/SCALE_MULTIPLIER.length) {
case 0: return TIME_FORMAT_FS;
case 1: return TIME_FORMAT_PS;
case 2: return TIME_FORMAT_NS;
case 3: return TIME_FORMAT_US;
case 4: return TIME_FORMAT_MS;
default:
return TIME_FORMAT_FS;
}
}
private Constants() {}
}

View File

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

View File

@ -15,7 +15,6 @@ import org.eclipse.swt.graphics.Rectangle;
import com.minres.scviewer.database.ui.ICursor;
import com.minres.scviewer.database.ui.WaveformColors;
import com.minres.scviewer.database.ui.swt.Constants;
public class CursorPainter implements IPainter, ICursor {
@ -85,7 +84,7 @@ public class CursorPainter implements IPainter, ICursor {
proj.setBackground(drawColor);
proj.setForeground(textColor);
double dTime=time;
proj.drawText(Constants.getTimeFormatForLevel(waveCanvas.getZoomLevel()).format(dTime/waveCanvas.getScaleFactorPow10())+waveCanvas.getUnitStr(), x+1, top);
proj.drawText((dTime/waveCanvas.getScaleFactorPow10())+waveCanvas.getUnitStr(), x+1, top);
}
}
}

View File

@ -10,20 +10,22 @@
*******************************************************************************/
package com.minres.scviewer.database.ui.swt.internal;
import java.text.DecimalFormat;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.wb.swt.SWTResourceManager;
import com.minres.scviewer.database.ui.swt.Constants;
public class RulerPainter implements IPainter {
protected final WaveformCanvas waveCanvas;
static final int RULER_TICK_MINOR = 10;
static final int RULER_TICK_MAJOR = 100;
static final DecimalFormat df = new DecimalFormat("#.00####");
public RulerPainter(WaveformCanvas waveCanvas) {
this.waveCanvas=waveCanvas;
}
@ -38,7 +40,7 @@ public class RulerPainter implements IPainter {
if(headerBgColor.isDisposed())
headerBgColor=SWTResourceManager.getColor(255,255,255);
String unit=waveCanvas.getUnitStr();
long unitMultiplier=waveCanvas.getUnitMultiplier();
int unitMultiplier=waveCanvas.getUnitMultiplier();
long scaleFactor=waveCanvas.getScaleFactor();
long startPos=area.x*scaleFactor;
@ -50,7 +52,7 @@ public class RulerPainter implements IPainter {
int minorTickY = waveCanvas.rulerHeight-5;
int majorTickY = waveCanvas.rulerHeight-15;
int textY=waveCanvas.rulerHeight-30;
int textY=waveCanvas.rulerHeight-20;
int baselineY=waveCanvas.rulerHeight - 1;
int bottom=waveCanvas.rulerHeight - 2;
@ -64,22 +66,13 @@ public class RulerPainter implements IPainter {
gc.fillRectangle(new Rectangle(area.x, area.y, area.width, baselineY));
gc.setForeground(headerFgColor);
gc.drawLine(area.x, area.y+bottom, area.x+area.width, area.y+bottom);
boolean allMarker=true;
for (long pos = startMinorIncrPos, tick = startMinorIncrVal; pos < endPos; pos+= rulerTickMinor, tick += rulerTickMinor) {
if ((tick % rulerTickMajor) == 0) {
String text = Constants.getTimeFormatForLevel(waveCanvas.getZoomLevel()).format(tick/scaleFactor*unitMultiplier);
if(text.length()>8) allMarker=false;
}
}
boolean drawText = true;
for (long pos = startMinorIncrPos, tick = startMinorIncrVal; pos < endPos; pos+= rulerTickMinor, tick += rulerTickMinor) {
int x0Pos = (int) (pos/scaleFactor);
long x0Val = tick/scaleFactor;
if ((tick % rulerTickMajor) == 0) {
if(allMarker || drawText)
gc.drawText(Constants.getTimeFormatForLevel(waveCanvas.getZoomLevel()).format(x0Val*unitMultiplier)+unit, x0Pos, area.y+textY);
gc.drawText(df.format(x0Val*unitMultiplier)+unit, x0Pos, area.y+textY);
gc.drawLine(x0Pos, area.y+majorTickY, x0Pos,area.y+ bottom);
drawText=!drawText;
} else {
gc.drawLine(x0Pos, area.y+minorTickY, x0Pos, area.y+bottom);
}

View File

@ -170,7 +170,7 @@ public class WaveformCanvas extends Canvas {
}
public int getMaxZoomLevel(){
return Constants.SCALE_MULTIPLIER.length*Constants.UNIT_STRING.length-1;
return Constants.UNIT_MULTIPLIER.length*Constants.UNIT_STRING.length-1;
}
public void setZoomLevel(int level) {
@ -179,21 +179,12 @@ public class WaveformCanvas extends Canvas {
}
public void setZoomLevel(int level, long centerTime) {
if(level<0) {
if(level<-1) {
long cTime = getCursorPainters().get(0).getTime();
long time_diff = centerTime>cTime?centerTime-cTime:cTime-centerTime;
level = findFitZoomLevel(time_diff);
centerTime = (centerTime>cTime?cTime:centerTime)+time_diff/2;
} else
level = findFitZoomLevel(maxTime);
if(level<0) level = 0;
}
//FIXME: keep center if zoom-out and cursor is not in view
if(level<Constants.SCALE_MULTIPLIER.length*Constants.UNIT_STRING.length){
int scale = level%Constants.SCALE_MULTIPLIER.length;
int unit = level/Constants.SCALE_MULTIPLIER.length;
this.scaleFactor = Constants.UNIT_MULTIPLIER[unit]*Constants.SCALE_MULTIPLIER[scale];
if(level<0) level = 0;
long xc=centerTime/this.scaleFactor; // cursor total x-offset
if(level<Constants.UNIT_MULTIPLIER.length*Constants.UNIT_STRING.length){
this.scaleFactor = (long) Math.pow(10, level>>1);
if(level%2==1) this.scaleFactor*=3;
ITx tx = arrowPainter.getTx();
arrowPainter.setTx(null);
/*
@ -202,9 +193,7 @@ public class WaveformCanvas extends Canvas {
* xcn = tc/newScaleFactor
* t0n = (xcn-xoffs)*scaleFactor
*/
Rectangle clientArea = getClientArea();
long clientAreaWidth = clientArea.width;
long xoffs = clientAreaWidth/2;
long xoffs=xc+origin.x; // cursor offset relative to left border
long xcn=centerTime/scaleFactor; // new total x-offset
long originX=xcn-xoffs;
if(originX>0) {
@ -219,39 +208,22 @@ public class WaveformCanvas extends Canvas {
}
}
private int findFitZoomLevel(long duration) {
//get area actually capable of displaying data, i.e. area of the receiver which is capable of displaying data
Rectangle clientArea = getClientArea();
long clientAreaWidth = clientArea.width;
//try to find existing zoomlevel where scaleFactor*clientAreaWidth >= maxTime, if one is found set it as new zoomlevel
for(int unitIdx=0; unitIdx<Constants.UNIT_STRING.length; unitIdx++) {
long magnitudeMultiplier = Constants.UNIT_MULTIPLIER[unitIdx];
for (int scaleIdx=0; scaleIdx<Constants.SCALE_MULTIPLIER.length; scaleIdx++){
long scaleFactor = magnitudeMultiplier * Constants.SCALE_MULTIPLIER[scaleIdx];
long range = scaleFactor*clientAreaWidth;
if( range >= duration)
return unitIdx*Constants.SCALE_MULTIPLIER.length+scaleIdx;
}
}
return -1;
}
public long getScaleFactor() {
return scaleFactor;
}
public long getScaleFactorPow10() {
int scale = level/Constants.SCALE_MULTIPLIER.length;
int scale = level/Constants.UNIT_MULTIPLIER.length;
double res = Math.pow(1000, scale);
return (long) res;
}
public String getUnitStr(){
return Constants.UNIT_STRING[level/Constants.SCALE_MULTIPLIER.length];
return Constants.UNIT_STRING[level/Constants.UNIT_MULTIPLIER.length];
}
public long getUnitMultiplier(){
return Constants.SCALE_MULTIPLIER[level%Constants.SCALE_MULTIPLIER.length];
public int getUnitMultiplier(){
return Constants.UNIT_MULTIPLIER[level%Constants.UNIT_MULTIPLIER.length];
}
public long getTimeForOffset(int xOffset){
@ -503,12 +475,6 @@ public class WaveformCanvas extends Canvas {
}
}
public void centerAt(long time) {
int scaledTime = (int) (time / scaleFactor);
int newX = -scaledTime+getWidth()/2;
setOrigin(newX>0?0:newX, origin.y);
}
public int getRulerHeight() {
return rulerHeight;
}

View File

@ -13,6 +13,7 @@ package com.minres.scviewer.database.ui.swt.internal;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@ -98,6 +99,8 @@ public class WaveformView implements IWaveformView {
private PropertyChangeSupport pcs;
static final DecimalFormat df = new DecimalFormat("#0.00####");
private ITx currentTxSelection;
private ArrayList<TrackEntry> currentWaveformSelection = new ArrayList<>();
@ -122,12 +125,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;
@ -167,7 +164,7 @@ public class WaveformView implements IWaveformView {
setSelection(new StructuredSelection(res), (e.stateMask & SWT.CTRL) != 0, false);
} else
setSelection(new StructuredSelection(entry.getValue()), (e.stateMask & SWT.CTRL) != 0,
false);
false);
} else {
setSelection(new StructuredSelection(entry.getValue()), (e.stateMask & SWT.CTRL) != 0, false);
}
@ -200,64 +197,59 @@ public class WaveformView implements IWaveformView {
down = false;
if (start == null)
return;
if ((e.stateMask & SWT.MODIFIER_MASK & ~(SWT.SHIFT | SWT.CTRL)) != 0)
return; // don't react on modifier except shift and control
boolean isCtrl = (e.stateMask & SWT.CTRL)!=0;
boolean isShift = (e.stateMask & SWT.SHIFT)!=0;
if (e.button == 1) {
if (Math.abs(e.x - start.x) > 3) { // was drag event
asyncUpdate(e.widget);
long startTime = waveformCanvas.getTimeForOffset(start.x);
long endTime = waveformCanvas.getTimeForOffset(end.x);
long targetTimeRange = endTime - startTime;
long currentTimeRange = waveformCanvas.getMaxVisibleTime() - waveformCanvas.getMinVisibleTime();
if (targetTimeRange == 0)
return;
long relation = currentTimeRange / targetTimeRange;
long i = 1;
int level = 0;
do {
if (relation < 0) {
if (-relation < i) {
break;
}
level--;
if (-relation < i * 3) {
break;
}
level--;
} else {
if (relation < i) {
break;
}
level++;
if (relation < i * 3) {
break;
}
level++;
if ((e.stateMask & SWT.MODIFIER_MASK & ~SWT.SHIFT) != 0)
return; // don't react on modifier except shift
if (e.button == 1 && Math.abs(e.x - start.x) > 3) {
asyncUpdate(e.widget);
long startTime = waveformCanvas.getTimeForOffset(start.x);
long endTime = waveformCanvas.getTimeForOffset(end.x);
long targetTimeRange = endTime - startTime;
long currentTimeRange = waveformCanvas.getMaxVisibleTime() - waveformCanvas.getMinVisibleTime();
if (targetTimeRange == 0)
return;
long relation = currentTimeRange / targetTimeRange;
long i = 1;
int level = 0;
do {
if (relation < 0) {
if (-relation < i) {
break;
}
i = i * 10;
} while (i < 10000);
if (i < 10000) {
int curLevel = waveformCanvas.getZoomLevel();
waveformCanvas.setZoomLevel(curLevel - level, (startTime + endTime) / 2);
}
} else if( isShift) { // set marker (button 1 and shift)
setMarkerTime(snapOffsetToEvent(start), selectedMarker);
} else if(isCtrl) { // set cursor (button 1 and ctrl)
setCursorTime(snapOffsetToEvent(start));
} else { // set cursor (button 1 only)
if (Math.abs(e.y - start.y) < 3) {
// first set cursor time
setCursorTime(snapOffsetToEvent(start));
// then set selection and reveal
setSelection(new StructuredSelection(initialSelected));
level--;
if (-relation < i * 3) {
break;
}
level--;
} else {
if (relation < i) {
break;
}
level++;
if (relation < i * 3) {
break;
}
level++;
}
i = i * 10;
} while (i < 10000);
if (i < 10000) {
int curLevel = waveformCanvas.getZoomLevel();
waveformCanvas.setZoomLevel(curLevel - level, (startTime + endTime) / 2);
}
} else if (e.button == 2) { // set marker (button 2)
} else if (e.button == 1 && ((e.stateMask & SWT.SHIFT) == 0)) {
// set cursor (button 1 and no shift)
if (Math.abs(e.x - start.x) < 3 && Math.abs(e.y - start.y) < 3) {
// first set cursor time
setCursorTime(snapOffsetToEvent(start));
// then set selection and reveal
setSelection(new StructuredSelection(initialSelected));
asyncUpdate(e.widget);
}
} else if (e.button == 2 || (e.button == 1 && (e.stateMask & SWT.SHIFT) != 0)) {
// set marker (button 1 and shift)
setMarkerTime(snapOffsetToEvent(start), selectedMarker);
asyncUpdate(e.widget);
}
asyncUpdate(e.widget);
}
protected long snapOffsetToEvent(Point p) {
@ -295,8 +287,8 @@ public class WaveformView implements IWaveformView {
@Override
public void handleEvent(Event e) {
switch (e.type) {
// case SWT.MouseWheel:
// break;
case SWT.MouseWheel:
break;
case SWT.MouseDown:
start = new Point(e.x, e.y);
end = new Point(e.x, e.y);
@ -518,7 +510,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 +517,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);
@ -766,7 +756,7 @@ public class WaveformView implements IWaveformView {
ITx txSel = (ITx) selList.get(0);
TrackEntry trackEntry = selList.size() == 2 && selList.get(1) instanceof TrackEntry
? (TrackEntry) selList.get(1)
: null;
: null;
if (trackEntry == null) {
trackEntry = getEntryFor(txSel);
if (trackEntry == null && addIfNeeded) {
@ -940,7 +930,7 @@ public class WaveformView implements IWaveformView {
return candidates.get(0);
default:
ArrayList<ITxRelation> visibleCandidates = candidates.stream().filter(this::streamsVisible)
.collect(Collectors.toCollection(ArrayList::new));
.collect(Collectors.toCollection(ArrayList::new));
if (visibleCandidates.isEmpty()) {
return new RelSelectionDialog(waveformCanvas.getShell(), candidates, target).open();
} else if (visibleCandidates.size() == 1) {
@ -1152,12 +1142,8 @@ public class WaveformView implements IWaveformView {
*/
@Override
public void setZoomLevel(int scale) {
if(scale<-1) {
waveformCanvas.setZoomLevel(scale, getMarkerTime(selectedMarker));
} else {
waveformCanvas.setZoomLevel(scale);
waveformCanvas.reveal(getCursorTime());
}
waveformCanvas.setZoomLevel(scale);
waveformCanvas.reveal(getCursorTime());
}
/*
@ -1244,7 +1230,7 @@ public class WaveformView implements IWaveformView {
if (event.y < tracksVerticalHeight) {
event.doit = true;
LocalSelectionTransfer.getTransfer()
.setSelection(new StructuredSelection(currentWaveformSelection));
.setSelection(new StructuredSelection(currentWaveformSelection));
}
}
@ -1474,7 +1460,7 @@ public class WaveformView implements IWaveformView {
StringBuilder sb = new StringBuilder();
double dTime = time;
double scaledTime = dTime / waveformCanvas.getScaleFactorPow10();
return sb.append(Constants.getTimeFormatForLevel(waveformCanvas.getZoomLevel()).format(scaledTime)).append(waveformCanvas.getUnitStr()).toString();
return sb.append(df.format(scaledTime)).append(waveformCanvas.getUnitStr()).toString();
}
/*
@ -1484,11 +1470,11 @@ public class WaveformView implements IWaveformView {
*/
@Override
public String[] getZoomLevels() {
String[] res = new String[Constants.SCALE_MULTIPLIER.length * Constants.UNIT_STRING.length];
String[] res = new String[Constants.UNIT_MULTIPLIER.length * Constants.UNIT_STRING.length];
int index = 0;
for (String unit : Constants.UNIT_STRING) {
for (long factor : Constants.SCALE_MULTIPLIER) {
res[index++] = Long.toString(factor) + unit;
for (int factor : Constants.UNIT_MULTIPLIER) {
res[index++] = Integer.toString(factor) + unit;
}
}
return res;
@ -1518,22 +1504,6 @@ public class WaveformView implements IWaveformView {
waveformCanvas.redraw();
}
@Override
public void scrollTo(int pos) {
long time = 0;
switch(pos) {
case IWaveformView.CURSOR_POS:
time = getCursorTime();
break;
case IWaveformView.MARKER_POS:
time = getMarkerTime(selectedMarker);
break;
default:
break;
}
waveformCanvas.centerAt(time);
}
public void asyncUpdate(Widget widget) {
widget.getDisplay().asyncExec(() -> {
waveformCanvas.redraw();
@ -1563,4 +1533,5 @@ public class WaveformView implements IWaveformView {
getStreamList().add(idx, e);
return e;
}
}

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="VCDDbLoaderFactory">
<implementation class="com.minres.scviewer.database.vcd.VCDDbLoaderFactory"/>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="VCDDbLoader">
<implementation class="com.minres.scviewer.database.vcd.VCDDbLoader"/>
<service>
<provide interface="com.minres.scviewer.database.IWaveformDbLoaderFactory"/>
<provide interface="com.minres.scviewer.database.IWaveformDbLoader"/>
</service>
</scr:component>

View File

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

View File

@ -164,8 +164,7 @@ public class VCDDbLoader implements IWaveformDbLoader, IVCDDatabaseBuilder {
@Override
public void enterModule(String tokenString) {
if(moduleStack.isEmpty()) {
if("SystemC".compareTo(tokenString)!=0)
moduleStack.push(tokenString);
if("SystemC".compareTo(tokenString)!=0) moduleStack.push(tokenString);
} else
moduleStack.push(moduleStack.peek()+"."+tokenString);

View File

@ -1,77 +0,0 @@
/*******************************************************************************
* Copyright (c) 2015-2021 MINRES Technologies GmbH and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* MINRES Technologies GmbH - initial API and implementation
*******************************************************************************/
package com.minres.scviewer.database.vcd;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.zip.GZIPInputStream;
import com.minres.scviewer.database.IWaveformDbLoader;
import com.minres.scviewer.database.IWaveformDbLoaderFactory;
/**
* The Class VCDDb.
*/
public class VCDDbLoaderFactory implements IWaveformDbLoaderFactory {
/**
* Checks if is gzipped.
*
* @param f the f
* @return true, if is gzipped
*/
private static boolean isGzipped(File f) {
try (InputStream is = new FileInputStream(f)) {
byte [] signature = new byte[2];
int nread = is.read( signature ); //read the gzip signature
return nread == 2 && signature[ 0 ] == (byte) 0x1f && signature[ 1 ] == (byte) 0x8b;
}
catch (IOException e) {
return false;
}
}
/**
* Can load.
*
* @param inputFile the input file
* @return true, if successful
*/
@Override
public boolean canLoad(File inputFile) {
if(!inputFile.isDirectory() || inputFile.exists()) {
String name = inputFile.getName();
if(!(name.endsWith(".vcd") ||
name.endsWith(".vcdz") ||
name.endsWith(".vcdgz") ||
name.endsWith(".vcd.gz")) )
return false;
boolean gzipped = isGzipped(inputFile);
try(InputStream stream = gzipped ? new GZIPInputStream(new FileInputStream(inputFile)) : new FileInputStream(inputFile)){
byte[] buffer = new byte[8];
if (stream.read(buffer, 0, buffer.length) == buffer.length) {
return buffer[0]=='$';
}
} catch (Exception e) {
return false;
}
}
return false;
}
@Override
public IWaveformDbLoader getLoader() {
return new VCDDbLoader();
}
}

View File

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

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="com.minres.scviewer.database.loader">
<implementation class="com.minres.scviewer.database.internal.WaveformDb"/>
<reference bind="bind" cardinality="1..n" interface="com.minres.scviewer.database.IWaveformDbLoaderFactory" name="IWaveformDbLoaderFactory" policy="dynamic" unbind="unbind"/>
<reference bind="bind" cardinality="1..n" interface="com.minres.scviewer.database.IWaveformDbLoader" name="IWaveformDbLoader" policy="dynamic" unbind="unbind"/>
</scr:component>

View File

@ -4,8 +4,8 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.14.1</version>
<relativePath>../../..</relativePath>
<version>2.13.0</version>
<relativePath>../..</relativePath>
</parent>
<packaging>eclipse-plugin</packaging>
<version>4.0.0-SNAPSHOT</version>

View File

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

View File

@ -1,33 +0,0 @@
/*******************************************************************************
* Copyright (c) 2015-2021 MINRES Technologies GmbH and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* MINRES Technologies GmbH - initial API and implementation
*******************************************************************************/
package com.minres.scviewer.database;
import java.io.File;
/**
* A factory for creating IWaveformDb objects.
*/
public interface IWaveformDbLoaderFactory {
/**
* Check if the loader produced by this factory can load the given file.
*
* @param inputFile the input file
* @return true, if successful
*/
public boolean canLoad(File inputFile);
/**
* Gets the database.
*
* @return the database
*/
IWaveformDbLoader getLoader();
}

View File

@ -15,17 +15,16 @@ import java.beans.PropertyChangeListener;
import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import com.minres.scviewer.database.HierNode;
import com.minres.scviewer.database.IHierNode;
import com.minres.scviewer.database.IWaveform;
import com.minres.scviewer.database.IWaveformDb;
import com.minres.scviewer.database.IWaveformDbLoader;
import com.minres.scviewer.database.IWaveformDbLoaderFactory;
import com.minres.scviewer.database.RelationType;
/**
@ -34,7 +33,7 @@ import com.minres.scviewer.database.RelationType;
public class WaveformDb extends HierNode implements IWaveformDb, PropertyChangeListener {
/** The loaders. */
private static List<IWaveformDbLoaderFactory> loaderFactories = new LinkedList<>();
private static List<IWaveformDbLoader> loaders = new LinkedList<>();
/** The loaded. */
private boolean loaded;
@ -53,8 +52,8 @@ public class WaveformDb extends HierNode implements IWaveformDb, PropertyChangeL
*
* @param loader the loader
*/
public synchronized void bind(IWaveformDbLoaderFactory loader) {
loaderFactories.add(loader);
public synchronized void bind(IWaveformDbLoader loader) {
loaders.add(loader);
}
/**
@ -62,8 +61,8 @@ public class WaveformDb extends HierNode implements IWaveformDb, PropertyChangeL
*
* @param loader the loader
*/
public synchronized void unbind(IWaveformDbLoaderFactory loader) {
loaderFactories.remove(loader);
public synchronized void unbind(IWaveformDbLoader loader) {
loaders.remove(loader);
}
/**
@ -71,8 +70,8 @@ public class WaveformDb extends HierNode implements IWaveformDb, PropertyChangeL
*
* @return the loaders
*/
public static List<IWaveformDbLoaderFactory> getLoaders() {
return Collections.unmodifiableList(loaderFactories);
public static List<IWaveformDbLoader> getLoaders() {
return Collections.unmodifiableList(loaders);
}
/**
@ -80,7 +79,7 @@ public class WaveformDb extends HierNode implements IWaveformDb, PropertyChangeL
*/
public WaveformDb() {
super();
waveforms = new ConcurrentHashMap<>();
waveforms = new HashMap<>();
relationTypes = new ArrayList<>();
maxTime = 0L;
}
@ -125,9 +124,8 @@ public class WaveformDb extends HierNode implements IWaveformDb, PropertyChangeL
@Override
public boolean load(File inp) {
boolean retval = true;
for (IWaveformDbLoaderFactory loaderFactory : loaderFactories) {
if (loaderFactory.canLoad(inp)) {
IWaveformDbLoader loader = loaderFactory.getLoader();
for (IWaveformDbLoader loader : loaders) {
if (loader.canLoad(inp)) {
loader.addPropertyChangeListener(this);
try {
loader.load(this, inp);
@ -167,6 +165,16 @@ public class WaveformDb extends HierNode implements IWaveformDb, PropertyChangeL
return ext;
}
/**
* Clear.
*/
@Override
public void clear() {
waveforms.clear();
childNodes.clear();
loaded = false;
}
/**
* Checks if is loaded.
*
@ -193,7 +201,7 @@ public class WaveformDb extends HierNode implements IWaveformDb, PropertyChangeL
/**
* Builds the hierarchy nodes.
*/
private synchronized void buildHierarchyNodes() {
private void buildHierarchyNodes() {
boolean needsSorting = false;
for (IWaveform stream : getAllWaves()) {
if (stream.getParent() == null) {

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<application:Application xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:advanced="http://www.eclipse.org/ui/2010/UIModel/application/ui/advanced" xmlns:application="http://www.eclipse.org/ui/2010/UIModel/application" xmlns:basic="http://www.eclipse.org/ui/2010/UIModel/application/ui/basic" xmlns:menu="http://www.eclipse.org/ui/2010/UIModel/application/ui/menu" xmlns:ui="http://www.eclipse.org/ui/2010/UIModel/application/ui" xmi:id="_95PfsHNmEeWBq8z1Dv39LA" elementId="org.eclipse.e4.ide.application" bindingContexts="_95PfuXNmEeWBq8z1Dv39LA">
<children xsi:type="basic:TrimmedWindow" xmi:id="_95PfsXNmEeWBq8z1Dv39LA" elementId="com.minres.scviewer.e4.application.trimmedwindow.main" label="SC Viewer" bindingContexts="_95PfunNmEeWBq8z1Dv39LA" width="1280" height="700">
<children xsi:type="basic:TrimmedWindow" xmi:id="_95PfsXNmEeWBq8z1Dv39LA" label="SC Viewer" bindingContexts="_95PfunNmEeWBq8z1Dv39LA" width="1280" height="700">
<children xsi:type="advanced:PerspectiveStack" xmi:id="_95QGxnNmEeWBq8z1Dv39LA">
<children xsi:type="advanced:Perspective" xmi:id="_95QGx3NmEeWBq8z1Dv39LA">
<children xsi:type="basic:PartStack" xmi:id="_95QGyXNmEeWBq8z1Dv39LA" elementId="org.eclipse.editorss" containerData="7500">
@ -9,7 +9,6 @@
</children>
</children>
<children xsi:type="basic:Part" xmi:id="__VNlAIytEeWid7xO48ZBXw" elementId="com.minres.scviewer.e4.application.dialog.aboutscviewer" toBeRendered="false" visible="false" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.parts.AboutDialog" label="About SCViewer" bindingContexts="_95Pfu3NmEeWBq8z1Dv39LA"/>
<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"/>
@ -56,8 +55,7 @@
</children>
<children xsi:type="menu:Menu" xmi:id="_95QGxHNmEeWBq8z1Dv39LA" elementId="com.minres.scviewer.e4.application.menu.help" label="Help">
<children xsi:type="menu:HandledMenuItem" xmi:id="_UQRi0B07EeuiP60JNw0iiA" elementId="com.minres.scviewer.e4.application.handledmenuitem.checkforupdate" visible="false" label="Check for Update" enabled="false" command="_-9ED4B06EeuiP60JNw0iiA"/>
<children xsi:type="menu:HandledMenuItem" xmi:id="_95QGxXNmEeWBq8z1Dv39LA" label="Online Help" command="_lqjIYEYEEeyPM8G0E2EYww"/>
<children xsi:type="menu:HandledMenuItem" xmi:id="_4xtmgEYEEeyPM8G0E2EYww" label="About" command="_95PfxnNmEeWBq8z1Dv39LA"/>
<children xsi:type="menu:HandledMenuItem" xmi:id="_95QGxXNmEeWBq8z1Dv39LA" label="About" command="_95PfxnNmEeWBq8z1Dv39LA"/>
</children>
</mainMenu>
<trimBars xmi:id="_95QGy3NmEeWBq8z1Dv39LA" elementId="org.eclipse.ui.main.toolbar">
@ -102,25 +100,19 @@
</children>
</children>
<children xsi:type="menu:ToolBar" xmi:id="_oQdMUHcqEeWwZ-9vrAR2UQ" elementId="com.minres.scviewer.e4.application.toolbar.1">
<children xsi:type="menu:HandledToolItem" xmi:id="_LFGfsEZEEeyKK_icsY7Xjg" elementId="com.minres.scviewer.e4.application.handledtoolitem.zoomfull" label="Zoom full" iconURI="platform:/plugin/com.minres.scviewer.e4.application/icons/zoom_full.png" tooltip="Zoom full range" command="_693GoHcqEeWwZ-9vrAR2UQ">
<parameters xmi:id="_LFGfsUZEEeyKK_icsY7Xjg" elementId="com.minres.scviewer.e4.application.parameter.full" name="com.minres.scviewer.e4.application.command.zoomcommand.parameter.level" value="full"/>
</children>
<children xsi:type="menu:HandledToolItem" xmi:id="_5DrGQHf4EeWwZ-9vrAR2UQ" elementId="com.minres.scviewer.e4.application.handledtoolitem.zoomfit" label="Zoom fit" iconURI="platform:/plugin/com.minres.scviewer.e4.application/icons/zoom_fit.png" tooltip="Zoom between cursor and marker" command="_693GoHcqEeWwZ-9vrAR2UQ">
<parameters xmi:id="_5DrGQXf4EeWwZ-9vrAR2UQ" elementId="com.minres.scviewer.e4.application.parameter.fit" name="com.minres.scviewer.e4.application.command.zoomcommand.parameter.level" value="fit"/>
<children xsi:type="menu:HandledToolItem" xmi:id="_5DrGQHf4EeWwZ-9vrAR2UQ" elementId="com.minres.scviewer.e4.application.handledtoolitem.zoomfit" label="Zoom out" iconURI="platform:/plugin/com.minres.scviewer.e4.application/icons/magnifier.png" tooltip="Restore default zoom level" command="_693GoHcqEeWwZ-9vrAR2UQ">
<parameters xmi:id="_5DrGQXf4EeWwZ-9vrAR2UQ" elementId="com.minres.scviewer.e4.application.parameter.14" name="com.minres.scviewer.e4.application.command.zoomcommand.parameter.level" value="fit"/>
</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">
<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.15" 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">
<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.14" name="com.minres.scviewer.e4.application.command.zoomcommand.parameter.level" value="out"/>
</children>
</children>
<children xsi:type="menu:ToolBar" xmi:id="_fwn8wGtTEeqmlpoaaMHoiw" elementId="com.minres.scviewer.e4.application.toolbar.2">
<children xsi:type="menu:HandledToolItem" xmi:id="_j-XIgGtTEeqmlpoaaMHoiw" elementId="com.minres.scviewer.e4.application.handledtoolitem.txdetails" label="TX Details" iconURI="platform:/plugin/com.minres.scviewer.e4.application/icons/application_side_expand.png" tooltip="Show tx details parts" selected="true" type="Check" command="_Fj1gQEYoEeyKK_icsY7Xjg">
<tags>EnableTxDetails</tags>
</children>
<children xsi:type="menu:HandledToolItem" xmi:id="_33tugEYnEeyKK_icsY7Xjg" elementId="com.minres.scviewer.e4.application.handledtoolitem.hover" label="Hover" iconURI="platform:/plugin/com.minres.scviewer.e4.application/icons/lightbulb.png" tooltip="Enable hover window in waveform" selected="true" type="Check" command="_uyeyYGtTEeqmlpoaaMHoiw">
<children xsi:type="menu:HandledToolItem" xmi:id="_j-XIgGtTEeqmlpoaaMHoiw" elementId="com.minres.scviewer.e4.application.handledtoolitem.hover" label="Hover" iconURI="platform:/plugin/com.minres.scviewer.e4.application/icons/lightbulb.png" tooltip="Enable hover window in waveform" selected="true" type="Check" command="_uyeyYGtTEeqmlpoaaMHoiw">
<tags>EnableHover</tags>
</children>
</children>
@ -134,9 +126,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"/>
@ -146,12 +135,10 @@
<handlers xmi:id="_UUnX8IoNEeWxJ_wPkM6yGQ" elementId="com.minres.scviewer.e4.application.handler.set_them" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.ThemeSetHandler" command="_KlGlsIoNEeWxJ_wPkM6yGQ"/>
<handlers xmi:id="_V4EscIuGEeWid7xO48ZBXw" elementId="com.minres.scviewer.e4.application.handler.setreleationtype" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.SetRelationTypeHandler" command="_E9lUgIt2EeWid7xO48ZBXw"/>
<handlers xmi:id="__99WoJebEeW09eyIbHsdvg" elementId="com.minres.scviewer.e4.application.handler.loadStoreSettings" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.LoadStoreSettingsHandler" command="_7-AIMJebEeW09eyIbHsdvg"/>
<handlers xmi:id="_x4pSEGtTEeqmlpoaaMHoiw" elementId="com.minres.scviewer.e4.application.handler.enablehover" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.EnableHover" command="_uyeyYGtTEeqmlpoaaMHoiw"/>
<handlers xmi:id="_x4pSEGtTEeqmlpoaaMHoiw" elementId="com.minres.scviewer.e4.application.handler.0" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.EnableHover" command="_uyeyYGtTEeqmlpoaaMHoiw"/>
<handlers xmi:id="_h3jU8BkWEeudD5MqrWoETQ" elementId="com.minres.scviewer.e4.application.handler.reloadCommand" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.ReloadHandler" command="_srACsBkREeudD5MqrWoETQ"/>
<handlers xmi:id="_gn_boBlEEeuiP60JNw0iiA" elementId="com.minres.scviewer.e4.application.handler.txSearch" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.SearchHandler" command="_XDxTYBlEEeuiP60JNw0iiA"/>
<handlers xmi:id="_CCEtAB07EeuiP60JNw0iiA" elementId="com.minres.scviewer.e4.application.handler.update" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.UpdateHandler" command="_-9ED4B06EeuiP60JNw0iiA"/>
<handlers xmi:id="_ru2NIEYEEeyPM8G0E2EYww" elementId="com.minres.scviewer.e4.application.handler.helpCommand" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.HelpHandler" command="_lqjIYEYEEeyPM8G0E2EYww"/>
<handlers xmi:id="_TwU0IEYoEeyKK_icsY7Xjg" elementId="com.minres.scviewer.e4.application.handler.enabletxdetails" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.EnableTxDetails" command="_Fj1gQEYoEeyKK_icsY7Xjg"/>
<bindingTables xmi:id="_95PfvnNmEeWBq8z1Dv39LA" bindingContext="_95PfuXNmEeWBq8z1Dv39LA">
<bindings xmi:id="_95Pfv3NmEeWBq8z1Dv39LA" elementId="com.minres.scviewer.e4.application.keybinding.quit" keySequence="M1+Q" command="_95PfvHNmEeWBq8z1Dv39LA">
<tags>type:user</tags>
@ -293,8 +280,6 @@
<commands xmi:id="_srACsBkREeudD5MqrWoETQ" elementId="com.minres.scviewer.e4.application.reload" commandName="Reload Command"/>
<commands xmi:id="_XDxTYBlEEeuiP60JNw0iiA" elementId="com.minres.scviewer.e4.application.txSearch" commandName="Search Command"/>
<commands xmi:id="_-9ED4B06EeuiP60JNw0iiA" elementId="com.minres.scviewer.e4.application.command.update" commandName="Update"/>
<commands xmi:id="_lqjIYEYEEeyPM8G0E2EYww" elementId="org.eclipse.ui.help.helpAction" commandName="Help Command"/>
<commands xmi:id="_Fj1gQEYoEeyKK_icsY7Xjg" elementId="com.minres.scviewer.e4.application.command.enabletxdetails" commandName="Enable Tx Details" description="Show tx details parts"/>
<addons xmi:id="_95PfsnNmEeWBq8z1Dv39LA" elementId="org.eclipse.e4.core.commands.service" contributionURI="bundleclass://org.eclipse.e4.core.commands/org.eclipse.e4.core.commands.CommandServiceAddon"/>
<addons xmi:id="_95Pfs3NmEeWBq8z1Dv39LA" elementId="org.eclipse.e4.ui.contexts.service" contributionURI="bundleclass://org.eclipse.e4.ui.services/org.eclipse.e4.ui.services.ContextServiceAddon"/>
<addons xmi:id="_95PftHNmEeWBq8z1Dv39LA" elementId="org.eclipse.e4.ui.bindings.service" contributionURI="bundleclass://org.eclipse.e4.ui.bindings/org.eclipse.e4.ui.bindings.BindingServiceAddon"/>

View File

@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: com.minres.scviewer.e4.application;singleton:=true
Bundle-Version: 2.14.1
Bundle-Version: 2.13.0
Bundle-Vendor: %Bundle-Vendor
Require-Bundle: javax.inject;bundle-version="1.0.0",
org.eclipse.core.runtime;bundle-version="3.11.1",
@ -35,10 +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.engine;bundle-version="2.6.600",
org.eclipse.equinox.p2.operations;bundle-version="2.5.700",
org.eclipse.equinox.p2.metadata.repository;bundle-version="1.3.400",
org.eclipse.help.base;bundle-version="4.2.900"
org.eclipse.equinox.p2.metadata.repository;bundle-version="1.3.400"
Bundle-RequiredExecutionEnvironment: JavaSE-11
Import-Package: com.minres.scviewer.database,
javax.annotation;version="1.0.0";resolution:=optional,
javax.inject;version="1.0.0"
Automatic-Module-Name: com.minres.scviewer.e4.application

Binary file not shown.

Before

Width:  |  Height:  |  Size: 781 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 547 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 581 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 625 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 685 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 631 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

View File

@ -6,8 +6,8 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.14.1</version>
<relativePath>../../..</relativePath>
<version>2.13.0</version>
<relativePath>../..</relativePath>
</parent>
<packaging>eclipse-plugin</packaging>
</project>
</project>

View File

@ -24,7 +24,6 @@ public class Messages extends NLS {
public static String SCViewerPreferencesPage_0;
public static String SCViewerPreferencesPage_1;
public static String SCViewerPreferencesPage_2;
public static String SCViewerPreferencesPage_3;
public static String StatusBarControl_1;
public static String StatusBarControl_2;
public static String StatusBarControl_3;
@ -83,16 +82,6 @@ public class Messages extends NLS {
public static String cursor;
public static String cursor_drag;
public static String cursor_text;
public static String HelpBrowser_7;
public static String HelpBrowser_8;
public static String HelpDialog_0;
public static String HelpDialog_1;
public static String HelpDialog_2;
public static String HelpDialog_3;
public static String HelpDialog_4;
public static String HelpDialog_5;
public static String HelpDialog_6;
public static String HelpDialog_7;
public static String marker;
public static String marker_text;
public static String rel_arrow;

View File

@ -1,57 +0,0 @@
package com.minres.scviewer.e4.application.handlers;
import java.util.LinkedList;
import java.util.List;
import javax.inject.Inject;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.e4.core.di.annotations.Execute;
import org.eclipse.e4.core.di.annotations.Optional;
import org.eclipse.e4.core.di.extensions.Preference;
import org.eclipse.e4.ui.model.application.MApplication;
import org.eclipse.e4.ui.model.application.ui.menu.MHandledItem;
import org.eclipse.e4.ui.workbench.modeling.EModelService;
import org.eclipse.e4.ui.workbench.modeling.EPartService;
import org.osgi.service.prefs.BackingStoreException;
import com.minres.scviewer.e4.application.preferences.PreferenceConstants;
@SuppressWarnings("restriction")
public class EnableTxDetails {
static final String TAG_NAME = "EnableTxDetails"; //$NON-NLS-1$
static final String ICON_DISABLED = "platform:/plugin/com.minres.scviewer.e4.application/icons/application_side_expand.png"; //$NON-NLS-1$
static final String ICON_ENABLED = "platform:/plugin/com.minres.scviewer.e4.application/icons/application_side_contract.png"; //$NON-NLS-1$
static final String TOOLTIP_DISABLED = "Show tx details parts";
static final String TOOLTIP_ENABLED = "Hide tx details parts";
@Inject
MApplication application;
@Inject
EPartService partService;
@Inject
@Optional
public void reactOnShowHoverChange(EModelService modelService, @Preference(value = PreferenceConstants.SHOW_TX_DETAILS) Boolean show) {
List<String> tags = new LinkedList<>();
tags.add(TAG_NAME);
List<MHandledItem> elements = modelService.findElements(application, null, MHandledItem.class, tags );
for( MHandledItem hi : elements ){
hi.setSelected(show);
hi.setIconURI(show?ICON_ENABLED:ICON_DISABLED);
hi.setTooltip(show?TOOLTIP_ENABLED:TOOLTIP_DISABLED);
}
}
@Execute
public void execute(MHandledItem handledItem, @Preference(nodePath = PreferenceConstants.PREFERENCES_SCOPE) IEclipsePreferences prefs ) {
try {
prefs.putBoolean(PreferenceConstants.SHOW_TX_DETAILS, handledItem.isSelected());
prefs.flush();
} catch (BackingStoreException e) {}
}
}

View File

@ -1,50 +0,0 @@
/*******************************************************************************
* Copyright (c) 2015-2021 MINRES Technologies GmbH and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* MINRES Technologies GmbH - initial API and implementation
*******************************************************************************/
package com.minres.scviewer.e4.application.handlers;
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.ui.model.application.MApplication;
import org.eclipse.e4.ui.model.application.ui.MUIElement;
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 {
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$
@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);
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

@ -42,8 +42,6 @@ public class ZoomHandler {
waveformViewerPart.setZoomLevel(zoomLevel+1);
else if("fit".equalsIgnoreCase(level)) //$NON-NLS-1$
waveformViewerPart.setZoomFit();
else if("full".equalsIgnoreCase(level)) //$NON-NLS-1$
waveformViewerPart.setZoomFull();
}
}

View File

@ -9,7 +9,7 @@ DesignBrowser_8=Insert before
LoadingWaveformDb_0=Database loading...
LoadStoreSettingsHandler_2=*.scview
LoadStoreSettingsHandler_3=SCViewer.scview
OpenHandler_0=*.vcd;*.vcd.gz;*.txlog;*.txlog.gz;*.txdb;*.fbrdb
OpenHandler_0=*.vcd;*.vcd.gz;*.txdb;*.txdb.gz;*.txlog;*.fbrdb
QuitHandler_0=Confirmation
QuitHandler_1=Do you want to exit?
RelationTypeToolControl_0=------------
@ -18,7 +18,6 @@ ResourceManager_0=Wrong decorate corner
SCViewerPreferencesPage_0=Check for changed database
SCViewerPreferencesPage_1=Show hover window in waveform
SCViewerPreferencesPage_2=Waveform track height
SCViewerPreferencesPage_3=Show tx details in waveform
StatusBarControl_1=Currently running:
StatusBarControl_2=\nLast task:
StatusBarControl_3=Currently running:
@ -77,16 +76,6 @@ signal_nan=Signal NaN Value
cursor=Cursor
cursor_drag=dragged Cursor
cursor_text=Cursor Text
HelpBrowser_7=Error initializing help browser
HelpBrowser_8=An error occurred while initializing the help browser:
HelpDialog_0=Back
HelpDialog_1=Forward
HelpDialog_2=Stop
HelpDialog_3=Refresh
HelpDialog_4=Go
HelpDialog_5=Address
HelpDialog_6=https://git.minres.com/VP-Tools/SCViewer/src/branch/master/README.md\#key-shortcuts
HelpDialog_7=Could not instantiate Browser:
marker=Marker
marker_text=Marker TExt
rel_arrow=Relation arrow

View File

@ -131,9 +131,7 @@ public class AboutDialog extends Dialog {
if (style != null && style.underline && style.underlineStyle == SWT.UNDERLINE_LINK) {
Desktop.getDesktop().browse(new java.net.URI(style.data.toString()));
}
} catch (IOException | URISyntaxException | IllegalArgumentException e) {
} catch (UnsupportedOperationException e) {
}
} catch (IOException | URISyntaxException | IllegalArgumentException e) {}
});
styleRange.start = 0;

View File

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

View File

@ -1,177 +0,0 @@
package com.minres.scviewer.e4.application.parts;
import javax.annotation.PostConstruct;
import javax.inject.Inject;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.swt.SWT;
import org.eclipse.swt.SWTError;
import org.eclipse.swt.browser.Browser;
import org.eclipse.swt.browser.LocationListener;
import org.eclipse.swt.browser.ProgressEvent;
import org.eclipse.swt.browser.ProgressListener;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
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;
import com.minres.scviewer.e4.application.Messages;
public class HelpDialog extends Dialog {
/**
* Create the dialog.
*
* @param parentShell the parent shell
*/
@Inject
public HelpDialog(Shell parentShell) {
super(parentShell);
setShellStyle(getShellStyle() | SWT.MODELESS | SWT.MAX | SWT.BORDER | SWT.TITLE);
setBlockOnOpen(false);
}
@Override
protected boolean isResizable() {
return true;
}
@Override
protected Point getInitialSize() {
return new Point(800, 600);
}
/**
* Create contents of the dialog.
*
* @param parent the parent
* @return the control
*/
@Override
protected Control createDialogArea(Composite parent) {
Composite container = (Composite) super.createDialogArea(parent);
GridLayout gridLayout = new GridLayout();
gridLayout.numColumns = 3;
container.setLayout(gridLayout);
ToolBar toolbar = new ToolBar(container, SWT.NONE);
ToolItem itemBack = new ToolItem(toolbar, SWT.PUSH);
itemBack.setText(Messages.HelpDialog_0);
ToolItem itemForward = new ToolItem(toolbar, SWT.PUSH);
itemForward.setText(Messages.HelpDialog_1);
ToolItem itemStop = new ToolItem(toolbar, SWT.PUSH);
itemStop.setText(Messages.HelpDialog_2);
ToolItem itemRefresh = new ToolItem(toolbar, SWT.PUSH);
itemRefresh.setText(Messages.HelpDialog_3);
ToolItem itemGo = new ToolItem(toolbar, SWT.PUSH);
itemGo.setText(Messages.HelpDialog_4);
GridData data = new GridData();
data.horizontalSpan = 3;
toolbar.setLayoutData(data);
Label labelAddress = new Label(container, SWT.NONE);
labelAddress.setText(Messages.HelpDialog_5);
final Text location = new Text(container, SWT.BORDER);
data = new GridData();
data.horizontalAlignment = GridData.FILL;
data.horizontalSpan = 2;
data.grabExcessHorizontalSpace = true;
location.setLayoutData(data);
final Browser browser;
try {
browser = new Browser(container, SWT.NONE);
data = new GridData();
// data.widthHint = 800;
// data.heightHint =600;
data.horizontalAlignment = GridData.FILL;
data.verticalAlignment = GridData.FILL;
data.horizontalSpan = 3;
data.grabExcessHorizontalSpace = true;
data.grabExcessVerticalSpace = true;
browser.setLayoutData(data);
final Label status = new Label(container, SWT.NONE);
data = new GridData(GridData.FILL_HORIZONTAL);
data.horizontalSpan = 2;
status.setLayoutData(data);
final ProgressBar progressBar = new ProgressBar(container, SWT.NONE);
data = new GridData();
data.horizontalAlignment = GridData.END;
progressBar.setLayoutData(data);
/* event handling */
Listener listener = event -> {
ToolItem item = (ToolItem) event.widget;
String string = item.getText();
if (string.equals(Messages.HelpDialog_0))
browser.back();
else if (string.equals(Messages.HelpDialog_1))
browser.forward();
else if (string.equals(Messages.HelpDialog_2))
browser.stop();
else if (string.equals(Messages.HelpDialog_3))
browser.refresh();
else if (string.equals(Messages.HelpDialog_4))
browser.setUrl(location.getText());
};
browser.addProgressListener(new ProgressListener() {
@Override
public void changed(ProgressEvent event) {
if (event.total == 0) return;
int ratio = event.current * 100 / event.total;
progressBar.setSelection(ratio);
}
@Override
public void completed(ProgressEvent event) {
progressBar.setSelection(0);
}
});
browser.addStatusTextListener(event -> status.setText(event.text));
browser.addLocationListener(LocationListener.changedAdapter(event -> {
if (event.top) location.setText(event.location);
}
));
itemBack.addListener(SWT.Selection, listener);
itemForward.addListener(SWT.Selection, listener);
itemStop.addListener(SWT.Selection, listener);
itemRefresh.addListener(SWT.Selection, listener);
itemGo.addListener(SWT.Selection, listener);
location.addListener(SWT.DefaultSelection, e -> browser.setUrl(location.getText()));
browser.setUrl(Messages.HelpDialog_6);
} catch (SWTError e) {
System.out.println(Messages.HelpDialog_7 + e.getMessage());
}
return container;
}
/* (non-Javadoc)
* @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
*/
@Override
protected void createButtonsForButtonBar(Composite parent) {
// create OK button
createButton(parent, IDialogConstants.OK_ID, IDialogConstants.CLOSE_LABEL, true);
}
/**
* Open the dialog.
* @return the result
*/
@PostConstruct
@Override
public int open() {
return super.open();
}
}

View File

@ -74,7 +74,6 @@ import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.TableItem;
import org.eclipse.swt.widgets.Widget;
import org.osgi.service.prefs.BackingStoreException;
import com.minres.scviewer.database.DataType;
import com.minres.scviewer.database.IHierNode;
@ -83,7 +82,6 @@ import com.minres.scviewer.database.IWaveformDb;
import com.minres.scviewer.database.IWaveformDbFactory;
import com.minres.scviewer.database.RelationType;
import com.minres.scviewer.database.RelationTypeFactory;
import com.minres.scviewer.database.WaveformType;
import com.minres.scviewer.database.tx.ITx;
import com.minres.scviewer.database.tx.ITxAttribute;
import com.minres.scviewer.database.tx.ITxEvent;
@ -119,38 +117,35 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
/** The Constant DATABASE_FILE. */
protected static final String DATABASE_FILE = "DATABASE_FILE"; //$NON-NLS-1$
/** The Constant SHOWN_WAVEFORM. */
protected static final String SHOWN_WAVEFORM = "SHOWN_WAVEFORM"; //$NON-NLS-1$
protected static final String VALUE_DISPLAY = ".VALUE_DISPLAY"; //$NON-NLS-1$
protected static final String WAVE_DISPLAY = ".WAVE_DISPLAY"; //$NON-NLS-1$
/** The Constant SHOWN_CURSOR. */
protected static final String SHOWN_CURSOR = "SHOWN_CURSOR"; //$NON-NLS-1$
/** The Constant ZOOM_LEVEL. */
protected static final String ZOOM_LEVEL = "ZOOM_LEVEL"; //$NON-NLS-1$
/** The Constant BASE_LINE_TIME. */
protected static final String BASE_LINE_TIME = "BASE_LINE_TIME"; //$NON-NLS-1$
/** The Constant SELECTED_TX_ID. */
protected static final String SELECTED_TX_ID = "SELECTED_TX_ID"; //$NON-NLS-1$
/** The Constant SELECTED_TRACKENTRY_NAME. */
protected static final String SELECTED_TRACKENTRY_NAME = "SELECTED_TRACKENTRY_NAME"; //$NON-NLS-1$
/** The Constant WAVEFORM_SELECTED. */
protected static final String WAVEFORM_SELECTED = ".WAVEFORM_SELECTED"; //$NON-NLS-1$
/** The Constant FILE_CHECK_INTERVAL. */
protected static final long FILE_CHECK_INTERVAL = 60000;
/** The Constant TX_DETAILS_SHOWN. */
protected static final String TX_DETAILS_SHOWN = "TX_DETAILS_SHOWN"; //$NON-NLS-1$
/** The zoom level. */
private String[] zoomLevel;
@ -161,19 +156,19 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
public static final String WAVE_ACTION_ID = "com.minres.scviewer.ui.action.AddToWave"; //$NON-NLS-1$
private static final String MENU_CONTEXT = "com.minres.scviewer.e4.application.popupmenu.wavecontext"; //$NON-NLS-1$
/** The number of active DisposeListeners */
private int disposeListenerNumber = 0;
/** The factory. */
WaveformViewFactory factory = new WaveformViewFactory();
DesignBrowser browser = null;
TransactionDetails detailsView = null;
TransactionListView transactionList = null;
/** The waveform pane. */
private IWaveformView waveformPane;
@ -216,7 +211,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
ArrayList<File> filesToLoad = new ArrayList<>();
String partConfig = "";
/** The persisted state. */
Map<String, String> persistedState;
@ -236,14 +231,10 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
IModificationChecker fileChecker;
@Inject IWaveformDbFactory dbFactory;
@Inject Composite parent;
private boolean showHover;
private SashForm topSash = null;
private SashForm middleSash = null;
@Inject Composite parent;
private boolean showHover;
/**
* Creates the composite.
@ -255,7 +246,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
@PostConstruct
public void createComposite(MPart part, EMenuService menuService, @Preference(nodePath = PreferenceConstants.PREFERENCES_SCOPE) IEclipsePreferences prefs, @Preference(value = PreferenceConstants.SHOW_HOVER) Boolean hover) {
disposeListenerNumber += 1;
myPart = part;
myParent = parent;
store=prefs;
@ -267,14 +258,14 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
}
});
parent.setLayout(new FillLayout(SWT.HORIZONTAL));
IEclipseContext ctx = myPart.getContext();
ctx.set(WaveformViewer.class, this);
ctx.set(IWaveformDb.class, database);
topSash = new SashForm(parent, SWT.BORDER | SWT.SMOOTH | SWT.HORIZONTAL);
SashForm topSash = new SashForm(parent, SWT.BORDER | SWT.SMOOTH | SWT.HORIZONTAL);
Composite left = new Composite(topSash, SWT.NONE);
middleSash = new SashForm(topSash, SWT.BORDER | SWT.SMOOTH | SWT.VERTICAL);
SashForm middleSash = new SashForm(topSash, SWT.BORDER | SWT.SMOOTH | SWT.VERTICAL);
Composite right = new Composite(topSash, SWT.NONE);
topSash.setWeights(new int[] {20, 60, 20});
@ -284,101 +275,97 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
ctx.set(Composite.class, left);
browser = ContextInjectionFactory.make(DesignBrowser.class, ctx);
ctx.set(Composite.class, right);
detailsView = ContextInjectionFactory.make(TransactionDetails.class, ctx);
waveformPane = factory.createPanel(middleTop);
ctx.set(Composite.class, middleBottom);
transactionList = ContextInjectionFactory.make(TransactionListView.class, ctx);
waveformPane.setMaxTime(0);
//set selection to empty selection when opening a new waveformPane
selectionService.setSelection(new StructuredSelection());
waveformPane.addPropertyChangeListener(IWaveformView.CURSOR_PROPERTY, evt -> {
Long time = (Long) evt.getNewValue();
eventBroker.post(WaveStatusBarControl.CURSOR_TIME, waveformPane.getScaledTime(time));
long marker = waveformPane.getMarkerTime(waveformPane.getSelectedMarkerId());
eventBroker.post(WaveStatusBarControl.MARKER_DIFF, waveformPane.getScaledTime(time - marker));
Long time = (Long) evt.getNewValue();
eventBroker.post(WaveStatusBarControl.CURSOR_TIME, waveformPane.getScaledTime(time));
long marker = waveformPane.getMarkerTime(waveformPane.getSelectedMarkerId());
eventBroker.post(WaveStatusBarControl.MARKER_DIFF, waveformPane.getScaledTime(time - marker));
});
waveformPane.addPropertyChangeListener(IWaveformView.MARKER_PROPERTY, evt -> {
Long time = (Long) evt.getNewValue();
eventBroker.post(WaveStatusBarControl.MARKER_TIME, waveformPane.getScaledTime(time));
long cursor = waveformPane.getCursorTime();
eventBroker.post(WaveStatusBarControl.MARKER_DIFF, waveformPane.getScaledTime(cursor - time));
Long time = (Long) evt.getNewValue();
eventBroker.post(WaveStatusBarControl.MARKER_TIME, waveformPane.getScaledTime(time));
long cursor = waveformPane.getCursorTime();
eventBroker.post(WaveStatusBarControl.MARKER_DIFF, waveformPane.getScaledTime(cursor - time));
});
waveformPane.addSelectionChangedListener(event -> {
if (event.getSelection() instanceof IStructuredSelection) {
selectionService.setSelection(event.getSelection());
}
if (event.getSelection() instanceof IStructuredSelection) {
selectionService.setSelection(event.getSelection());
}
});
waveformPane.getWaveformControl().addListener(SWT.KeyDown, e -> {
if((e.stateMask&SWT.MOD3)!=0) { // Alt key
} else if((e.stateMask&SWT.MOD1)!=0) { //Ctrl/Cmd
int zoomlevel = waveformPane.getZoomLevel();
switch(e.keyCode) {
case '+':
case SWT.KEYPAD_ADD:
if(zoomlevel>0)
waveformPane.setZoomLevel(zoomlevel-1);
return;
case '-':
case SWT.KEYPAD_SUBTRACT:
if(zoomlevel<waveformPane.getZoomLevels().length-1)
waveformPane.setZoomLevel(zoomlevel+1);
return;
case SWT.ARROW_UP:
waveformPane.moveSelectedTrack(-1);
return;
case SWT.ARROW_DOWN:
waveformPane.moveSelectedTrack(1);
return;
default:
break;
if((e.stateMask&SWT.MOD3)!=0) { // Alt key
} else if((e.stateMask&SWT.MOD1)!=0) { //Ctrl/Cmd
int zoomlevel = waveformPane.getZoomLevel();
switch(e.keyCode) {
case '+':
case SWT.KEYPAD_ADD:
if(zoomlevel>0)
waveformPane.setZoomLevel(zoomlevel-1);
return;
case '-':
case SWT.KEYPAD_SUBTRACT:
if(zoomlevel<waveformPane.getZoomLevels().length-1)
waveformPane.setZoomLevel(zoomlevel+1);
return;
case SWT.ARROW_UP:
waveformPane.moveSelectedTrack(-1);
return;
case SWT.ARROW_DOWN:
waveformPane.moveSelectedTrack(1);
return;
default:
break;
}
} else if((e.stateMask&SWT.MOD2)!=0) { //Shift
switch(e.keyCode) {
case SWT.ARROW_LEFT:
waveformPane.scrollHorizontal(-100);
return;
case SWT.ARROW_RIGHT:
waveformPane.scrollHorizontal(100);
return;
default:
break;
}
} else {
switch(e.keyCode) {
case SWT.ARROW_LEFT:
waveformPane.scrollHorizontal(-10);
return;
case SWT.ARROW_RIGHT:
waveformPane.scrollHorizontal(10);
return;
case SWT.ARROW_UP:
waveformPane.moveSelection(GotoDirection.UP);
return;
case SWT.ARROW_DOWN:
waveformPane.moveSelection(GotoDirection.DOWN);
return;
case SWT.HOME:
return;
case SWT.END:
return;
default:
break;
}
}
} else if((e.stateMask&SWT.MOD2)!=0) { //Shift
switch(e.keyCode) {
case SWT.ARROW_LEFT:
waveformPane.scrollHorizontal(-100);
return;
case SWT.ARROW_RIGHT:
waveformPane.scrollHorizontal(100);
return;
default:
break;
}
} else {
switch(e.keyCode) {
case SWT.ARROW_LEFT:
waveformPane.scrollHorizontal(-10);
return;
case SWT.ARROW_RIGHT:
waveformPane.scrollHorizontal(10);
return;
case SWT.ARROW_UP:
waveformPane.moveSelection(GotoDirection.UP);
return;
case SWT.ARROW_DOWN:
waveformPane.moveSelection(GotoDirection.DOWN);
return;
case SWT.HOME:
waveformPane.scrollTo(IWaveformView.MARKER_POS);
return;
case SWT.END:
waveformPane.scrollTo(IWaveformView.CURSOR_POS);
return;
case SWT.DEL:
waveformPane.deleteSelectedTracks();
default:
break;
}
}
});
zoomLevel = waveformPane.getZoomLevels();
checkForUpdates = store.getBoolean(PreferenceConstants.DATABASE_RELOAD, true);
filesToLoad = new ArrayList<>();
@ -470,8 +457,8 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
valueCol.pack();
table.setSize(table.computeSize(SWT.DEFAULT, SWT.DEFAULT));
parent.addPaintListener( e -> {
Rectangle area = parent.getClientArea();
valueCol.setWidth(area.width - nameCol.getWidth());
Rectangle area = parent.getClientArea();
valueCol.setWidth(area.width - nameCol.getWidth());
});
parent.addFocusListener(FocusListener.focusGainedAdapter(e -> table.setFocus()));
return true;
@ -493,28 +480,21 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
}
});
waveformPane.setStyleProvider(new WaveformStyleProvider(store));
showTxDetails(false);
}
@Inject
@Optional
public void reactOnPrefsChange(@Preference(nodePath = PreferenceConstants.PREFERENCES_SCOPE) IEclipsePreferences prefs) {
prefs.addPreferenceChangeListener(this);
}
@Inject
@Optional
public void reactOnShowHoverChange(@Preference(nodePath = PreferenceConstants.PREFERENCES_SCOPE, value = PreferenceConstants.SHOW_HOVER) Boolean hover) {
showHover=hover;
}
@Inject
@Optional
public void reactOnShowTxDetailsChange(@Preference(nodePath = PreferenceConstants.PREFERENCES_SCOPE, value = PreferenceConstants.SHOW_TX_DETAILS) Boolean show) {
showTxDetails(show);
}
@Inject
@Optional
public void reactOnReloadDatabaseChange(@Preference(nodePath = PreferenceConstants.PREFERENCES_SCOPE, value = PreferenceConstants.DATABASE_RELOAD) Boolean checkForUpdates) {
@ -584,13 +564,12 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
if (monitor.isCanceled())
throw new OperationCanceledException(Messages.WaveformViewer_14);
IStatus result = jobGroup.getResult();
if( (!result.isMultiStatus() && result.getCode() != Status.OK_STATUS.getCode() ) ||
(result.isMultiStatus() && result.getChildren().length > 0 && result.getChildren()[0].getCode() != Status.OK_STATUS.getCode() ) ){
// kill editor and pop up warning for user
sync.asyncExec(() -> {
if(myParent.isDisposed()) return;
final Display display = myParent.getDisplay();
MessageDialog.openWarning(display.getActiveShell(), "Error loading database", "Database cannot be loaded. Aborting...");
ePartService.hidePart(myPart, true);
@ -621,10 +600,10 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
public void fileChanged(List<File> file) {
final Display display = myParent.getDisplay();
display.asyncExec(() -> {
if (MessageDialog.openQuestion(display.getActiveShell(), Messages.WaveformViewer_17,
Messages.WaveformViewer_18)) {
reloadDatabase();
}
if (MessageDialog.openQuestion(display.getActiveShell(), Messages.WaveformViewer_17,
Messages.WaveformViewer_18)) {
reloadDatabase();
}
});
fileMonitor.removeFileChangeListener(this);
}
@ -633,12 +612,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
Map<String, String> state = new HashMap<>();
saveWaveformViewerState(state);
waveformPane.getStreamList().clear();
database = dbFactory.getDatabase();
database.addPropertyChangeListener(evt -> {
if (IHierNode.WAVEFORMS.equals(evt.getPropertyName())) { //$NON-NLS-1$
myParent.getDisplay().syncExec(() -> waveformPane.setMaxTime(database.getMaxTime()));
}
});
database.clear();
if (!filesToLoad.isEmpty())
loadDatabase(state, 0L);
}
@ -700,14 +674,14 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
saveWaveformViewerState(persistingState);
Properties props = new Properties();
props.putAll(persistingState);
try (FileOutputStream out = new FileOutputStream(fileName)) {
props.store(out, "Written by SCViewer"); //$NON-NLS-1$
} catch (IOException e) {
e.printStackTrace();
}
}
public void loadState(String fileName){
//clear old streams before loading tab settings
if(!waveformPane.getStreamList().isEmpty()) {
@ -725,7 +699,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
e.printStackTrace();
}
}
/**
* Save waveform viewer state.
*
@ -750,7 +724,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
}
persistingState.put(ZOOM_LEVEL, Integer.toString(waveformPane.getZoomLevel()));
persistingState.put(BASE_LINE_TIME, Long.toString(waveformPane.getBaselineTime()));
// get selected transaction of a stream
ISelection selection = waveformPane.getSelection();
if (!selection.isEmpty()) {
@ -765,25 +739,24 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
persistingState.put(SELECTED_TRACKENTRY_NAME, name);
}
}
persistingState.put(TX_DETAILS_SHOWN, Boolean.toString(store.getBoolean(PreferenceConstants.SHOW_TX_DETAILS, false)));
}
protected List<Object> getISelection(ISelection selection){
List<Object> result = new LinkedList<> ();
List<Object> result = new LinkedList<> ();
if ( selection instanceof IStructuredSelection ) {
Iterator<?> i = ((IStructuredSelection)selection).iterator();
while (i.hasNext()){
Object o = i.next ();
if (o == null) {
continue;
}
result.add(o);
}
}
return result;
if ( selection instanceof IStructuredSelection ) {
Iterator<?> i = ((IStructuredSelection)selection).iterator();
while (i.hasNext()){
Object o = i.next ();
if (o == null) {
continue;
}
result.add(o);
}
}
return result;
}
/**
* Restore waveform viewer state.
*
@ -840,24 +813,18 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
String trackentryName = state.get(SELECTED_TRACKENTRY_NAME);
//get TrackEntry Object based on name and TX Object by id and put into selectionList
trackEntries.stream().filter(e->trackentryName.equals(e.waveform.getFullName())).forEach(trackEntry ->
trackEntry.waveform.getEvents().entrySet().stream()
.map(e->e.events)
.filter(Objects::nonNull)
.forEach(entries->
Arrays.stream(entries)
.filter(e->e instanceof ITxEvent && txId.equals(((ITxEvent)e).getTransaction().getId()))
.forEach(event ->
waveformPane.setSelection(new StructuredSelection(
new Object[] {((ITxEvent)event).getTransaction(), trackEntry}))
trackEntry.waveform.getEvents().entrySet().stream()
.map(e->e.events)
.filter(Objects::nonNull)
.forEach(entries->
Arrays.stream(entries)
.filter(e->e instanceof ITxEvent && txId.equals(((ITxEvent)e).getTransaction().getId()))
.forEach(event ->
waveformPane.setSelection(new StructuredSelection(
new Object[] {((ITxEvent)event).getTransaction(), trackEntry}))
)
)
);
} catch (NumberFormatException e) {
}
}
if (state.containsKey(TX_DETAILS_SHOWN)) {
try {
showTxDetails(Boolean.parseBoolean(state.get(TX_DETAILS_SHOWN)));
)
);
} catch (NumberFormatException e) {
}
}
@ -993,18 +960,15 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
}
}
showTxDetails(waveformPane.getStreamList().stream().filter(t -> t.waveform.getType() == WaveformType.TRANSACTION).findFirst().isPresent());
setFocus();
}
public void removeSelectedStreamsFromList() {
waveformPane.deleteSelectedTracks();
showTxDetails(waveformPane.getStreamList().stream().filter(t -> t.waveform.getType() == WaveformType.TRANSACTION).findFirst().isPresent());
}
public void removeSelectedStreamFromList() {
waveformPane.deleteSelectedTracks();
showTxDetails(waveformPane.getStreamList().stream().filter(t -> t.waveform.getType() == WaveformType.TRANSACTION).findFirst().isPresent());
}
/**
* Move selected.
@ -1015,7 +979,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
waveformPane.moveSelectedTrack(i);
}
/**
* Move selection.
*
@ -1062,15 +1026,27 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
* Sets the zoom fit.
*/
public void setZoomFit() {
waveformPane.setZoomLevel(-2);
updateAll();
}
/**
* Sets the zoom fit.
*/
public void setZoomFull() {
waveformPane.setZoomLevel(-1);
//actual max time of signal
long maxTime = waveformPane.getMaxTime();
//get area actually capable of displaying data, i.e. area of the receiver which is capable of displaying data
Rectangle clientArea = myParent.getClientArea();
long clientAreaWidth = clientArea.width;
boolean foundZoom=false;
//try to find existing zoomlevel where scaleFactor*clientAreaWidth >= maxTime, if one is found set it as new zoomlevel
for (int level=0; level<Constants.UNIT_MULTIPLIER.length*Constants.UNIT_STRING.length; level++){
long scaleFactor = (long) Math.pow(10, level/2d);
if(level%2==1) scaleFactor*=3;
if(scaleFactor*clientAreaWidth >= maxTime) {
setZoomLevel(level);
foundZoom=true;
break;
}
}
//if no zoom level is found, set biggest one available
if(!foundZoom) setZoomLevel(Constants.UNIT_MULTIPLIER.length*Constants.UNIT_STRING.length-1);
updateAll();
}
@ -1215,7 +1191,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
if(navigationRelationType!=relationType) waveformPane.setHighliteRelation(relationType);
navigationRelationType=relationType;
}
public void update() {
waveformPane.update();
}
@ -1234,39 +1210,17 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
*
* @param e
*/
public void widgetDisposed(DisposeEvent e) {
disposeListenerNumber -= 1;
if( disposeListenerNumber == 0) { //if the last tab is closed, reset statusbar
public void widgetDisposed(DisposeEvent e) {
disposeListenerNumber -= 1;
if( disposeListenerNumber == 0) { //if the last tab is closed, reset statusbar
eventBroker.post(WaveStatusBarControl.ZOOM_LEVEL, null);
eventBroker.post(WaveStatusBarControl.CURSOR_TIME, null);
eventBroker.post(WaveStatusBarControl.MARKER_TIME, null);
eventBroker.post(WaveStatusBarControl.MARKER_DIFF, null);
}
}
}
}
public void search(String propName, DataType type, String propValue) {
transactionList.getControl().setSearchProps(propName, type, propValue);
}
public void showTxDetails(boolean show) {
if(middleSash==null || topSash==null || middleSash.isDisposed() || topSash.isDisposed())
return;
if(show) {
middleSash.setWeights(new int[] {75, 25});
topSash.setWeights(new int[] {20, 60, 20});
} else {
middleSash.setWeights(new int[] {100, 0});
topSash.setWeights(new int[] {20, 80, 0});
}
detailsView.getControl().setVisible(show);
transactionList.getControl().setVisible(show);
parent.requestLayout();
if(store.getBoolean(PreferenceConstants.SHOW_TX_DETAILS, false) != show) {
store.putBoolean(PreferenceConstants.SHOW_TX_DETAILS, show);
try {
store.flush();
} catch (BackingStoreException e) {}
}
}
}

View File

@ -1,146 +0,0 @@
package com.minres.scviewer.e4.application.parts.help;
import java.io.File;
import javax.annotation.PostConstruct;
import javax.inject.Inject;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ResourceLocator;
import org.eclipse.swt.SWT;
import org.eclipse.swt.SWTError;
import org.eclipse.swt.browser.Browser;
import org.eclipse.swt.browser.LocationListener;
import org.eclipse.swt.browser.ProgressEvent;
import org.eclipse.swt.browser.ProgressListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
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.Text;
import org.eclipse.swt.widgets.ToolBar;
import org.eclipse.swt.widgets.ToolItem;
import com.minres.scviewer.e4.application.Messages;
public class HelpBrowser {
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$
if(descr == null) {
item.setText(label);
} else {
item.setImage(descr.createImage());
item.setToolTipText(label);
}
item.setData(label);
}
@Inject
public HelpBrowser() {
}
@PostConstruct
protected Control createComposite(Composite container) {
GridLayout gridLayout = new GridLayout();
gridLayout.numColumns = 3;
container.setLayout(gridLayout);
ToolBar toolbar = new ToolBar(container, SWT.NONE);
ToolItem itemBack = new ToolItem(toolbar, SWT.PUSH);
decorateItem(itemBack, Messages.HelpDialog_0, "arrow_undo.png"); //$NON-NLS-1$
ToolItem itemForward = new ToolItem(toolbar, SWT.PUSH);
decorateItem(itemForward, Messages.HelpDialog_1, "arrow_redo.png"); //$NON-NLS-1$
ToolItem itemStop = new ToolItem(toolbar, SWT.PUSH);
decorateItem(itemStop, Messages.HelpDialog_2, "cross.png"); //$NON-NLS-1$
ToolItem itemRefresh = new ToolItem(toolbar, SWT.PUSH);
decorateItem(itemRefresh, Messages.HelpDialog_3, "arrow_refresh.png"); //$NON-NLS-1$
ToolItem itemGo = new ToolItem(toolbar, SWT.PUSH);
decorateItem(itemGo, Messages.HelpDialog_4, "accept.png"); //$NON-NLS-1$
GridData data = new GridData();
data.horizontalSpan = 3;
toolbar.setLayoutData(data);
Label labelAddress = new Label(container, SWT.NONE);
labelAddress.setText(Messages.HelpDialog_5);
final Text location = new Text(container, SWT.BORDER);
data = new GridData();
data.horizontalAlignment = GridData.FILL;
data.horizontalSpan = 2;
data.grabExcessHorizontalSpace = true;
location.setLayoutData(data);
final Browser browser;
try {
browser = new Browser(container, SWT.NONE);
data = new GridData();
// data.widthHint = 800;
// data.heightHint =600;
data.horizontalAlignment = GridData.FILL;
data.verticalAlignment = GridData.FILL;
data.horizontalSpan = 3;
data.grabExcessHorizontalSpace = true;
data.grabExcessVerticalSpace = true;
browser.setLayoutData(data);
final Label status = new Label(container, SWT.NONE);
data = new GridData(GridData.FILL_HORIZONTAL);
data.horizontalSpan = 2;
status.setLayoutData(data);
final ProgressBar progressBar = new ProgressBar(container, SWT.NONE);
data = new GridData();
data.horizontalAlignment = GridData.END;
progressBar.setLayoutData(data);
/* event handling */
Listener listener = event -> {
ToolItem item = (ToolItem) event.widget;
String string = (String) item.getData();
if (string.equals(Messages.HelpDialog_0))
browser.back();
else if (string.equals(Messages.HelpDialog_1))
browser.forward();
else if (string.equals(Messages.HelpDialog_2))
browser.stop();
else if (string.equals(Messages.HelpDialog_3))
browser.refresh();
else if (string.equals(Messages.HelpDialog_4))
browser.setUrl(location.getText());
};
browser.addProgressListener(new ProgressListener() {
@Override
public void changed(ProgressEvent event) {
if (event.total == 0) return;
int ratio = event.current * 100 / event.total;
progressBar.setSelection(ratio);
}
@Override
public void completed(ProgressEvent event) {
progressBar.setSelection(0);
}
});
browser.addStatusTextListener(event -> status.setText(event.text));
browser.addLocationListener(LocationListener.changedAdapter(event -> { if (event.top) location.setText(event.location); }));
itemBack.addListener(SWT.Selection, listener);
itemForward.addListener(SWT.Selection, listener);
itemStop.addListener(SWT.Selection, listener);
itemRefresh.addListener(SWT.Selection, listener);
itemGo.addListener(SWT.Selection, listener);
location.addListener(SWT.DefaultSelection, e -> browser.setUrl(location.getText()));
browser.setUrl(Messages.HelpDialog_6);
} catch (SWTError e) {
MessageDialog.openWarning(container.getDisplay().getActiveShell(), Messages.HelpBrowser_7,Messages.HelpBrowser_8+e.getMessage());
}
return container;
}
}

View File

@ -68,7 +68,6 @@ public class DefaultValuesInitializer extends AbstractPreferenceInitializer {
store.putBoolean(PreferenceConstants.DATABASE_RELOAD, true);
store.putBoolean(PreferenceConstants.SHOW_HOVER, true);
store.putBoolean(PreferenceConstants.SHOW_TX_DETAILS, false);
store.putInt(PreferenceConstants.TRACK_HEIGHT, 30);
for (WaveformColors c : WaveformColors.values()) {
store.put(c.name()+"_COLOR", StringConverter.asString(colors[c.ordinal()].getRGB())); //$NON-NLS-1$

View File

@ -23,12 +23,9 @@ public class PreferenceConstants {
/** The Constant DATABASE_RELOAD. */
public static final String DATABASE_RELOAD="databaseReload"; //$NON-NLS-1$
/** The Constant SHOW_HOVER. */
/** The Constant DATABASE_RELOAD. */
public static final String SHOW_HOVER="showWaveformHover"; //$NON-NLS-1$
/** The Constant SHOW_TX_DETAILS. */
public static final String SHOW_TX_DETAILS="showTxDetails"; //$NON-NLS-1$
/** The Constant TRACK_HEIGHT. */
public static final String TRACK_HEIGHT="trackHeigth"; //$NON-NLS-1$

View File

@ -39,8 +39,6 @@ public class SCViewerPreferencesPage extends FieldEditorPreferencePage {
getFieldEditorParent()));
addField(new BooleanFieldEditor(PreferenceConstants.SHOW_HOVER, Messages.SCViewerPreferencesPage_1,
getFieldEditorParent()));
addField(new BooleanFieldEditor(PreferenceConstants.SHOW_TX_DETAILS, Messages.SCViewerPreferencesPage_3,
getFieldEditorParent()));
addField(new IntegerFieldEditor(PreferenceConstants.TRACK_HEIGHT, Messages.SCViewerPreferencesPage_2,
getFieldEditorParent()));

View File

@ -19,6 +19,7 @@ import org.eclipse.jface.viewers.ITreeContentProvider;
import com.minres.scviewer.database.IHierNode;
import com.minres.scviewer.database.IWaveform;
import com.minres.scviewer.database.IWaveformDb;
/**
* The Class TxDbContentProvider providing the tree content of a database for the respective viewer.
@ -51,7 +52,9 @@ public class TxDbContentProvider implements ITreeContentProvider {
*/
@Override
public Object[] getElements(Object inputElement) {
if(inputElement instanceof IHierNode){
if(tableEntries && inputElement instanceof IWaveformDb){
return new Object[]{};
}else if(inputElement instanceof IHierNode){
// make a copy as the laoder might continue to add waveforms
ArrayList<IHierNode> nodes = new ArrayList<>(((IHierNode)inputElement).getChildNodes());
return nodes.stream().filter(n ->

View File

@ -1,7 +0,0 @@
<?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

@ -1,28 +0,0 @@
<?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

@ -1,9 +0,0 @@
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

@ -1,8 +0,0 @@
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

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

View File

@ -1,13 +0,0 @@
<!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

@ -1,13 +0,0 @@
<!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

@ -1,13 +0,0 @@
<!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

@ -1,13 +0,0 @@
<!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

@ -1,13 +0,0 @@
<!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

@ -1,13 +0,0 @@
<!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

@ -1,13 +0,0 @@
<!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

@ -1,13 +0,0 @@
<!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

@ -1,13 +0,0 @@
<!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

@ -1,13 +0,0 @@
<!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

@ -1,13 +0,0 @@
<!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

@ -1,13 +0,0 @@
<!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

@ -1,13 +0,0 @@
<!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

@ -1,13 +0,0 @@
<!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

@ -1,13 +0,0 @@
<!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

@ -1,13 +0,0 @@
<!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

@ -1,28 +0,0 @@
<?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

@ -1,20 +0,0 @@
<?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

@ -1,11 +0,0 @@
<?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

@ -1,11 +0,0 @@
<?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

@ -1,11 +0,0 @@
<?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

@ -1,11 +0,0 @@
<?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

@ -1,11 +0,0 @@
<?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>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.14.1</version>
<relativePath>../../..</relativePath>
<version>2.13.0</version>
<relativePath>../..</relativePath>
</parent>
<packaging>eclipse-plugin</packaging>
<version>1.1.0-SNAPSHOT</version>

152
pom.xml Normal file
View File

@ -0,0 +1,152 @@
<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.13.0</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.13.0</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>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.14.1</version>
<relativePath>../../..</relativePath>
<version>2.13.0</version>
<relativePath>../..</relativePath>
</parent>
<artifactId>com.minres.scviewer.e4.product</artifactId>
<version>2.14.1</version>
<version>2.13.0</version>
<packaging>eclipse-repository</packaging>
<groupId>com.minres.scviewer</groupId>
<build>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?pde version="3.5"?>
<product name="SCViewer" uid="product" id="com.minres.scviewer.e4.application.product" application="org.eclipse.e4.ui.workbench.swt.E4Application" version="2.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.13.0" useFeatures="true" includeLaunchers="true">
<configIni use="default">
</configIni>
@ -62,7 +62,6 @@
<feature id="com.minres.scviewer.database.feature" installMode="root"/>
<feature id="org.eclipse.e4.rcp" installMode="root"/>
<feature id="com.opcoach.e4.preferences.feature" installMode="root"/>
<feature id="org.eclipse.help" installMode="root"/>
</features>
<configurations>

View File

@ -12,8 +12,8 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.14.1</version>
<relativePath>../../..</relativePath>
<version>2.13.0</version>
<relativePath>../..</relativePath>
</parent>
</project>

View File

@ -7,8 +7,8 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.14.1</version>
<relativePath>../../..</relativePath>
<version>2.13.0</version>
<relativePath>../..</relativePath>
</parent>
<build>
<plugins>
@ -73,4 +73,4 @@
</profile>
</profiles>
</project>
</project>

View File

@ -10,4 +10,3 @@
/hw_cfg_2_nc.vcd
/test_05.txlog
/test_05.vcd
/tgc/

View File

@ -0,0 +1 @@
MANIFEST-000045

View File

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

View File

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