Restructured plugins
This commit is contained in:
parent
83fd7877f2
commit
7d3c37e989
Binary file not shown.
|
@ -3,6 +3,5 @@
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
|
||||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||||
<classpathentry kind="src" path="src/"/>
|
<classpathentry kind="src" path="src/"/>
|
||||||
<classpathentry exported="true" kind="lib" path="swing2swt.jar"/>
|
|
||||||
<classpathentry kind="output" path="target/classes"/>
|
<classpathentry kind="output" path="target/classes"/>
|
||||||
</classpath>
|
</classpath>
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<projectDescription>
|
<projectDescription>
|
||||||
<name>com.minres.scviewer.database.swt</name>
|
<name>com.minres.scviewer.database.ui.swt</name>
|
||||||
<comment></comment>
|
<comment></comment>
|
||||||
<projects>
|
<projects>
|
||||||
</projects>
|
</projects>
|
|
@ -1,7 +1,7 @@
|
||||||
Manifest-Version: 1.0
|
Manifest-Version: 1.0
|
||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: SWT widget
|
Bundle-Name: SWT widget
|
||||||
Bundle-SymbolicName: com.minres.scviewer.database.swt
|
Bundle-SymbolicName: com.minres.scviewer.database.ui.swt
|
||||||
Bundle-Version: 1.0.0.qualifier
|
Bundle-Version: 1.0.0.qualifier
|
||||||
Bundle-Vendor: MINRES Technologies GmbH
|
Bundle-Vendor: MINRES Technologies GmbH
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
||||||
|
@ -9,7 +9,8 @@ Require-Bundle: org.eclipse.swt;bundle-version="3.103.1",
|
||||||
com.minres.scviewer.database;bundle-version="1.0.0",
|
com.minres.scviewer.database;bundle-version="1.0.0",
|
||||||
com.google.guava;bundle-version="15.0.0",
|
com.google.guava;bundle-version="15.0.0",
|
||||||
org.eclipse.jface,
|
org.eclipse.jface,
|
||||||
org.eclipse.equinox.registry
|
org.eclipse.equinox.registry,
|
||||||
|
com.minres.scviewer.database.ui
|
||||||
Export-Package: com.minres.scviewer.database.swt
|
Export-Package: com.minres.scviewer.database.swt
|
||||||
Bundle-ClassPath: .,
|
Bundle-ClassPath: .,
|
||||||
swing2swt.jar
|
swing2swt.jar
|
|
@ -9,7 +9,6 @@
|
||||||
# MINRES Technologies GmbH - initial API and implementation
|
# MINRES Technologies GmbH - initial API and implementation
|
||||||
###############################################################################
|
###############################################################################
|
||||||
bin.includes = META-INF/,\
|
bin.includes = META-INF/,\
|
||||||
.,\
|
.
|
||||||
swing2swt.jar
|
|
||||||
source.. = src/
|
source.. = src/
|
||||||
jars.compile.order = .
|
jars.compile.order = .
|
|
@ -0,0 +1,11 @@
|
||||||
|
<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>
|
||||||
|
<artifactId>com.minres.scviewer.database.ui.swt</artifactId>
|
||||||
|
<packaging>eclipse-plugin</packaging>
|
||||||
|
<parent>
|
||||||
|
<groupId>com.minres.scviewer</groupId>
|
||||||
|
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||||
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
|
<relativePath>../com.minres.scviewer.parent</relativePath>
|
||||||
|
</parent>
|
||||||
|
</project>
|
|
@ -25,7 +25,6 @@ import org.eclipse.core.runtime.ListenerList;
|
||||||
import org.eclipse.jface.util.LocalSelectionTransfer;
|
import org.eclipse.jface.util.LocalSelectionTransfer;
|
||||||
import org.eclipse.jface.viewers.ISelection;
|
import org.eclipse.jface.viewers.ISelection;
|
||||||
import org.eclipse.jface.viewers.ISelectionChangedListener;
|
import org.eclipse.jface.viewers.ISelectionChangedListener;
|
||||||
import org.eclipse.jface.viewers.ISelectionProvider;
|
|
||||||
import org.eclipse.jface.viewers.IStructuredSelection;
|
import org.eclipse.jface.viewers.IStructuredSelection;
|
||||||
import org.eclipse.jface.viewers.SelectionChangedEvent;
|
import org.eclipse.jface.viewers.SelectionChangedEvent;
|
||||||
import org.eclipse.jface.viewers.StructuredSelection;
|
import org.eclipse.jface.viewers.StructuredSelection;
|
||||||
|
@ -84,19 +83,15 @@ import com.minres.scviewer.database.swt.internal.SignalPainter;
|
||||||
import com.minres.scviewer.database.swt.internal.StreamPainter;
|
import com.minres.scviewer.database.swt.internal.StreamPainter;
|
||||||
import com.minres.scviewer.database.swt.internal.TrackPainter;
|
import com.minres.scviewer.database.swt.internal.TrackPainter;
|
||||||
import com.minres.scviewer.database.swt.internal.WaveformCanvas;
|
import com.minres.scviewer.database.swt.internal.WaveformCanvas;
|
||||||
|
import com.minres.scviewer.database.ui.GotoDirection;
|
||||||
|
import com.minres.scviewer.database.ui.IWaveformPanel;
|
||||||
|
|
||||||
import swing2swt.layout.BorderLayout;
|
public class TxDisplay implements IWaveformPanel {
|
||||||
|
|
||||||
public class TxDisplay implements PropertyChangeListener, ISelectionProvider {
|
|
||||||
|
|
||||||
private ListenerList selectionChangedListeners = new ListenerList();
|
private ListenerList selectionChangedListeners = new ListenerList();
|
||||||
|
|
||||||
private PropertyChangeSupport pcs;
|
private PropertyChangeSupport pcs;
|
||||||
|
|
||||||
public static final String CURSOR_PROPERTY = "cursor_time";
|
|
||||||
|
|
||||||
public static final String MARKER_PROPERTY = "marker_time";
|
|
||||||
|
|
||||||
private static final String SELECTION = "selection";
|
private static final String SELECTION = "selection";
|
||||||
|
|
||||||
private ITx currentTxSelection;
|
private ITx currentTxSelection;
|
||||||
|
@ -111,7 +106,7 @@ public class TxDisplay implements PropertyChangeListener, ISelectionProvider {
|
||||||
|
|
||||||
private Canvas valueList;
|
private Canvas valueList;
|
||||||
|
|
||||||
WaveformCanvas waveformList;
|
WaveformCanvas waveformCanvas;
|
||||||
|
|
||||||
private Composite top;
|
private Composite top;
|
||||||
|
|
||||||
|
@ -121,8 +116,6 @@ public class TxDisplay implements PropertyChangeListener, ISelectionProvider {
|
||||||
|
|
||||||
int selectedMarker = 0;
|
int selectedMarker = 0;
|
||||||
|
|
||||||
private Composite trackPane;
|
|
||||||
|
|
||||||
private int trackVerticalHeight;
|
private int trackVerticalHeight;
|
||||||
|
|
||||||
private TreeMap<Integer, IWaveform<? extends IWaveformEvent>> trackVerticalOffset;
|
private TreeMap<Integer, IWaveform<? extends IWaveformEvent>> trackVerticalOffset;
|
||||||
|
@ -154,9 +147,9 @@ public class TxDisplay implements PropertyChangeListener, ISelectionProvider {
|
||||||
public void mouseDown(MouseEvent e) {
|
public void mouseDown(MouseEvent e) {
|
||||||
start=new Point(e.x, e.y);
|
start=new Point(e.x, e.y);
|
||||||
if (e.button == 1) {
|
if (e.button == 1) {
|
||||||
initialSelected = waveformList.getClicked(start);
|
initialSelected = waveformCanvas.getClicked(start);
|
||||||
} else if (e.button == 3) {
|
} else if (e.button == 3) {
|
||||||
List<Object> hitted = waveformList.getClicked(start);
|
List<Object> hitted = waveformCanvas.getClicked(start);
|
||||||
for(Object entry:hitted){
|
for(Object entry:hitted){
|
||||||
if(entry instanceof IWaveform<?>){
|
if(entry instanceof IWaveform<?>){
|
||||||
setSelection(new StructuredSelection(entry));
|
setSelection(new StructuredSelection(entry));
|
||||||
|
@ -182,7 +175,7 @@ public class TxDisplay implements PropertyChangeListener, ISelectionProvider {
|
||||||
e.widget.getDisplay().asyncExec(new Runnable() {
|
e.widget.getDisplay().asyncExec(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
waveformList.redraw();
|
waveformCanvas.redraw();
|
||||||
updateValueList();
|
updateValueList();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -192,7 +185,7 @@ public class TxDisplay implements PropertyChangeListener, ISelectionProvider {
|
||||||
e.widget.getDisplay().asyncExec(new Runnable() {
|
e.widget.getDisplay().asyncExec(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
waveformList.redraw();
|
waveformCanvas.redraw();
|
||||||
updateValueList();
|
updateValueList();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -200,9 +193,9 @@ public class TxDisplay implements PropertyChangeListener, ISelectionProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected long snapOffsetToEvent(MouseEvent e) {
|
protected long snapOffsetToEvent(MouseEvent e) {
|
||||||
long time= waveformList.getTimeForOffset(e.x);
|
long time= waveformCanvas.getTimeForOffset(e.x);
|
||||||
long scaling=5*waveformList.getScaleFactor();
|
long scaling=5*waveformCanvas.getScaleFactor();
|
||||||
for(Object o:waveformList.getClicked(start)){
|
for(Object o:waveformCanvas.getClicked(start)){
|
||||||
Entry<Long, ?> floorEntry=null, ceilEntry=null;
|
Entry<Long, ?> floorEntry=null, ceilEntry=null;
|
||||||
if(o instanceof ISignal<?>){
|
if(o instanceof ISignal<?>){
|
||||||
NavigableMap<Long, ?> map = ((ISignal<?>)o).getEvents();
|
NavigableMap<Long, ?> map = ((ISignal<?>)o).getEvents();
|
||||||
|
@ -256,11 +249,7 @@ public class TxDisplay implements PropertyChangeListener, ISelectionProvider {
|
||||||
Composite composite = new Composite(topSash, SWT.NONE);
|
Composite composite = new Composite(topSash, SWT.NONE);
|
||||||
composite.setLayout(new FillLayout(SWT.HORIZONTAL));
|
composite.setLayout(new FillLayout(SWT.HORIZONTAL));
|
||||||
|
|
||||||
trackPane = new Composite(topSash, SWT.NONE);
|
waveformCanvas = new WaveformCanvas(topSash, SWT.NONE);
|
||||||
trackPane.setLayout(new BorderLayout(0, 0));
|
|
||||||
|
|
||||||
waveformList = new WaveformCanvas(trackPane, SWT.NONE);
|
|
||||||
waveformList.setLayoutData(BorderLayout.CENTER);
|
|
||||||
|
|
||||||
SashForm leftSash = new SashForm(composite, SWT.SMOOTH);
|
SashForm leftSash = new SashForm(composite, SWT.SMOOTH);
|
||||||
leftSash.setBackground(leftSash.getDisplay().getSystemColor(SWT.COLOR_GRAY));
|
leftSash.setBackground(leftSash.getDisplay().getSystemColor(SWT.COLOR_GRAY));
|
||||||
|
@ -330,39 +319,39 @@ public class TxDisplay implements PropertyChangeListener, ISelectionProvider {
|
||||||
valueList.addMouseListener(nameValueMouseListener);
|
valueList.addMouseListener(nameValueMouseListener);
|
||||||
valueListScrolled.setContent(valueList);
|
valueListScrolled.setContent(valueList);
|
||||||
|
|
||||||
waveformList.setStreams(streams);
|
waveformCanvas.setStreams(streams);
|
||||||
// order is important: it is bottom to top
|
// order is important: it is bottom to top
|
||||||
waveformList.addPainter(new TrackPainter(waveformList));
|
waveformCanvas.addPainter(new TrackPainter(waveformCanvas));
|
||||||
waveformList.addPainter(new RulerPainter(
|
waveformCanvas.addPainter(new RulerPainter(
|
||||||
waveformList, waveformList.getDisplay().getSystemColor(SWT.COLOR_BLACK), waveformList.getDisplay().getSystemColor(SWT.COLOR_WHITE)));
|
waveformCanvas, waveformCanvas.getDisplay().getSystemColor(SWT.COLOR_BLACK), waveformCanvas.getDisplay().getSystemColor(SWT.COLOR_WHITE)));
|
||||||
CursorPainter cp = new CursorPainter(waveformList, waveformList.getScaleFactor() * 10, cursorPainters.size()-1);
|
CursorPainter cp = new CursorPainter(waveformCanvas, waveformCanvas.getScaleFactor() * 10, cursorPainters.size()-1);
|
||||||
waveformList.addPainter(cp);
|
waveformCanvas.addPainter(cp);
|
||||||
cursorPainters.add(cp);
|
cursorPainters.add(cp);
|
||||||
CursorPainter marker = new CursorPainter(waveformList, waveformList.getScaleFactor() * 100, cursorPainters.size()-1);
|
CursorPainter marker = new CursorPainter(waveformCanvas, waveformCanvas.getScaleFactor() * 100, cursorPainters.size()-1);
|
||||||
waveformList.addPainter(marker);
|
waveformCanvas.addPainter(marker);
|
||||||
cursorPainters.add(marker);
|
cursorPainters.add(marker);
|
||||||
waveformList.setMaxTime(1);
|
waveformCanvas.setMaxTime(1);
|
||||||
waveformList.addMouseListener(waveformMouseListener);
|
waveformCanvas.addMouseListener(waveformMouseListener);
|
||||||
|
|
||||||
nameListScrolled.getVerticalBar().addSelectionListener(new SelectionAdapter() {
|
nameListScrolled.getVerticalBar().addSelectionListener(new SelectionAdapter() {
|
||||||
public void widgetSelected(SelectionEvent e) {
|
public void widgetSelected(SelectionEvent e) {
|
||||||
int y = ((ScrollBar) e.widget).getSelection();
|
int y = ((ScrollBar) e.widget).getSelection();
|
||||||
Point v = valueListScrolled.getOrigin();
|
Point v = valueListScrolled.getOrigin();
|
||||||
valueListScrolled.setOrigin(v.x, y);
|
valueListScrolled.setOrigin(v.x, y);
|
||||||
Point t = waveformList.getOrigin();
|
Point t = waveformCanvas.getOrigin();
|
||||||
waveformList.setOrigin(t.x, -y);
|
waveformCanvas.setOrigin(t.x, -y);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
valueListScrolled.getVerticalBar().addSelectionListener(new SelectionAdapter() {
|
valueListScrolled.getVerticalBar().addSelectionListener(new SelectionAdapter() {
|
||||||
public void widgetSelected(SelectionEvent e) {
|
public void widgetSelected(SelectionEvent e) {
|
||||||
int y = ((ScrollBar) e.widget).getSelection();
|
int y = ((ScrollBar) e.widget).getSelection();
|
||||||
nameListScrolled.setOrigin(nameListScrolled.getOrigin().x, y);
|
nameListScrolled.setOrigin(nameListScrolled.getOrigin().x, y);
|
||||||
waveformList.setOrigin(waveformList.getOrigin().x, -y);
|
waveformCanvas.setOrigin(waveformCanvas.getOrigin().x, -y);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
waveformList.addSelectionListener(new SelectionAdapter() {
|
waveformCanvas.addSelectionListener(new SelectionAdapter() {
|
||||||
public void widgetSelected(SelectionEvent e) {
|
public void widgetSelected(SelectionEvent e) {
|
||||||
int y = waveformList.getVerticalBar().getSelection();
|
int y = waveformCanvas.getVerticalBar().getSelection();
|
||||||
nameListScrolled.setOrigin(nameListScrolled.getOrigin().x, y);
|
nameListScrolled.setOrigin(nameListScrolled.getOrigin().x, y);
|
||||||
valueListScrolled.setOrigin(valueListScrolled.getOrigin().x, y);
|
valueListScrolled.setOrigin(valueListScrolled.getOrigin().x, y);
|
||||||
}
|
}
|
||||||
|
@ -374,8 +363,8 @@ public class TxDisplay implements PropertyChangeListener, ISelectionProvider {
|
||||||
createStreamDragSource(valueList);
|
createStreamDragSource(valueList);
|
||||||
createStreamDropTarget(nameList);
|
createStreamDropTarget(nameList);
|
||||||
createStreamDropTarget(valueList);
|
createStreamDropTarget(valueList);
|
||||||
createWaveformDragSource(waveformList);
|
createWaveformDragSource(waveformCanvas);
|
||||||
createWaveformDropTarget(waveformList);
|
createWaveformDropTarget(waveformCanvas);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Composite createTextPane(SashForm leftSash, String text) {
|
private Composite createTextPane(SashForm leftSash, String text) {
|
||||||
|
@ -389,7 +378,7 @@ public class TxDisplay implements PropertyChangeListener, ISelectionProvider {
|
||||||
|
|
||||||
CLabel nameLabel = new CLabel(namePane, SWT.NONE);
|
CLabel nameLabel = new CLabel(namePane, SWT.NONE);
|
||||||
GridData gd_nameLabel = new GridData(SWT.CENTER, SWT.CENTER, true, false, 1, 1);
|
GridData gd_nameLabel = new GridData(SWT.CENTER, SWT.CENTER, true, false, 1, 1);
|
||||||
gd_nameLabel.heightHint = waveformList.getRulerHeight() - 2;
|
gd_nameLabel.heightHint = waveformCanvas.getRulerHeight() - 2;
|
||||||
nameLabel.setLayoutData(gd_nameLabel);
|
nameLabel.setLayoutData(gd_nameLabel);
|
||||||
nameLabel.setText(text);
|
nameLabel.setText(text);
|
||||||
|
|
||||||
|
@ -417,24 +406,24 @@ public class TxDisplay implements PropertyChangeListener, ISelectionProvider {
|
||||||
IWaveformPainter painter = null;
|
IWaveformPainter painter = null;
|
||||||
trackVerticalOffset.clear();
|
trackVerticalOffset.clear();
|
||||||
actualValues.clear();
|
actualValues.clear();
|
||||||
waveformList.clearAllWavefromPainter();
|
waveformCanvas.clearAllWavefromPainter();
|
||||||
boolean even = true;
|
boolean even = true;
|
||||||
boolean clearSelection = true;
|
boolean clearSelection = true;
|
||||||
TextLayout tl = new TextLayout(waveformList.getDisplay());
|
TextLayout tl = new TextLayout(waveformCanvas.getDisplay());
|
||||||
tl.setFont(nameFontB);
|
tl.setFont(nameFontB);
|
||||||
for (IWaveform<? extends IWaveformEvent> waveform : streams) {
|
for (IWaveform<? extends IWaveformEvent> waveform : streams) {
|
||||||
int height = waveformList.getTrackHeight();
|
int height = waveformCanvas.getTrackHeight();
|
||||||
clearSelection &= (waveform != currentWaveformSelection);
|
clearSelection &= (waveform != currentWaveformSelection);
|
||||||
if (waveform instanceof ITxStream<?>) {
|
if (waveform instanceof ITxStream<?>) {
|
||||||
ITxStream<? extends ITxEvent> stream = (ITxStream<? extends ITxEvent>) waveform;
|
ITxStream<? extends ITxEvent> stream = (ITxStream<? extends ITxEvent>) waveform;
|
||||||
height *= stream.getMaxConcurrency();
|
height *= stream.getMaxConcurrency();
|
||||||
painter = new StreamPainter(waveformList, even, height, (ITxStream<? extends ITxEvent>) waveform);
|
painter = new StreamPainter(waveformCanvas, even, height, (ITxStream<? extends ITxEvent>) waveform);
|
||||||
actualValues.put(stream, "");
|
actualValues.put(stream, "");
|
||||||
} else if (waveform instanceof ISignal<?>) {
|
} else if (waveform instanceof ISignal<?>) {
|
||||||
painter = new SignalPainter(waveformList, even, height, (ISignal<?>) waveform);
|
painter = new SignalPainter(waveformCanvas, even, height, (ISignal<?>) waveform);
|
||||||
actualValues.put(waveform, "---");
|
actualValues.put(waveform, "---");
|
||||||
}
|
}
|
||||||
waveformList.addWavefromPainter(trackVerticalHeight, painter);
|
waveformCanvas.addWavefromPainter(trackVerticalHeight, painter);
|
||||||
trackVerticalOffset.put(trackVerticalHeight, waveform);
|
trackVerticalOffset.put(trackVerticalHeight, waveform);
|
||||||
tl.setText(waveform.getFullName());
|
tl.setText(waveform.getFullName());
|
||||||
nameMaxWidth = Math.max(nameMaxWidth, tl.getBounds().width);
|
nameMaxWidth = Math.max(nameMaxWidth, tl.getBounds().width);
|
||||||
|
@ -447,11 +436,11 @@ public class TxDisplay implements PropertyChangeListener, ISelectionProvider {
|
||||||
valueListScrolled.setMinSize(calculateValueWidth(), trackVerticalHeight);
|
valueListScrolled.setMinSize(calculateValueWidth(), trackVerticalHeight);
|
||||||
nameList.redraw();
|
nameList.redraw();
|
||||||
updateValueList();
|
updateValueList();
|
||||||
waveformList.redraw();
|
waveformCanvas.redraw();
|
||||||
top.layout(new Control[] { valueList, nameList, waveformList });
|
top.layout(new Control[] { valueList, nameList, waveformCanvas });
|
||||||
if (trackVerticalOffset.isEmpty() || previousHeight > trackVerticalOffset.lastKey()) {
|
if (trackVerticalOffset.isEmpty() || previousHeight > trackVerticalOffset.lastKey()) {
|
||||||
Point o = waveformList.getOrigin();
|
Point o = waveformCanvas.getOrigin();
|
||||||
waveformList.setOrigin(o.x, o.y - (previousHeight - trackVerticalOffset.lastKey()));
|
waveformCanvas.setOrigin(o.x, o.y - (previousHeight - trackVerticalOffset.lastKey()));
|
||||||
}
|
}
|
||||||
if(clearSelection) setSelection(new StructuredSelection());
|
if(clearSelection) setSelection(new StructuredSelection());
|
||||||
/* System.out.println("updateTracklist() state:");
|
/* System.out.println("updateTracklist() state:");
|
||||||
|
@ -461,7 +450,7 @@ public class TxDisplay implements PropertyChangeListener, ISelectionProvider {
|
||||||
*/ }
|
*/ }
|
||||||
|
|
||||||
private int calculateValueWidth() {
|
private int calculateValueWidth() {
|
||||||
TextLayout tl = new TextLayout(waveformList.getDisplay());
|
TextLayout tl = new TextLayout(waveformCanvas.getDisplay());
|
||||||
tl.setFont(nameFontB);
|
tl.setFont(nameFontB);
|
||||||
int valueMaxWidth = 0;
|
int valueMaxWidth = 0;
|
||||||
for (String v : actualValues.values()) {
|
for (String v : actualValues.values()) {
|
||||||
|
@ -518,32 +507,57 @@ public class TxDisplay implements PropertyChangeListener, ISelectionProvider {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see com.minres.scviewer.database.swt.IWaveformPanel#addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener)
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void addSelectionChangedListener(ISelectionChangedListener listener) {
|
public void addSelectionChangedListener(ISelectionChangedListener listener) {
|
||||||
selectionChangedListeners.add(listener);
|
selectionChangedListeners.add(listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see com.minres.scviewer.database.swt.IWaveformPanel#removeSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener)
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void removeSelectionChangedListener(ISelectionChangedListener listener) {
|
public void removeSelectionChangedListener(ISelectionChangedListener listener) {
|
||||||
selectionChangedListeners.remove(listener);
|
selectionChangedListeners.remove(listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see com.minres.scviewer.database.swt.IWaveformPanel#getControl()
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
public Control getControl() {
|
public Control getControl() {
|
||||||
return top;
|
return top;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see com.minres.scviewer.database.swt.IWaveformPanel#getNameControl()
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
public Control getNameControl() {
|
public Control getNameControl() {
|
||||||
return nameList;
|
return nameList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see com.minres.scviewer.database.swt.IWaveformPanel#getValueControl()
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
public Control getValueControl() {
|
public Control getValueControl() {
|
||||||
return valueList;
|
return valueList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see com.minres.scviewer.database.swt.IWaveformPanel#getWaveformControl()
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
public Control getWaveformControl() {
|
public Control getWaveformControl() {
|
||||||
return waveformList;
|
return waveformCanvas;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see com.minres.scviewer.database.swt.IWaveformPanel#getSelection()
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public ISelection getSelection() {
|
public ISelection getSelection() {
|
||||||
if (currentTxSelection != null)
|
if (currentTxSelection != null)
|
||||||
|
@ -554,11 +568,18 @@ public class TxDisplay implements PropertyChangeListener, ISelectionProvider {
|
||||||
return new StructuredSelection();
|
return new StructuredSelection();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see com.minres.scviewer.database.swt.IWaveformPanel#setSelection(org.eclipse.jface.viewers.ISelection)
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void setSelection(ISelection selection) {
|
public void setSelection(ISelection selection) {
|
||||||
setSelection(selection, false);
|
setSelection(selection, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see com.minres.scviewer.database.swt.IWaveformPanel#setSelection(org.eclipse.jface.viewers.ISelection, boolean)
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public void setSelection(ISelection selection, boolean addIfNeeded) {
|
public void setSelection(ISelection selection, boolean addIfNeeded) {
|
||||||
boolean selectionChanged = false;
|
boolean selectionChanged = false;
|
||||||
|
@ -595,7 +616,7 @@ public class TxDisplay implements PropertyChangeListener, ISelectionProvider {
|
||||||
currentWaveformSelection = null;
|
currentWaveformSelection = null;
|
||||||
}
|
}
|
||||||
if (selectionChanged) {
|
if (selectionChanged) {
|
||||||
waveformList.setSelected(currentTxSelection, currentWaveformSelection);
|
waveformCanvas.setSelected(currentTxSelection, currentWaveformSelection);
|
||||||
nameList.setData(SELECTION, currentWaveformSelection);
|
nameList.setData(SELECTION, currentWaveformSelection);
|
||||||
valueList.redraw();
|
valueList.redraw();
|
||||||
nameList.redraw();
|
nameList.redraw();
|
||||||
|
@ -606,6 +627,10 @@ public class TxDisplay implements PropertyChangeListener, ISelectionProvider {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see com.minres.scviewer.database.swt.IWaveformPanel#moveSelection(com.minres.scviewer.database.swt.GotoDirection)
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public void moveSelection(GotoDirection direction) {
|
public void moveSelection(GotoDirection direction) {
|
||||||
if (currentWaveformSelection instanceof ITxStream<?>) {
|
if (currentWaveformSelection instanceof ITxStream<?>) {
|
||||||
|
@ -669,6 +694,10 @@ public class TxDisplay implements PropertyChangeListener, ISelectionProvider {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see com.minres.scviewer.database.swt.IWaveformPanel#moveCursor(com.minres.scviewer.database.swt.GotoDirection)
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
public void moveCursor(GotoDirection direction) {
|
public void moveCursor(GotoDirection direction) {
|
||||||
long time = getCursorTime();
|
long time = getCursorTime();
|
||||||
NavigableMap<Long, ?> map=null;
|
NavigableMap<Long, ?> map=null;
|
||||||
|
@ -682,17 +711,25 @@ public class TxDisplay implements PropertyChangeListener, ISelectionProvider {
|
||||||
if(entry!=null) {
|
if(entry!=null) {
|
||||||
time=entry.getKey();
|
time=entry.getKey();
|
||||||
setCursorTime(time);
|
setCursorTime(time);
|
||||||
waveformList.reveal(time);
|
waveformCanvas.reveal(time);
|
||||||
waveformList.redraw();
|
waveformCanvas.redraw();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see com.minres.scviewer.database.swt.IWaveformPanel#getStreamList()
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
public List<IWaveform<? extends IWaveformEvent>> getStreamList() {
|
public List<IWaveform<? extends IWaveformEvent>> getStreamList() {
|
||||||
return streams;
|
return streams;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see com.minres.scviewer.database.swt.IWaveformPanel#moveSelected(int)
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
public void moveSelected(int i) {
|
public void moveSelected(int i) {
|
||||||
if(currentWaveformSelection!=null){
|
if(currentWaveformSelection!=null){
|
||||||
ITx selectedTx=currentTxSelection;
|
ITx selectedTx=currentTxSelection;
|
||||||
|
@ -719,7 +756,7 @@ public class TxDisplay implements PropertyChangeListener, ISelectionProvider {
|
||||||
if (firstKey == null)
|
if (firstKey == null)
|
||||||
firstKey = trackVerticalOffset.firstKey();
|
firstKey = trackVerticalOffset.firstKey();
|
||||||
Integer lastKey = trackVerticalOffset.floorKey(rect.y + rect.height);
|
Integer lastKey = trackVerticalOffset.floorKey(rect.y + rect.height);
|
||||||
Rectangle subArea = new Rectangle(rect.x, 0, rect.width, waveformList.getTrackHeight());
|
Rectangle subArea = new Rectangle(rect.x, 0, rect.width, waveformCanvas.getTrackHeight());
|
||||||
if (lastKey == firstKey) {
|
if (lastKey == firstKey) {
|
||||||
IWaveform<? extends IWaveformEvent> w = trackVerticalOffset.get(firstKey);
|
IWaveform<? extends IWaveformEvent> w = trackVerticalOffset.get(firstKey);
|
||||||
if (w instanceof ITxStream<?>)
|
if (w instanceof ITxStream<?>)
|
||||||
|
@ -729,7 +766,7 @@ public class TxDisplay implements PropertyChangeListener, ISelectionProvider {
|
||||||
for (Entry<Integer, IWaveform<? extends IWaveformEvent>> entry : trackVerticalOffset.subMap(firstKey, true, lastKey, true)
|
for (Entry<Integer, IWaveform<? extends IWaveformEvent>> entry : trackVerticalOffset.subMap(firstKey, true, lastKey, true)
|
||||||
.entrySet()) {
|
.entrySet()) {
|
||||||
IWaveform<? extends IWaveformEvent> w = entry.getValue();
|
IWaveform<? extends IWaveformEvent> w = entry.getValue();
|
||||||
subArea.height = waveformList.getTrackHeight();
|
subArea.height = waveformCanvas.getTrackHeight();
|
||||||
if (w instanceof ITxStream<?>)
|
if (w instanceof ITxStream<?>)
|
||||||
subArea.height *= ((ITxStream<?>) w).getMaxConcurrency();
|
subArea.height *= ((ITxStream<?>) w).getMaxConcurrency();
|
||||||
drawTextFormat(gc, subArea, entry.getKey(), w.getFullName(), w.equals(wave));
|
drawTextFormat(gc, subArea, entry.getKey(), w.getFullName(), w.equals(wave));
|
||||||
|
@ -746,7 +783,7 @@ public class TxDisplay implements PropertyChangeListener, ISelectionProvider {
|
||||||
if (firstKey == null)
|
if (firstKey == null)
|
||||||
firstKey = trackVerticalOffset.firstKey();
|
firstKey = trackVerticalOffset.firstKey();
|
||||||
Integer lastKey = trackVerticalOffset.floorKey(rect.y + rect.height);
|
Integer lastKey = trackVerticalOffset.floorKey(rect.y + rect.height);
|
||||||
Rectangle subArea = new Rectangle(rect.x, 0, rect.width, waveformList.getTrackHeight());
|
Rectangle subArea = new Rectangle(rect.x, 0, rect.width, waveformCanvas.getTrackHeight());
|
||||||
if (lastKey == firstKey) {
|
if (lastKey == firstKey) {
|
||||||
IWaveform<? extends IWaveformEvent> w = trackVerticalOffset.get(firstKey);
|
IWaveform<? extends IWaveformEvent> w = trackVerticalOffset.get(firstKey);
|
||||||
if (w instanceof ITxStream<?>)
|
if (w instanceof ITxStream<?>)
|
||||||
|
@ -756,7 +793,7 @@ public class TxDisplay implements PropertyChangeListener, ISelectionProvider {
|
||||||
for (Entry<Integer, IWaveform<? extends IWaveformEvent>> entry : trackVerticalOffset.subMap(firstKey, true, lastKey, true)
|
for (Entry<Integer, IWaveform<? extends IWaveformEvent>> entry : trackVerticalOffset.subMap(firstKey, true, lastKey, true)
|
||||||
.entrySet()) {
|
.entrySet()) {
|
||||||
IWaveform<? extends IWaveformEvent> w = entry.getValue();
|
IWaveform<? extends IWaveformEvent> w = entry.getValue();
|
||||||
subArea.height = waveformList.getTrackHeight();
|
subArea.height = waveformCanvas.getTrackHeight();
|
||||||
if (w instanceof ITxStream<?>)
|
if (w instanceof ITxStream<?>)
|
||||||
subArea.height *= ((ITxStream<?>) w).getMaxConcurrency();
|
subArea.height *= ((ITxStream<?>) w).getMaxConcurrency();
|
||||||
drawValue(gc, subArea, entry.getKey(), actualValues.get(w), w.equals(wave));
|
drawValue(gc, subArea, entry.getKey(), actualValues.get(w), w.equals(wave));
|
||||||
|
@ -767,10 +804,10 @@ public class TxDisplay implements PropertyChangeListener, ISelectionProvider {
|
||||||
|
|
||||||
protected void drawValue(GC gc, Rectangle subArea, Integer yOffset, String value, boolean highlite) {
|
protected void drawValue(GC gc, Rectangle subArea, Integer yOffset, String value, boolean highlite) {
|
||||||
int beginIndex=0;
|
int beginIndex=0;
|
||||||
for(int offset=0; offset<subArea.height; offset+=waveformList.getTrackHeight()){
|
for(int offset=0; offset<subArea.height; offset+=waveformCanvas.getTrackHeight()){
|
||||||
int endIndex=value.indexOf('|', beginIndex);
|
int endIndex=value.indexOf('|', beginIndex);
|
||||||
String str = endIndex<0?value.substring(beginIndex):value.substring(beginIndex, endIndex);
|
String str = endIndex<0?value.substring(beginIndex):value.substring(beginIndex, endIndex);
|
||||||
drawTextFormat(gc, new Rectangle(subArea.x, subArea.y, subArea.width, waveformList.getTrackHeight()), yOffset+offset, str, highlite);
|
drawTextFormat(gc, new Rectangle(subArea.x, subArea.y, subArea.width, waveformCanvas.getTrackHeight()), yOffset+offset, str, highlite);
|
||||||
beginIndex=endIndex<0?beginIndex:endIndex+1;
|
beginIndex=endIndex<0?beginIndex:endIndex+1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -787,32 +824,56 @@ public class TxDisplay implements PropertyChangeListener, ISelectionProvider {
|
||||||
gc.setForeground(SWTResourceManager.getColor(SWT.COLOR_LIST_FOREGROUND));
|
gc.setForeground(SWTResourceManager.getColor(SWT.COLOR_LIST_FOREGROUND));
|
||||||
gc.setFont(nameFont);
|
gc.setFont(nameFont);
|
||||||
}
|
}
|
||||||
gc.drawText(value, subArea.x + 5, subArea.y + yOffset + (waveformList.getTrackHeight() - size.y) / 2, true);
|
gc.drawText(value, subArea.x + 5, subArea.y + yOffset + (waveformCanvas.getTrackHeight() - size.y) / 2, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see com.minres.scviewer.database.swt.IWaveformPanel#getMaxTime()
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
public long getMaxTime() {
|
public long getMaxTime() {
|
||||||
return waveformList.getMaxTime();
|
return waveformCanvas.getMaxTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see com.minres.scviewer.database.swt.IWaveformPanel#setMaxTime(long)
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
public void setMaxTime(long maxTime) {
|
public void setMaxTime(long maxTime) {
|
||||||
this.waveformList.setMaxTime(maxTime);
|
this.waveformCanvas.setMaxTime(maxTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see com.minres.scviewer.database.swt.IWaveformPanel#setZoomLevel(int)
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
public void setZoomLevel(int scale) {
|
public void setZoomLevel(int scale) {
|
||||||
waveformList.setZoomLevel(scale);
|
waveformCanvas.setZoomLevel(scale);
|
||||||
waveformList.reveal(getCursorTime());
|
waveformCanvas.reveal(getCursorTime());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see com.minres.scviewer.database.swt.IWaveformPanel#getZoomLevel()
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
public int getZoomLevel() {
|
public int getZoomLevel() {
|
||||||
return waveformList.getZoomLevel();
|
return waveformCanvas.getZoomLevel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see com.minres.scviewer.database.swt.IWaveformPanel#setCursorTime(long)
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
public void setCursorTime(long time){
|
public void setCursorTime(long time){
|
||||||
final Long oldVal= cursorPainters.get(0).getTime();
|
final Long oldVal= cursorPainters.get(0).getTime();
|
||||||
cursorPainters.get(0).setTime(time);
|
cursorPainters.get(0).setTime(time);
|
||||||
pcs.firePropertyChange(CURSOR_PROPERTY, oldVal, time);
|
pcs.firePropertyChange(CURSOR_PROPERTY, oldVal, time);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see com.minres.scviewer.database.swt.IWaveformPanel#setMarkerTime(long, int)
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
public void setMarkerTime(long time, int index){
|
public void setMarkerTime(long time, int index){
|
||||||
if(cursorPainters.size()>index+1){
|
if(cursorPainters.size()>index+1){
|
||||||
final Long oldVal= cursorPainters.get(1+index).getTime();
|
final Long oldVal= cursorPainters.get(1+index).getTime();
|
||||||
|
@ -821,14 +882,26 @@ public class TxDisplay implements PropertyChangeListener, ISelectionProvider {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see com.minres.scviewer.database.swt.IWaveformPanel#getCursorTime()
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
public long getCursorTime(){
|
public long getCursorTime(){
|
||||||
return cursorPainters.get(0).getTime();
|
return cursorPainters.get(0).getTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see com.minres.scviewer.database.swt.IWaveformPanel#getActMarkerTime()
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
public long getActMarkerTime(){
|
public long getActMarkerTime(){
|
||||||
return getMarkerTime(selectedMarker);
|
return getMarkerTime(selectedMarker);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see com.minres.scviewer.database.swt.IWaveformPanel#getMarkerTime(int)
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
public long getMarkerTime(int index){
|
public long getMarkerTime(int index){
|
||||||
return cursorPainters.get(index+1).getTime();
|
return cursorPainters.get(index+1).getTime();
|
||||||
}
|
}
|
||||||
|
@ -895,7 +968,7 @@ public class TxDisplay implements PropertyChangeListener, ISelectionProvider {
|
||||||
|
|
||||||
public void dropAccept(DropTargetEvent event) {
|
public void dropAccept(DropTargetEvent event) {
|
||||||
Point offset = canvas.toControl(event.x, event.y);
|
Point offset = canvas.toControl(event.x, event.y);
|
||||||
if (event.detail != DND.DROP_MOVE || offset.y > trackVerticalOffset.lastKey() + waveformList.getTrackHeight()) {
|
if (event.detail != DND.DROP_MOVE || offset.y > trackVerticalOffset.lastKey() + waveformCanvas.getTrackHeight()) {
|
||||||
event.detail = DND.DROP_NONE;
|
event.detail = DND.DROP_NONE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -910,7 +983,7 @@ public class TxDisplay implements PropertyChangeListener, ISelectionProvider {
|
||||||
public void dragStart(DragSourceEvent event) {
|
public void dragStart(DragSourceEvent event) {
|
||||||
System.out.println("dragStart");
|
System.out.println("dragStart");
|
||||||
event.doit = false;
|
event.doit = false;
|
||||||
List<Object> clicked = waveformList.getClicked(new Point(event.x, event.y));
|
List<Object> clicked = waveformCanvas.getClicked(new Point(event.x, event.y));
|
||||||
for(Object o:clicked){
|
for(Object o:clicked){
|
||||||
if(o instanceof CursorPainter){
|
if(o instanceof CursorPainter){
|
||||||
LocalSelectionTransfer.getTransfer().setSelection(new StructuredSelection(o));
|
LocalSelectionTransfer.getTransfer().setSelection(new StructuredSelection(o));
|
||||||
|
@ -923,7 +996,7 @@ public class TxDisplay implements PropertyChangeListener, ISelectionProvider {
|
||||||
|
|
||||||
public void dragSetData(DragSourceEvent event) {
|
public void dragSetData(DragSourceEvent event) {
|
||||||
if (LocalSelectionTransfer.getTransfer().isSupportedType(event.dataType)) {
|
if (LocalSelectionTransfer.getTransfer().isSupportedType(event.dataType)) {
|
||||||
event.data=waveformList.getClicked(new Point(event.x, event.y));
|
event.data=waveformCanvas.getClicked(new Point(event.x, event.y));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -948,7 +1021,7 @@ public class TxDisplay implements PropertyChangeListener, ISelectionProvider {
|
||||||
|
|
||||||
public void dropAccept(DropTargetEvent event) {
|
public void dropAccept(DropTargetEvent event) {
|
||||||
Point offset = canvas.toControl(event.x, event.y);
|
Point offset = canvas.toControl(event.x, event.y);
|
||||||
if (event.detail != DND.DROP_MOVE || offset.y > trackVerticalOffset.lastKey() + waveformList.getTrackHeight()) {
|
if (event.detail != DND.DROP_MOVE || offset.y > trackVerticalOffset.lastKey() + waveformCanvas.getTrackHeight()) {
|
||||||
event.detail = DND.DROP_NONE;
|
event.detail = DND.DROP_NONE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -963,7 +1036,7 @@ public class TxDisplay implements PropertyChangeListener, ISelectionProvider {
|
||||||
|
|
||||||
protected void updateWaveform(final Canvas canvas, DropTargetEvent event, CursorPainter painter) {
|
protected void updateWaveform(final Canvas canvas, DropTargetEvent event, CursorPainter painter) {
|
||||||
Point dropPoint = canvas.toControl(event.x, event.y);
|
Point dropPoint = canvas.toControl(event.x, event.y);
|
||||||
long time = waveformList.getTimeForOffset(dropPoint.x);
|
long time = waveformCanvas.getTimeForOffset(dropPoint.x);
|
||||||
final Long oldVal= painter.getTime();
|
final Long oldVal= painter.getTime();
|
||||||
painter.setTime(time);
|
painter.setTime(time);
|
||||||
if(painter.id<0){
|
if(painter.id<0){
|
||||||
|
@ -986,10 +1059,18 @@ public class TxDisplay implements PropertyChangeListener, ISelectionProvider {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see com.minres.scviewer.database.swt.IWaveformPanel#addPropertyChangeListener(java.beans.PropertyChangeListener)
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
public void addPropertyChangeListener(PropertyChangeListener listener) {
|
public void addPropertyChangeListener(PropertyChangeListener listener) {
|
||||||
this.pcs.addPropertyChangeListener(listener);
|
this.pcs.addPropertyChangeListener(listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see com.minres.scviewer.database.swt.IWaveformPanel#addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener) {
|
public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener) {
|
||||||
this.pcs.addPropertyChangeListener(propertyName, listener);
|
this.pcs.addPropertyChangeListener(propertyName, listener);
|
||||||
}
|
}
|
||||||
|
@ -1002,10 +1083,18 @@ public class TxDisplay implements PropertyChangeListener, ISelectionProvider {
|
||||||
return this.pcs.getPropertyChangeListeners(propertyName);
|
return this.pcs.getPropertyChangeListeners(propertyName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see com.minres.scviewer.database.swt.IWaveformPanel#removePropertyChangeListener(java.beans.PropertyChangeListener)
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
public void removePropertyChangeListener(PropertyChangeListener listener) {
|
public void removePropertyChangeListener(PropertyChangeListener listener) {
|
||||||
this.pcs.removePropertyChangeListener(listener);
|
this.pcs.removePropertyChangeListener(listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see com.minres.scviewer.database.swt.IWaveformPanel#removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener) {
|
public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener) {
|
||||||
this.pcs.removePropertyChangeListener(propertyName, listener);
|
this.pcs.removePropertyChangeListener(propertyName, listener);
|
||||||
}
|
}
|
||||||
|
@ -1014,12 +1103,20 @@ public class TxDisplay implements PropertyChangeListener, ISelectionProvider {
|
||||||
return this.pcs.hasListeners(propertyName);
|
return this.pcs.hasListeners(propertyName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see com.minres.scviewer.database.swt.IWaveformPanel#getScaledTime(long)
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
public String getScaledTime(long time) {
|
public String getScaledTime(long time) {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
Double dTime=new Double(time);
|
Double dTime=new Double(time);
|
||||||
return sb.append(dTime/waveformList.getScaleFactorPow10()).append(waveformList.getUnitStr()).toString();
|
return sb.append(dTime/waveformCanvas.getScaleFactorPow10()).append(waveformCanvas.getUnitStr()).toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see com.minres.scviewer.database.swt.IWaveformPanel#getZoomLevels()
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
public String[] getZoomLevels(){
|
public String[] getZoomLevels(){
|
||||||
String[] res = new String[WaveformCanvas.unitMultiplier.length*WaveformCanvas.unitString.length];
|
String[] res = new String[WaveformCanvas.unitMultiplier.length*WaveformCanvas.unitString.length];
|
||||||
int index=0;
|
int index=0;
|
|
@ -11,6 +11,7 @@
|
||||||
package com.minres.scviewer.database.swt.internal;
|
package com.minres.scviewer.database.swt.internal;
|
||||||
|
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
import java.util.TreeMap;
|
||||||
|
|
||||||
import org.eclipse.swt.SWT;
|
import org.eclipse.swt.SWT;
|
||||||
import org.eclipse.swt.graphics.GC;
|
import org.eclipse.swt.graphics.GC;
|
||||||
|
@ -35,18 +36,19 @@ public class TrackPainter implements IPainter {
|
||||||
gc.setBackground(this.waveCanvas.colors[WaveformCanvas.Colors.TRACK_BG_EVEN.ordinal()]);
|
gc.setBackground(this.waveCanvas.colors[WaveformCanvas.Colors.TRACK_BG_EVEN.ordinal()]);
|
||||||
gc.setFillRule(SWT.FILL_EVEN_ODD);
|
gc.setFillRule(SWT.FILL_EVEN_ODD);
|
||||||
gc.fillRectangle(area);
|
gc.fillRectangle(area);
|
||||||
|
TreeMap<Integer, IWaveformPainter> offsets = this.waveCanvas.trackVerticalOffset;
|
||||||
if(this.waveCanvas.streams.size()>0){
|
if(this.waveCanvas.streams.size()>0){
|
||||||
Integer firstKey=this.waveCanvas.trackVerticalOffset.floorKey(area.y);
|
Integer firstKey=offsets.floorKey(area.y);
|
||||||
if(firstKey==null) firstKey=this.waveCanvas.trackVerticalOffset.firstKey();
|
if(firstKey==null) firstKey=offsets.firstKey();
|
||||||
Integer lastKey = this.waveCanvas.trackVerticalOffset.floorKey(area.y+area.height);
|
Integer lastKey = offsets.floorKey(area.y+area.height);
|
||||||
Rectangle subArea = new Rectangle(area.x, 0, area.width, 0);
|
Rectangle subArea = new Rectangle(area.x, 0, area.width, 0);
|
||||||
if(lastKey==firstKey){
|
if(lastKey==firstKey){
|
||||||
subArea.y=firstKey;
|
subArea.y=firstKey;
|
||||||
IWaveformPainter p = this.waveCanvas.trackVerticalOffset.get(firstKey);
|
IWaveformPainter p = offsets.get(firstKey);
|
||||||
subArea.height=p.getMinHeight();
|
subArea.height=p.getMinHeight();
|
||||||
p.paintArea(gc, subArea);
|
p.paintArea(gc, subArea);
|
||||||
}else{
|
}else{
|
||||||
for(Entry<Integer, IWaveformPainter> entry : this.waveCanvas.trackVerticalOffset.subMap(firstKey, true, lastKey, true).entrySet()){
|
for(Entry<Integer, IWaveformPainter> entry : offsets.subMap(firstKey, true, lastKey, true).entrySet()){
|
||||||
subArea.y=entry.getKey();
|
subArea.y=entry.getKey();
|
||||||
subArea.height=entry.getValue().getMinHeight();
|
subArea.height=entry.getValue().getMinHeight();
|
||||||
entry.getValue().paintArea(gc, subArea);
|
entry.getValue().paintArea(gc, subArea);
|
|
@ -400,7 +400,7 @@ public class WaveformCanvas extends Canvas {
|
||||||
int top = entry.getKey() + trackHeight * tx.getConcurrencyIndex();
|
int top = entry.getKey() + trackHeight * tx.getConcurrencyIndex();
|
||||||
int bottom = top + trackHeight;
|
int bottom = top + trackHeight;
|
||||||
if (top < -origin.y) {
|
if (top < -origin.y) {
|
||||||
setOrigin(origin.x, -top);
|
setOrigin(origin.x, -(top-trackHeight));
|
||||||
} else if (bottom > (size.y - origin.y)) {
|
} else if (bottom > (size.y - origin.y)) {
|
||||||
setOrigin(origin.x, size.y - bottom);
|
setOrigin(origin.x, size.y - bottom);
|
||||||
}
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<classpath>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||||
|
<classpathentry kind="src" path="src"/>
|
||||||
|
<classpathentry kind="output" path="bin"/>
|
||||||
|
</classpath>
|
|
@ -0,0 +1,2 @@
|
||||||
|
/bin/
|
||||||
|
/target/
|
|
@ -0,0 +1,28 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>com.minres.scviewer.database.ui</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>
|
|
@ -0,0 +1,7 @@
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||||
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
||||||
|
org.eclipse.jdt.core.compiler.compliance=1.7
|
||||||
|
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||||
|
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||||
|
org.eclipse.jdt.core.compiler.source=1.7
|
|
@ -0,0 +1,3 @@
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
pluginProject.extensions=false
|
||||||
|
resolve.requirebundle=false
|
|
@ -0,0 +1,10 @@
|
||||||
|
Manifest-Version: 1.0
|
||||||
|
Bundle-ManifestVersion: 2
|
||||||
|
Bundle-Name: Database UI
|
||||||
|
Bundle-SymbolicName: com.minres.scviewer.database.ui
|
||||||
|
Bundle-Version: 1.0.0.qualifier
|
||||||
|
Bundle-Vendor: MINRES Technologies GmbH
|
||||||
|
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
||||||
|
Export-Package: com.minres.scviewer.database.ui
|
||||||
|
Require-Bundle: com.minres.scviewer.database,
|
||||||
|
org.eclipse.jface
|
|
@ -0,0 +1,4 @@
|
||||||
|
source.. = src/
|
||||||
|
output.. = bin/
|
||||||
|
bin.includes = META-INF/,\
|
||||||
|
.
|
|
@ -1,6 +1,6 @@
|
||||||
<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">
|
<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>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>com.minres.scviewer.database.swt</artifactId>
|
<artifactId>com.minres.scviewer.database.ui</artifactId>
|
||||||
<version>1.0.0-SNAPSHOT</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
<packaging>eclipse-plugin</packaging>
|
<packaging>eclipse-plugin</packaging>
|
||||||
<parent>
|
<parent>
|
||||||
|
@ -9,5 +9,4 @@
|
||||||
<version>1.0.0-SNAPSHOT</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
<relativePath>../com.minres.scviewer.parent</relativePath>
|
<relativePath>../com.minres.scviewer.parent</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>com.minres.scviewer</groupId>
|
</project>
|
||||||
</project>
|
|
|
@ -8,6 +8,6 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* MINRES Technologies GmbH - initial API and implementation
|
* MINRES Technologies GmbH - initial API and implementation
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package com.minres.scviewer.database.swt;
|
package com.minres.scviewer.database.ui;
|
||||||
|
|
||||||
public enum GotoDirection {PREV, NEXT}
|
public enum GotoDirection {PREV, NEXT}
|
|
@ -0,0 +1,75 @@
|
||||||
|
package com.minres.scviewer.database.ui;
|
||||||
|
|
||||||
|
import java.beans.PropertyChangeListener;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.eclipse.jface.viewers.ISelection;
|
||||||
|
import org.eclipse.jface.viewers.ISelectionChangedListener;
|
||||||
|
import org.eclipse.jface.viewers.ISelectionProvider;
|
||||||
|
import org.eclipse.swt.widgets.Control;
|
||||||
|
|
||||||
|
import com.minres.scviewer.database.IWaveform;
|
||||||
|
import com.minres.scviewer.database.IWaveformEvent;
|
||||||
|
|
||||||
|
public interface IWaveformPanel extends PropertyChangeListener, ISelectionProvider{
|
||||||
|
|
||||||
|
String CURSOR_PROPERTY = "cursor_time";
|
||||||
|
String MARKER_PROPERTY = "marker_time";
|
||||||
|
|
||||||
|
void addSelectionChangedListener(ISelectionChangedListener listener);
|
||||||
|
|
||||||
|
void removeSelectionChangedListener(ISelectionChangedListener listener);
|
||||||
|
|
||||||
|
Control getControl();
|
||||||
|
|
||||||
|
Control getNameControl();
|
||||||
|
|
||||||
|
Control getValueControl();
|
||||||
|
|
||||||
|
Control getWaveformControl();
|
||||||
|
|
||||||
|
ISelection getSelection();
|
||||||
|
|
||||||
|
void setSelection(ISelection selection);
|
||||||
|
|
||||||
|
void setSelection(ISelection selection, boolean addIfNeeded);
|
||||||
|
|
||||||
|
void moveSelection(GotoDirection direction);
|
||||||
|
|
||||||
|
void moveCursor(GotoDirection direction);
|
||||||
|
|
||||||
|
List<IWaveform<? extends IWaveformEvent>> getStreamList();
|
||||||
|
|
||||||
|
void moveSelected(int i);
|
||||||
|
|
||||||
|
long getMaxTime();
|
||||||
|
|
||||||
|
void setMaxTime(long maxTime);
|
||||||
|
|
||||||
|
void setZoomLevel(int scale);
|
||||||
|
|
||||||
|
int getZoomLevel();
|
||||||
|
|
||||||
|
void setCursorTime(long time);
|
||||||
|
|
||||||
|
void setMarkerTime(long time, int index);
|
||||||
|
|
||||||
|
long getCursorTime();
|
||||||
|
|
||||||
|
long getActMarkerTime();
|
||||||
|
|
||||||
|
long getMarkerTime(int index);
|
||||||
|
|
||||||
|
void addPropertyChangeListener(PropertyChangeListener listener);
|
||||||
|
|
||||||
|
void addPropertyChangeListener(String propertyName, PropertyChangeListener listener);
|
||||||
|
|
||||||
|
void removePropertyChangeListener(PropertyChangeListener listener);
|
||||||
|
|
||||||
|
void removePropertyChangeListener(String propertyName, PropertyChangeListener listener);
|
||||||
|
|
||||||
|
String getScaledTime(long time);
|
||||||
|
|
||||||
|
String[] getZoomLevels();
|
||||||
|
|
||||||
|
}
|
|
@ -5,7 +5,7 @@
|
||||||
<children xsi:type="advanced:Perspective" xmi:id="_95QGx3NmEeWBq8z1Dv39LA">
|
<children xsi:type="advanced:Perspective" xmi:id="_95QGx3NmEeWBq8z1Dv39LA">
|
||||||
<children xsi:type="basic:PartSashContainer" xmi:id="_95QGyHNmEeWBq8z1Dv39LA" horizontal="true">
|
<children xsi:type="basic:PartSashContainer" xmi:id="_95QGyHNmEeWBq8z1Dv39LA" horizontal="true">
|
||||||
<children xsi:type="basic:PartSashContainer" xmi:id="_61hA8HTPEeWwZ-9vrAR2UQ" elementId="" containerData="20">
|
<children xsi:type="basic:PartSashContainer" xmi:id="_61hA8HTPEeWwZ-9vrAR2UQ" elementId="" containerData="20">
|
||||||
<children xsi:type="basic:Part" xmi:id="_95QGynNmEeWBq8z1Dv39LA" containerData="10" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.parts.DesignBrowser" label="Design Browser"/>
|
<children xsi:type="basic:Part" xmi:id="_95QGynNmEeWBq8z1Dv39LA" elementId="com.minres.scviewer.e4.application.parts.DesignBrowser" containerData="10" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.parts.DesignBrowser" label="Design Browser"/>
|
||||||
<children xsi:type="basic:Part" xmi:id="_8KyKwHTPEeWwZ-9vrAR2UQ" elementId="com.minres.scviewer.e4.application.parts.WaveformList" containerData="9" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.parts.WaveformListPart" label="Waveform List">
|
<children xsi:type="basic:Part" xmi:id="_8KyKwHTPEeWwZ-9vrAR2UQ" elementId="com.minres.scviewer.e4.application.parts.WaveformList" containerData="9" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.parts.WaveformListPart" label="Waveform List">
|
||||||
<handlers xmi:id="_Bx9s0Hr-EeWVM_sKoXvptg" elementId="com.minres.scviewer.e4.application.handler.addWaveformCommand" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.AddWaveformHandler" command="_2PehEHr9EeWVM_sKoXvptg"/>
|
<handlers xmi:id="_Bx9s0Hr-EeWVM_sKoXvptg" elementId="com.minres.scviewer.e4.application.handler.addWaveformCommand" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.AddWaveformHandler" command="_2PehEHr9EeWVM_sKoXvptg"/>
|
||||||
<menus xsi:type="menu:PopupMenu" xmi:id="_G6xAYHsDEeWVM_sKoXvptg" elementId="com.minres.scviewer.e4.application.parts.WaveformList.popupmenu">
|
<menus xsi:type="menu:PopupMenu" xmi:id="_G6xAYHsDEeWVM_sKoXvptg" elementId="com.minres.scviewer.e4.application.parts.WaveformList.popupmenu">
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
</children>
|
</children>
|
||||||
<children xsi:type="basic:PartSashContainer" xmi:id="_uT9BIHgtEeWwZ-9vrAR2UQ" elementId="" containerData="80">
|
<children xsi:type="basic:PartSashContainer" xmi:id="_uT9BIHgtEeWwZ-9vrAR2UQ" elementId="" containerData="80">
|
||||||
<children xsi:type="basic:PartStack" xmi:id="_95QGyXNmEeWBq8z1Dv39LA" elementId="org.eclipse.editorss" containerData="75"/>
|
<children xsi:type="basic:PartStack" xmi:id="_95QGyXNmEeWBq8z1Dv39LA" elementId="org.eclipse.editorss" containerData="75"/>
|
||||||
<children xsi:type="basic:Part" xmi:id="_vtfm8HgtEeWwZ-9vrAR2UQ" elementId="" containerData="25" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.parts.TransactionDetails"/>
|
<children xsi:type="basic:Part" xmi:id="_vtfm8HgtEeWwZ-9vrAR2UQ" elementId="com.minres.scviewer.e4.application.parts.WaveformDetails" containerData="25" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.parts.TransactionDetails" label="Waveform Details"/>
|
||||||
</children>
|
</children>
|
||||||
</children>
|
</children>
|
||||||
</children>
|
</children>
|
||||||
|
@ -74,7 +74,6 @@
|
||||||
<children xsi:type="menu:HandledMenuItem" xmi:id="_95QGxXNmEeWBq8z1Dv39LA" label="About" command="_95PfxnNmEeWBq8z1Dv39LA"/>
|
<children xsi:type="menu:HandledMenuItem" xmi:id="_95QGxXNmEeWBq8z1Dv39LA" label="About" command="_95PfxnNmEeWBq8z1Dv39LA"/>
|
||||||
</children>
|
</children>
|
||||||
</mainMenu>
|
</mainMenu>
|
||||||
<sharedElements xsi:type="basic:Part" xmi:id="_Oae6kHcvEeWwZ-9vrAR2UQ" elementId="com.minres.scviewer.e4.application.part.0"/>
|
|
||||||
<trimBars xmi:id="_95QGy3NmEeWBq8z1Dv39LA" elementId="org.eclipse.ui.main.toolbar">
|
<trimBars xmi:id="_95QGy3NmEeWBq8z1Dv39LA" elementId="org.eclipse.ui.main.toolbar">
|
||||||
<children xsi:type="menu:ToolBar" xmi:id="_95QGzHNmEeWBq8z1Dv39LA" elementId="toolbar:org.eclipse.ui.main.toolbar">
|
<children xsi:type="menu:ToolBar" xmi:id="_95QGzHNmEeWBq8z1Dv39LA" elementId="toolbar:org.eclipse.ui.main.toolbar">
|
||||||
<children xsi:type="menu:HandledToolItem" xmi:id="_95QGzXNmEeWBq8z1Dv39LA" iconURI="platform:/plugin/com.minres.scviewer.e4.application/icons/folder_database.png" command="_95PfwHNmEeWBq8z1Dv39LA"/>
|
<children xsi:type="menu:HandledToolItem" xmi:id="_95QGzXNmEeWBq8z1Dv39LA" iconURI="platform:/plugin/com.minres.scviewer.e4.application/icons/folder_database.png" command="_95PfwHNmEeWBq8z1Dv39LA"/>
|
||||||
|
|
|
@ -14,7 +14,7 @@ Require-Bundle: javax.inject;bundle-version="1.0.0",
|
||||||
org.eclipse.e4.core.di;bundle-version="1.5.0",
|
org.eclipse.e4.core.di;bundle-version="1.5.0",
|
||||||
org.eclipse.e4.ui.di;bundle-version="1.1.0",
|
org.eclipse.e4.ui.di;bundle-version="1.1.0",
|
||||||
org.eclipse.e4.core.contexts;bundle-version="1.4.0",
|
org.eclipse.e4.core.contexts;bundle-version="1.4.0",
|
||||||
com.minres.scviewer.database.swt;bundle-version="1.0.0",
|
com.minres.scviewer.database.ui.swt;bundle-version="1.0.0",
|
||||||
com.minres.scviewer.database;bundle-version="1.0.0",
|
com.minres.scviewer.database;bundle-version="1.0.0",
|
||||||
org.eclipse.equinox.ds;bundle-version="1.4.300",
|
org.eclipse.equinox.ds;bundle-version="1.4.300",
|
||||||
org.eclipse.equinox.util;bundle-version="1.0.500",
|
org.eclipse.equinox.util;bundle-version="1.0.500",
|
||||||
|
@ -26,7 +26,8 @@ Require-Bundle: javax.inject;bundle-version="1.0.0",
|
||||||
com.google.guava,
|
com.google.guava,
|
||||||
org.eclipse.equinox.preferences,
|
org.eclipse.equinox.preferences,
|
||||||
org.eclipse.core.expressions,
|
org.eclipse.core.expressions,
|
||||||
org.eclipse.e4.core.commands;bundle-version="0.11.0"
|
org.eclipse.e4.core.commands;bundle-version="0.11.0",
|
||||||
|
com.minres.scviewer.database.ui
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
||||||
Import-Package: com.minres.scviewer.database,
|
Import-Package: com.minres.scviewer.database,
|
||||||
javax.inject;version="1.0.0"
|
javax.inject;version="1.0.0"
|
||||||
|
|
|
@ -94,13 +94,14 @@ public class E4LifeCycle {
|
||||||
@Inject EModelService modelService;
|
@Inject EModelService modelService;
|
||||||
@Inject EPartService partService;
|
@Inject EPartService partService;
|
||||||
public void openViewForFile(String name){
|
public void openViewForFile(String name){
|
||||||
|
File file = new File(name);
|
||||||
MPart part = partService.createPart("com.minres.scviewer.e4.application.partdescriptor.waveformviewer");
|
MPart part = partService.createPart("com.minres.scviewer.e4.application.partdescriptor.waveformviewer");
|
||||||
part.setLabel(name);
|
part.setLabel(file.getName());
|
||||||
MPartStack partStack = (MPartStack)modelService.find("org.eclipse.editorss", app);
|
MPartStack partStack = (MPartStack)modelService.find("org.eclipse.editorss", app);
|
||||||
partStack.getChildren().add(part);
|
partStack.getChildren().add(part);
|
||||||
partService.showPart(part, PartState.ACTIVATE);
|
partService.showPart(part, PartState.ACTIVATE);
|
||||||
IEclipseContext ctx=part.getContext();
|
IEclipseContext ctx=part.getContext();
|
||||||
ctx.modify("input", new File(name));
|
ctx.modify("input", file);
|
||||||
ctx.declareModifiable("input");
|
ctx.declareModifiable("input");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ import org.eclipse.jface.viewers.IStructuredSelection;
|
||||||
|
|
||||||
import com.minres.scviewer.database.ITx;
|
import com.minres.scviewer.database.ITx;
|
||||||
import com.minres.scviewer.database.IWaveform;
|
import com.minres.scviewer.database.IWaveform;
|
||||||
import com.minres.scviewer.database.swt.GotoDirection;
|
import com.minres.scviewer.database.ui.GotoDirection;
|
||||||
import com.minres.scviewer.e4.application.parts.WaveformViewerPart;
|
import com.minres.scviewer.e4.application.parts.WaveformViewerPart;
|
||||||
|
|
||||||
public class NavigateEvent {
|
public class NavigateEvent {
|
||||||
|
|
|
@ -21,7 +21,7 @@ import org.eclipse.e4.ui.workbench.modeling.ESelectionService;
|
||||||
import org.eclipse.jface.viewers.IStructuredSelection;
|
import org.eclipse.jface.viewers.IStructuredSelection;
|
||||||
|
|
||||||
import com.minres.scviewer.database.ITx;
|
import com.minres.scviewer.database.ITx;
|
||||||
import com.minres.scviewer.database.swt.GotoDirection;
|
import com.minres.scviewer.database.ui.GotoDirection;
|
||||||
import com.minres.scviewer.e4.application.parts.WaveformViewerPart;
|
import com.minres.scviewer.e4.application.parts.WaveformViewerPart;
|
||||||
|
|
||||||
public class NavigateTrans {
|
public class NavigateTrans {
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class OpenHandler {
|
||||||
// part.setContributionURI("bundleclass://com.minres.scviewer.e4.application/"+
|
// part.setContributionURI("bundleclass://com.minres.scviewer.e4.application/"+
|
||||||
// WaveformViewerPart.class.getName());
|
// WaveformViewerPart.class.getName());
|
||||||
MPart part = partService .createPart("com.minres.scviewer.e4.application.partdescriptor.waveformviewer");
|
MPart part = partService .createPart("com.minres.scviewer.e4.application.partdescriptor.waveformviewer");
|
||||||
part.setLabel(fileName);
|
part.setLabel(file.getName());
|
||||||
|
|
||||||
|
|
||||||
MPartStack partStack = (MPartStack)modelService.find("org.eclipse.editorss", app);
|
MPartStack partStack = (MPartStack)modelService.find("org.eclipse.editorss", app);
|
||||||
|
|
|
@ -52,8 +52,9 @@ import com.minres.scviewer.database.IWaveform;
|
||||||
import com.minres.scviewer.database.IWaveformDb;
|
import com.minres.scviewer.database.IWaveformDb;
|
||||||
import com.minres.scviewer.database.IWaveformDbFactory;
|
import com.minres.scviewer.database.IWaveformDbFactory;
|
||||||
import com.minres.scviewer.database.IWaveformEvent;
|
import com.minres.scviewer.database.IWaveformEvent;
|
||||||
import com.minres.scviewer.database.swt.GotoDirection;
|
|
||||||
import com.minres.scviewer.database.swt.TxDisplay;
|
import com.minres.scviewer.database.swt.TxDisplay;
|
||||||
|
import com.minres.scviewer.database.ui.GotoDirection;
|
||||||
|
import com.minres.scviewer.database.ui.IWaveformPanel;
|
||||||
import com.minres.scviewer.e4.application.internal.WaveStatusBarControl;
|
import com.minres.scviewer.e4.application.internal.WaveStatusBarControl;
|
||||||
|
|
||||||
public class WaveformViewerPart {
|
public class WaveformViewerPart {
|
||||||
|
@ -70,7 +71,7 @@ public class WaveformViewerPart {
|
||||||
|
|
||||||
public static final String WAVE_ACTION_ID = "com.minres.scviewer.ui.action.AddToWave";
|
public static final String WAVE_ACTION_ID = "com.minres.scviewer.ui.action.AddToWave";
|
||||||
|
|
||||||
private TxDisplay txDisplay;
|
private IWaveformPanel waveformPane;
|
||||||
|
|
||||||
@Inject private IEventBroker eventBroker;
|
@Inject private IEventBroker eventBroker;
|
||||||
|
|
||||||
|
@ -98,41 +99,41 @@ public class WaveformViewerPart {
|
||||||
myParent.getDisplay().syncExec(new Runnable() {
|
myParent.getDisplay().syncExec(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
txDisplay.setMaxTime(database.getMaxTime());
|
waveformPane.setMaxTime(database.getMaxTime());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
txDisplay = new TxDisplay(parent);
|
waveformPane = new TxDisplay(parent);
|
||||||
txDisplay.setMaxTime(0);
|
waveformPane.setMaxTime(0);
|
||||||
txDisplay.addPropertyChangeListener(TxDisplay.CURSOR_PROPERTY, new PropertyChangeListener() {
|
waveformPane.addPropertyChangeListener(IWaveformPanel.CURSOR_PROPERTY, new PropertyChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void propertyChange(PropertyChangeEvent evt) {
|
public void propertyChange(PropertyChangeEvent evt) {
|
||||||
Long time = (Long) evt.getNewValue();
|
Long time = (Long) evt.getNewValue();
|
||||||
eventBroker.post(WaveStatusBarControl.CURSOR_TIME, txDisplay.getScaledTime(time));
|
eventBroker.post(WaveStatusBarControl.CURSOR_TIME, waveformPane.getScaledTime(time));
|
||||||
long marker=txDisplay.getActMarkerTime();
|
long marker=waveformPane.getActMarkerTime();
|
||||||
eventBroker.post(WaveStatusBarControl.MARKER_DIFF, txDisplay.getScaledTime(time-marker));
|
eventBroker.post(WaveStatusBarControl.MARKER_DIFF, waveformPane.getScaledTime(time-marker));
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
txDisplay.addPropertyChangeListener(TxDisplay.MARKER_PROPERTY, new PropertyChangeListener() {
|
waveformPane.addPropertyChangeListener(IWaveformPanel.MARKER_PROPERTY, new PropertyChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void propertyChange(PropertyChangeEvent evt) {
|
public void propertyChange(PropertyChangeEvent evt) {
|
||||||
Long time = (Long) evt.getNewValue();
|
Long time = (Long) evt.getNewValue();
|
||||||
eventBroker.post(WaveStatusBarControl.MARKER_TIME, txDisplay.getScaledTime(time));
|
eventBroker.post(WaveStatusBarControl.MARKER_TIME, waveformPane.getScaledTime(time));
|
||||||
long cursor=txDisplay.getCursorTime();
|
long cursor=waveformPane.getCursorTime();
|
||||||
eventBroker.post(WaveStatusBarControl.MARKER_DIFF, txDisplay.getScaledTime(cursor-time));
|
eventBroker.post(WaveStatusBarControl.MARKER_DIFF, waveformPane.getScaledTime(cursor-time));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
txDisplay.addSelectionChangedListener(new ISelectionChangedListener() {
|
waveformPane.addSelectionChangedListener(new ISelectionChangedListener() {
|
||||||
@Override
|
@Override
|
||||||
public void selectionChanged(SelectionChangedEvent event) {
|
public void selectionChanged(SelectionChangedEvent event) {
|
||||||
if(event.getSelection() instanceof IStructuredSelection)
|
if(event.getSelection() instanceof IStructuredSelection)
|
||||||
selectionService.setSelection(event.getSelection());
|
selectionService.setSelection(event.getSelection());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
zoomLevel=txDisplay.getZoomLevels();
|
zoomLevel=waveformPane.getZoomLevels();
|
||||||
filesToLoad=new ArrayList<File>();
|
filesToLoad=new ArrayList<File>();
|
||||||
persistedState = part.getPersistedState();
|
persistedState = part.getPersistedState();
|
||||||
Integer files = persistedState.containsKey(DATABASE_FILE+"S")?Integer.parseInt(persistedState.get(DATABASE_FILE+"S")):0;
|
Integer files = persistedState.containsKey(DATABASE_FILE+"S")?Integer.parseInt(persistedState.get(DATABASE_FILE+"S")):0;
|
||||||
|
@ -141,10 +142,10 @@ public class WaveformViewerPart {
|
||||||
}
|
}
|
||||||
if(filesToLoad.size()>0)
|
if(filesToLoad.size()>0)
|
||||||
loadDatabase();
|
loadDatabase();
|
||||||
eventBroker.post(WaveStatusBarControl.ZOOM_LEVEL, zoomLevel[txDisplay.getZoomLevel()]);
|
eventBroker.post(WaveStatusBarControl.ZOOM_LEVEL, zoomLevel[waveformPane.getZoomLevel()]);
|
||||||
menuService.registerContextMenu(txDisplay.getNameControl(), "com.minres.scviewer.e4.application.popupmenu.namecontext");
|
menuService.registerContextMenu(waveformPane.getNameControl(), "com.minres.scviewer.e4.application.popupmenu.namecontext");
|
||||||
menuService.registerContextMenu(txDisplay.getValueControl(), "com.minres.scviewer.e4.application.popupmenu.namecontext");
|
menuService.registerContextMenu(waveformPane.getValueControl(), "com.minres.scviewer.e4.application.popupmenu.namecontext");
|
||||||
menuService.registerContextMenu(txDisplay.getWaveformControl(), "com.minres.scviewer.e4.application.popupmenu.wavecontext");
|
menuService.registerContextMenu(waveformPane.getWaveformControl(), "com.minres.scviewer.e4.application.popupmenu.wavecontext");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void loadDatabase() {
|
protected void loadDatabase() {
|
||||||
|
@ -158,7 +159,7 @@ public class WaveformViewerPart {
|
||||||
for(File file: filesToLoad){
|
for(File file: filesToLoad){
|
||||||
//TimeUnit.SECONDS.sleep(2);
|
//TimeUnit.SECONDS.sleep(2);
|
||||||
database.load(file);
|
database.load(file);
|
||||||
database.addPropertyChangeListener(txDisplay);
|
database.addPropertyChangeListener(waveformPane);
|
||||||
subMonitor.worked(1);
|
subMonitor.worked(1);
|
||||||
if(monitor.isCanceled()) return Status.CANCEL_STATUS;
|
if(monitor.isCanceled()) return Status.CANCEL_STATUS;
|
||||||
}
|
}
|
||||||
|
@ -180,7 +181,7 @@ public class WaveformViewerPart {
|
||||||
myParent.getDisplay().asyncExec(new Runnable() {
|
myParent.getDisplay().asyncExec(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
txDisplay.setMaxTime(database.getMaxTime());
|
waveformPane.setMaxTime(database.getMaxTime());
|
||||||
restoreState();
|
restoreState();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -234,9 +235,9 @@ public class WaveformViewerPart {
|
||||||
persistedState.put(DATABASE_FILE+index, file.getAbsolutePath());
|
persistedState.put(DATABASE_FILE+index, file.getAbsolutePath());
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
persistedState.put(SHOWN_WAVEFORM+"S", Integer.toString(txDisplay.getStreamList().size()));
|
persistedState.put(SHOWN_WAVEFORM+"S", Integer.toString(waveformPane.getStreamList().size()));
|
||||||
index=0;
|
index=0;
|
||||||
for(IWaveform<? extends IWaveformEvent> waveform:txDisplay.getStreamList()){
|
for(IWaveform<? extends IWaveformEvent> waveform:waveformPane.getStreamList()){
|
||||||
persistedState.put(SHOWN_WAVEFORM+index, waveform.getFullName());
|
persistedState.put(SHOWN_WAVEFORM+index, waveform.getFullName());
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
@ -250,17 +251,17 @@ public class WaveformViewerPart {
|
||||||
IWaveform<? extends IWaveformEvent> waveform = database.getStreamByName(persistedState.get(SHOWN_WAVEFORM+i));
|
IWaveform<? extends IWaveformEvent> waveform = database.getStreamByName(persistedState.get(SHOWN_WAVEFORM+i));
|
||||||
if(waveform!=null) res.add(waveform);
|
if(waveform!=null) res.add(waveform);
|
||||||
}
|
}
|
||||||
if(res.size()>0) txDisplay.getStreamList().addAll(res);
|
if(res.size()>0) waveformPane.getStreamList().addAll(res);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateAll() {
|
private void updateAll() {
|
||||||
eventBroker.post(ACTIVE_WAVEFORMVIEW, this);
|
eventBroker.post(ACTIVE_WAVEFORMVIEW, this);
|
||||||
eventBroker.post(WaveStatusBarControl.ZOOM_LEVEL, zoomLevel[txDisplay.getZoomLevel()]);
|
eventBroker.post(WaveStatusBarControl.ZOOM_LEVEL, zoomLevel[waveformPane.getZoomLevel()]);
|
||||||
long cursor=txDisplay.getCursorTime();
|
long cursor=waveformPane.getCursorTime();
|
||||||
long marker=txDisplay.getActMarkerTime();
|
long marker=waveformPane.getActMarkerTime();
|
||||||
eventBroker.post(WaveStatusBarControl.CURSOR_TIME, txDisplay.getScaledTime(cursor));
|
eventBroker.post(WaveStatusBarControl.CURSOR_TIME, waveformPane.getScaledTime(cursor));
|
||||||
eventBroker.post(WaveStatusBarControl.MARKER_TIME, txDisplay.getScaledTime(marker));
|
eventBroker.post(WaveStatusBarControl.MARKER_TIME, waveformPane.getScaledTime(marker));
|
||||||
eventBroker.post(WaveStatusBarControl.MARKER_DIFF, txDisplay.getScaledTime(cursor-marker));
|
eventBroker.post(WaveStatusBarControl.MARKER_DIFF, waveformPane.getScaledTime(cursor-marker));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Inject @Optional
|
@Inject @Optional
|
||||||
|
@ -327,20 +328,20 @@ public class WaveformViewerPart {
|
||||||
List<IWaveform<? extends IWaveformEvent>> streams= new LinkedList<>();
|
List<IWaveform<? extends IWaveformEvent>> streams= new LinkedList<>();
|
||||||
for(IWaveform<? extends IWaveformEvent> stream:iWaveforms)
|
for(IWaveform<? extends IWaveformEvent> stream:iWaveforms)
|
||||||
streams.add(stream);
|
streams.add(stream);
|
||||||
IStructuredSelection selection = (IStructuredSelection) txDisplay.getSelection();
|
IStructuredSelection selection = (IStructuredSelection) waveformPane.getSelection();
|
||||||
if(selection.size()==0)
|
if(selection.size()==0)
|
||||||
txDisplay.getStreamList().addAll(streams);
|
waveformPane.getStreamList().addAll(streams);
|
||||||
else {
|
else {
|
||||||
IWaveform<?> selectedStream = (selection.getFirstElement() instanceof ITx)?
|
IWaveform<?> selectedStream = (selection.getFirstElement() instanceof ITx)?
|
||||||
((ITx)selection.getFirstElement()).getStream():(IWaveform<?>)selection.getFirstElement();
|
((ITx)selection.getFirstElement()).getStream():(IWaveform<?>)selection.getFirstElement();
|
||||||
int index = txDisplay.getStreamList().indexOf(selectedStream);
|
int index = waveformPane.getStreamList().indexOf(selectedStream);
|
||||||
if(!insert) index++;
|
if(!insert) index++;
|
||||||
txDisplay.getStreamList().addAll(index, streams);
|
waveformPane.getStreamList().addAll(index, streams);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeStreamFromList(IWaveform<? extends IWaveformEvent> obj){
|
public void removeStreamFromList(IWaveform<? extends IWaveformEvent> obj){
|
||||||
txDisplay.getStreamList().remove(obj);
|
waveformPane.getStreamList().remove(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeStreamsFromList(IWaveform<? extends IWaveformEvent>[] iWaveforms){
|
public void removeStreamsFromList(IWaveform<? extends IWaveformEvent>[] iWaveforms){
|
||||||
|
@ -349,43 +350,43 @@ public class WaveformViewerPart {
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<IWaveform<? extends IWaveformEvent>> getStreamList(){
|
public List<IWaveform<? extends IWaveformEvent>> getStreamList(){
|
||||||
return txDisplay.getStreamList();
|
return waveformPane.getStreamList();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void moveSelected(int i) {
|
public void moveSelected(int i) {
|
||||||
txDisplay.moveSelected(i);
|
waveformPane.moveSelected(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void moveSelection(GotoDirection direction) {
|
public void moveSelection(GotoDirection direction) {
|
||||||
txDisplay.moveSelection(direction);
|
waveformPane.moveSelection(direction);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void moveCursor(GotoDirection direction) {
|
public void moveCursor(GotoDirection direction) {
|
||||||
txDisplay.moveCursor(direction); }
|
waveformPane.moveCursor(direction); }
|
||||||
|
|
||||||
public void setZoomLevel(Integer level) {
|
public void setZoomLevel(Integer level) {
|
||||||
if(level<0) level=0;
|
if(level<0) level=0;
|
||||||
if(level>zoomLevel.length-1) level=zoomLevel.length-1;
|
if(level>zoomLevel.length-1) level=zoomLevel.length-1;
|
||||||
txDisplay.setZoomLevel(level);
|
waveformPane.setZoomLevel(level);
|
||||||
updateAll(); }
|
updateAll(); }
|
||||||
|
|
||||||
public void setZoomFit() {
|
public void setZoomFit() {
|
||||||
txDisplay.setZoomLevel(6);
|
waveformPane.setZoomLevel(6);
|
||||||
updateAll(); }
|
updateAll(); }
|
||||||
|
|
||||||
public int getZoomLevel() {
|
public int getZoomLevel() {
|
||||||
return txDisplay.getZoomLevel();
|
return waveformPane.getZoomLevel();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ISelection getSelection() {
|
public ISelection getSelection() {
|
||||||
return txDisplay.getSelection();
|
return waveformPane.getSelection();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSelection(IStructuredSelection structuredSelection) {
|
public void setSelection(IStructuredSelection structuredSelection) {
|
||||||
txDisplay.setSelection(structuredSelection, true);
|
waveformPane.setSelection(structuredSelection, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getScaledTime(Long time) {
|
public String getScaledTime(Long time) {
|
||||||
return txDisplay.getScaledTime(time);
|
return waveformPane.getScaledTime(time);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
<stringAttribute key="product" value="com.minres.scviewer.e4.application.product"/>
|
<stringAttribute key="product" value="com.minres.scviewer.e4.application.product"/>
|
||||||
<stringAttribute key="productFile" value="/com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.product"/>
|
<stringAttribute key="productFile" value="/com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.product"/>
|
||||||
<stringAttribute key="selected_target_plugins" value="com.google.guava@default:default,com.ibm.icu@default:default,javax.annotation@default:default,javax.inject@default:default,javax.servlet@default:default,javax.xml@default:default,org.apache.ant@default:default,org.apache.batik.css@default:default,org.apache.batik.util.gui@default:default,org.apache.batik.util@default:default,org.apache.commons.jxpath@default:default,org.apache.commons.logging@default:default,org.apache.felix.gogo.command@default:default,org.apache.felix.gogo.runtime@default:default,org.apache.felix.gogo.shell@default:default,org.codehaus.groovy@default:default,org.eclipse.ant.core@default:default,org.eclipse.compare.core@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.beans@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.filesystem.java7@default:false,org.eclipse.core.filesystem.macosx@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.resources@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.e4.core.commands@default:default,org.eclipse.e4.core.contexts@default:default,org.eclipse.e4.core.di.annotations@default:default,org.eclipse.e4.core.di.extensions@default:default,org.eclipse.e4.core.di@default:default,org.eclipse.e4.core.services@default:default,org.eclipse.e4.emf.xpath@default:default,org.eclipse.e4.ui.bindings@default:default,org.eclipse.e4.ui.css.core@default:default,org.eclipse.e4.ui.css.swt.theme@default:default,org.eclipse.e4.ui.css.swt@default:default,org.eclipse.e4.ui.di@default:default,org.eclipse.e4.ui.model.workbench@default:default,org.eclipse.e4.ui.services@default:default,org.eclipse.e4.ui.widgets@default:default,org.eclipse.e4.ui.workbench.addons.swt@default:default,org.eclipse.e4.ui.workbench.renderers.swt.cocoa@default:false,org.eclipse.e4.ui.workbench.renderers.swt@default:default,org.eclipse.e4.ui.workbench.swt@default:default,org.eclipse.e4.ui.workbench3@default:default,org.eclipse.e4.ui.workbench@default:default,org.eclipse.emf.common@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.bidi@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.concurrent@default:default,org.eclipse.equinox.console@default:default,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.event@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.util@default:default,org.eclipse.help@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jface.text@default:default,org.eclipse.jface@default:default,org.eclipse.osgi.compatibility.state@default:false,org.eclipse.osgi.services@default:default,org.eclipse.osgi@-1:true,org.eclipse.swt.cocoa.macosx.x86_64@default:false,org.eclipse.swt@default:default,org.eclipse.team.core@default:default,org.eclipse.text@default:default,org.eclipse.ui.cocoa@default:false,org.eclipse.ui.console@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui@default:default,org.hamcrest.core@default:default,org.junit@default:default,org.w3c.css.sac@default:default,org.w3c.dom.events@default:default,org.w3c.dom.smil@default:default,org.w3c.dom.svg@default:default"/>
|
<stringAttribute key="selected_target_plugins" value="com.google.guava@default:default,com.ibm.icu@default:default,javax.annotation@default:default,javax.inject@default:default,javax.servlet@default:default,javax.xml@default:default,org.apache.ant@default:default,org.apache.batik.css@default:default,org.apache.batik.util.gui@default:default,org.apache.batik.util@default:default,org.apache.commons.jxpath@default:default,org.apache.commons.logging@default:default,org.apache.felix.gogo.command@default:default,org.apache.felix.gogo.runtime@default:default,org.apache.felix.gogo.shell@default:default,org.codehaus.groovy@default:default,org.eclipse.ant.core@default:default,org.eclipse.compare.core@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.beans@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.filesystem.java7@default:false,org.eclipse.core.filesystem.macosx@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.resources@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.e4.core.commands@default:default,org.eclipse.e4.core.contexts@default:default,org.eclipse.e4.core.di.annotations@default:default,org.eclipse.e4.core.di.extensions@default:default,org.eclipse.e4.core.di@default:default,org.eclipse.e4.core.services@default:default,org.eclipse.e4.emf.xpath@default:default,org.eclipse.e4.ui.bindings@default:default,org.eclipse.e4.ui.css.core@default:default,org.eclipse.e4.ui.css.swt.theme@default:default,org.eclipse.e4.ui.css.swt@default:default,org.eclipse.e4.ui.di@default:default,org.eclipse.e4.ui.model.workbench@default:default,org.eclipse.e4.ui.services@default:default,org.eclipse.e4.ui.widgets@default:default,org.eclipse.e4.ui.workbench.addons.swt@default:default,org.eclipse.e4.ui.workbench.renderers.swt.cocoa@default:false,org.eclipse.e4.ui.workbench.renderers.swt@default:default,org.eclipse.e4.ui.workbench.swt@default:default,org.eclipse.e4.ui.workbench3@default:default,org.eclipse.e4.ui.workbench@default:default,org.eclipse.emf.common@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.bidi@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.concurrent@default:default,org.eclipse.equinox.console@default:default,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.event@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.util@default:default,org.eclipse.help@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jface.text@default:default,org.eclipse.jface@default:default,org.eclipse.osgi.compatibility.state@default:false,org.eclipse.osgi.services@default:default,org.eclipse.osgi@-1:true,org.eclipse.swt.cocoa.macosx.x86_64@default:false,org.eclipse.swt@default:default,org.eclipse.team.core@default:default,org.eclipse.text@default:default,org.eclipse.ui.cocoa@default:false,org.eclipse.ui.console@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui@default:default,org.hamcrest.core@default:default,org.junit@default:default,org.w3c.css.sac@default:default,org.w3c.dom.events@default:default,org.w3c.dom.smil@default:default,org.w3c.dom.svg@default:default"/>
|
||||||
<stringAttribute key="selected_workspace_plugins" value="com.minres.scviewer.database.sqlite@default:default,com.minres.scviewer.database.swt@default:default,com.minres.scviewer.database.text@default:default,com.minres.scviewer.database.vcd@default:default,com.minres.scviewer.database@default:default,com.minres.scviewer.e4.application@default:default"/>
|
<stringAttribute key="selected_workspace_plugins" value="com.minres.scviewer.database.sqlite@default:default,com.minres.scviewer.database.text@default:default,com.minres.scviewer.database.ui.swt@default:default,com.minres.scviewer.database.ui@default:default,com.minres.scviewer.database.vcd@default:default,com.minres.scviewer.database@default:default,com.minres.scviewer.e4.application@default:default"/>
|
||||||
<booleanAttribute key="show_selected_only" value="false"/>
|
<booleanAttribute key="show_selected_only" value="false"/>
|
||||||
<booleanAttribute key="tracing" value="false"/>
|
<booleanAttribute key="tracing" value="false"/>
|
||||||
<booleanAttribute key="useCustomFeatures" value="false"/>
|
<booleanAttribute key="useCustomFeatures" value="false"/>
|
||||||
|
|
|
@ -38,8 +38,9 @@
|
||||||
<plugin id="com.ibm.icu"/>
|
<plugin id="com.ibm.icu"/>
|
||||||
<plugin id="com.minres.scviewer.database"/>
|
<plugin id="com.minres.scviewer.database"/>
|
||||||
<plugin id="com.minres.scviewer.database.sqlite"/>
|
<plugin id="com.minres.scviewer.database.sqlite"/>
|
||||||
<plugin id="com.minres.scviewer.database.swt"/>
|
|
||||||
<plugin id="com.minres.scviewer.database.text"/>
|
<plugin id="com.minres.scviewer.database.text"/>
|
||||||
|
<plugin id="com.minres.scviewer.database.ui"/>
|
||||||
|
<plugin id="com.minres.scviewer.database.ui.swt"/>
|
||||||
<plugin id="com.minres.scviewer.database.vcd"/>
|
<plugin id="com.minres.scviewer.database.vcd"/>
|
||||||
<plugin id="com.minres.scviewer.e4.application"/>
|
<plugin id="com.minres.scviewer.e4.application"/>
|
||||||
<plugin id="javax.annotation"/>
|
<plugin id="javax.annotation"/>
|
||||||
|
|
|
@ -45,7 +45,8 @@ http://www.eclipse.org/legal/epl-v10.html
|
||||||
<import plugin="org.eclipse.swt"/>
|
<import plugin="org.eclipse.swt"/>
|
||||||
<import plugin="org.apache.ant"/>
|
<import plugin="org.apache.ant"/>
|
||||||
<import plugin="com.google.guava" version="15.0.0" match="greaterOrEqual"/>
|
<import plugin="com.google.guava" version="15.0.0" match="greaterOrEqual"/>
|
||||||
<import plugin="com.minres.scviewer.database.swt" version="1.0.0" match="greaterOrEqual"/>
|
<import plugin="com.minres.scviewer.database.ui" version="1.0.0" match="greaterOrEqual"/>
|
||||||
|
<import plugin="com.minres.scviewer.database.ui.swt" version="1.0.0" match="greaterOrEqual"/>
|
||||||
<import plugin="org.eclipse.core.expressions" version="3.4.600" match="greaterOrEqual"/>
|
<import plugin="org.eclipse.core.expressions" version="3.4.600" match="greaterOrEqual"/>
|
||||||
<import plugin="org.eclipse.jface"/>
|
<import plugin="org.eclipse.jface"/>
|
||||||
<import plugin="org.junit"/>
|
<import plugin="org.junit"/>
|
||||||
|
@ -88,7 +89,14 @@ http://www.eclipse.org/legal/epl-v10.html
|
||||||
version="0.0.0"/>
|
version="0.0.0"/>
|
||||||
|
|
||||||
<plugin
|
<plugin
|
||||||
id="com.minres.scviewer.database.swt"
|
id="com.minres.scviewer.database.ui"
|
||||||
|
download-size="0"
|
||||||
|
install-size="0"
|
||||||
|
version="0.0.0"
|
||||||
|
unpack="false"/>
|
||||||
|
|
||||||
|
<plugin
|
||||||
|
id="com.minres.scviewer.database.ui.swt"
|
||||||
download-size="0"
|
download-size="0"
|
||||||
install-size="0"
|
install-size="0"
|
||||||
version="0.0.0"
|
version="0.0.0"
|
||||||
|
|
|
@ -11,7 +11,8 @@
|
||||||
<module>../com.minres.scviewer.database.sqlite</module>
|
<module>../com.minres.scviewer.database.sqlite</module>
|
||||||
<module>../com.minres.scviewer.database.text</module>
|
<module>../com.minres.scviewer.database.text</module>
|
||||||
<module>../com.minres.scviewer.database.vcd</module>
|
<module>../com.minres.scviewer.database.vcd</module>
|
||||||
<module>../com.minres.scviewer.database.swt</module>
|
<module>../com.minres.scviewer.database.ui</module>
|
||||||
|
<module>../com.minres.scviewer.database.ui.swt</module>
|
||||||
<module>../com.minres.scviewer.e4.application</module>
|
<module>../com.minres.scviewer.e4.application</module>
|
||||||
<module>../com.minres.scviewer.ui</module>
|
<module>../com.minres.scviewer.ui</module>
|
||||||
<module>../com.minres.scviewer.feature</module>
|
<module>../com.minres.scviewer.feature</module>
|
||||||
|
@ -21,8 +22,9 @@
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<tycho-version>0.23.1</tycho-version>
|
<tycho-version>0.23.1</tycho-version>
|
||||||
<groovy-eclipse-compiler-version>2.8.0-01</groovy-eclipse-compiler-version>
|
<tycho-extras-version>${tycho-version}</tycho-extras-version>
|
||||||
<!-- <groovy-eclipse-batch-version>2.0.5</groovy-eclipse-batch-version> -->
|
<groovy-eclipse-compiler-version>2.8.0-01</groovy-eclipse-compiler-version>
|
||||||
|
<!-- <groovy-eclipse-batch-version>2.0.5</groovy-eclipse-batch-version> -->
|
||||||
<groovy-eclipse-batch-version>2.1.8-01</groovy-eclipse-batch-version>
|
<groovy-eclipse-batch-version>2.1.8-01</groovy-eclipse-batch-version>
|
||||||
|
|
||||||
</properties>
|
</properties>
|
||||||
|
@ -82,6 +84,59 @@
|
||||||
</environments>
|
</environments>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.eclipse.tycho.extras</groupId>
|
||||||
|
<artifactId>tycho-source-feature-plugin</artifactId>
|
||||||
|
<version>${tycho-extras-version}</version>
|
||||||
|
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>source-feature</id>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>source-feature</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
|
||||||
|
<configuration>
|
||||||
|
<excludes>
|
||||||
|
<!-- provide plug-ins not containing any source code -->
|
||||||
|
<plugin id="org.codehaus.groovy" />
|
||||||
|
</excludes>
|
||||||
|
</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</groupId>
|
||||||
|
<artifactId>tycho-p2-plugin</artifactId>
|
||||||
|
<version>${tycho-version}</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>attached-p2-metadata</id>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>p2-metadata</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</project>
|
</project>
|
|
@ -6,7 +6,8 @@ Bundle-Version: 1.0.0.qualifier
|
||||||
Bundle-Activator: com.minres.scviewer.ui.TxEditorPlugin
|
Bundle-Activator: com.minres.scviewer.ui.TxEditorPlugin
|
||||||
Bundle-Vendor: MINRES Technologies GmbH
|
Bundle-Vendor: MINRES Technologies GmbH
|
||||||
Require-Bundle: com.minres.scviewer.database;bundle-version="1.0.0",
|
Require-Bundle: com.minres.scviewer.database;bundle-version="1.0.0",
|
||||||
com.minres.scviewer.database.swt;bundle-version="1.0.0",
|
com.minres.scviewer.database.ui;bundle-version="1.0.0",
|
||||||
|
com.minres.scviewer.database.ui.swt;bundle-version="1.0.0",
|
||||||
org.eclipse.core.runtime,
|
org.eclipse.core.runtime,
|
||||||
org.eclipse.core.resources,
|
org.eclipse.core.resources,
|
||||||
org.eclipse.jface.text,
|
org.eclipse.jface.text,
|
||||||
|
|
|
@ -48,8 +48,9 @@ import com.minres.scviewer.database.IWaveform;
|
||||||
import com.minres.scviewer.database.IWaveformDb;
|
import com.minres.scviewer.database.IWaveformDb;
|
||||||
import com.minres.scviewer.database.IWaveformDbFactory;
|
import com.minres.scviewer.database.IWaveformDbFactory;
|
||||||
import com.minres.scviewer.database.IWaveformEvent;
|
import com.minres.scviewer.database.IWaveformEvent;
|
||||||
import com.minres.scviewer.database.swt.GotoDirection;
|
|
||||||
import com.minres.scviewer.database.swt.TxDisplay;
|
import com.minres.scviewer.database.swt.TxDisplay;
|
||||||
|
import com.minres.scviewer.database.ui.GotoDirection;
|
||||||
|
import com.minres.scviewer.database.ui.IWaveformPanel;
|
||||||
import com.minres.scviewer.ui.views.TxOutlinePage;
|
import com.minres.scviewer.ui.views.TxOutlinePage;
|
||||||
|
|
||||||
public class TxEditorPart extends EditorPart implements ITabbedPropertySheetPageContributor {
|
public class TxEditorPart extends EditorPart implements ITabbedPropertySheetPageContributor {
|
||||||
|
@ -112,7 +113,7 @@ public class TxEditorPart extends EditorPart implements ITabbedPropertySheetPage
|
||||||
});
|
});
|
||||||
txDisplay = new TxDisplay(parent);
|
txDisplay = new TxDisplay(parent);
|
||||||
txDisplay.setMaxTime(0);
|
txDisplay.setMaxTime(0);
|
||||||
txDisplay.addPropertyChangeListener(TxDisplay.CURSOR_PROPERTY, new PropertyChangeListener() {
|
txDisplay.addPropertyChangeListener(IWaveformPanel.CURSOR_PROPERTY, new PropertyChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void propertyChange(PropertyChangeEvent evt) {
|
public void propertyChange(PropertyChangeEvent evt) {
|
||||||
Long time = (Long) evt.getNewValue();
|
Long time = (Long) evt.getNewValue();
|
||||||
|
|
|
@ -16,7 +16,7 @@ import org.eclipse.core.commands.ExecutionException;
|
||||||
import org.eclipse.ui.IEditorPart;
|
import org.eclipse.ui.IEditorPart;
|
||||||
import org.eclipse.ui.handlers.HandlerUtil;
|
import org.eclipse.ui.handlers.HandlerUtil;
|
||||||
|
|
||||||
import com.minres.scviewer.database.swt.GotoDirection;
|
import com.minres.scviewer.database.ui.GotoDirection;
|
||||||
import com.minres.scviewer.ui.TxEditorPart;
|
import com.minres.scviewer.ui.TxEditorPart;
|
||||||
|
|
||||||
public class GotoNext extends AbstractHandler {
|
public class GotoNext extends AbstractHandler {
|
||||||
|
|
|
@ -16,7 +16,7 @@ import org.eclipse.core.commands.ExecutionException;
|
||||||
import org.eclipse.ui.IEditorPart;
|
import org.eclipse.ui.IEditorPart;
|
||||||
import org.eclipse.ui.handlers.HandlerUtil;
|
import org.eclipse.ui.handlers.HandlerUtil;
|
||||||
|
|
||||||
import com.minres.scviewer.database.swt.GotoDirection;
|
import com.minres.scviewer.database.ui.GotoDirection;
|
||||||
import com.minres.scviewer.ui.TxEditorPart;
|
import com.minres.scviewer.ui.TxEditorPart;
|
||||||
|
|
||||||
public class GotoPrev extends AbstractHandler {
|
public class GotoPrev extends AbstractHandler {
|
||||||
|
|
|
@ -17,6 +17,4 @@
|
||||||
</resource>
|
</resource>
|
||||||
</resources>
|
</resources>
|
||||||
</build> -->
|
</build> -->
|
||||||
<groupId>com.minres.scviewer</groupId>
|
</project>
|
||||||
<version>1.0.0-SNAPSHOT</version>
|
|
||||||
</project>
|
|
Loading…
Reference in New Issue