Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
79eb8073d8 | |||
4ea841cc7b | |||
6bf642d2af | |||
15c24f0925 | |||
4d4a6579c6 | |||
b648dccfd8 | |||
f9425834a3 | |||
e0d00e6402 | |||
b1b7517759 |
@ -1,2 +0,0 @@
|
|||||||
eclipse.preferences.version=1
|
|
||||||
encoding/<project>=UTF-8
|
|
@ -2,6 +2,10 @@
|
|||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||||
<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/">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="test" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
<classpathentry kind="output" path="target/classes"/>
|
<classpathentry kind="output" path="target/classes"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
eclipse.preferences.version=1
|
|
||||||
encoding//src/com/minres/scviewer/database/test/DatabaseServicesTest.java=UTF-8
|
|
||||||
encoding/<project>=UTF-8
|
|
@ -1,19 +1,22 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry exported="true" kind="lib" path="lib/elsa-3.0.0-M5.jar"/>
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
||||||
<classpathentry exported="true" kind="lib" path="lib/eclipse-collections-9.2.0.jar"/>
|
<attributes>
|
||||||
<classpathentry exported="true" kind="lib" path="lib/eclipse-collections-api-9.2.0.jar"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
<classpathentry exported="true" kind="lib" path="lib/eclipse-collections-forkjoin-9.2.0.jar"/>
|
</attributes>
|
||||||
<classpathentry exported="true" kind="lib" path="lib/kotlin-stdlib-1.2.42.jar"/>
|
</classpathentry>
|
||||||
<classpathentry exported="true" kind="lib" path="lib/lz4-1.3.0.jar"/>
|
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||||
<classpathentry exported="true" kind="lib" path="lib/mapdb-3.0.7.jar" sourcepath="lib/mapdb-3.0.7-sources.jar">
|
<classpathentry exported="true" kind="lib" path="lib/mapdb-3.0.7.jar" sourcepath="lib/mapdb-3.0.7-sources.jar">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="javadoc_location" value="jar:platform:/resource/com.minres.scviewer.database.text/lib/mapdb-3.0.7-javadoc.jar!/"/>
|
<attribute name="javadoc_location" value="jar:platform:/resource/com.minres.scviewer.database.text/lib/mapdb-3.0.7-javadoc.jar!/"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
<classpathentry kind="src" path="src/"/>
|
||||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
<classpathentry exported="true" kind="lib" path="lib/eclipse-collections-9.2.0.jar"/>
|
||||||
<classpathentry kind="src" path="src"/>
|
<classpathentry exported="true" kind="lib" path="lib/eclipse-collections-api-9.2.0.jar"/>
|
||||||
<classpathentry exported="true" kind="con" path="GROOVY_DSL_SUPPORT"/>
|
<classpathentry exported="true" kind="lib" path="lib/eclipse-collections-forkjoin-9.2.0.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="lib/kotlin-stdlib-1.2.42.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="lib/lz4-1.3.0.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="lib/elsa-3.0.0-M5.jar"/>
|
||||||
<classpathentry kind="output" path="target/classes"/>
|
<classpathentry kind="output" path="target/classes"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
@ -5,4 +5,5 @@ org.eclipse.jdt.core.compiler.compliance=1.8
|
|||||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||||
|
org.eclipse.jdt.core.compiler.release=disabled
|
||||||
org.eclipse.jdt.core.compiler.source=1.8
|
org.eclipse.jdt.core.compiler.source=1.8
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
eclipse.preferences.version=1
|
|
||||||
encoding/<project>=UTF-8
|
|
@ -44,6 +44,20 @@ public class StreamPainter extends TrackPainter{
|
|||||||
this.stream=trackEntry.getStream();
|
this.stream=trackEntry.getStream();
|
||||||
this.seenTx=new TreeSet<ITx>();
|
this.seenTx=new TreeSet<ITx>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* convert java.awt.Color to org.eclipse.swt.graphics.Color
|
||||||
|
*/
|
||||||
|
static org.eclipse.swt.graphics.Color toSwtColor( GC gc, java.awt.Color awtColor ){
|
||||||
|
return new org.eclipse.swt.graphics.Color( gc.getDevice(), awtColor.getRed(), awtColor.getGreen(), awtColor.getBlue() );
|
||||||
|
}
|
||||||
|
|
||||||
|
static org.eclipse.swt.graphics.Color[] toSwtColors( GC gc, java.awt.Color[] awtColors ){
|
||||||
|
org.eclipse.swt.graphics.Color[] swtColors = new org.eclipse.swt.graphics.Color[awtColors.length];
|
||||||
|
for( int i=0; i<awtColors.length; i++ )
|
||||||
|
swtColors[i] = toSwtColor( gc, awtColors[i] );
|
||||||
|
return swtColors;
|
||||||
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public void paintArea(GC gc, Rectangle area) {
|
public void paintArea(GC gc, Rectangle area) {
|
||||||
@ -51,8 +65,9 @@ public class StreamPainter extends TrackPainter{
|
|||||||
int trackHeight=trackEntry.height/stream.getMaxConcurrency();
|
int trackHeight=trackEntry.height/stream.getMaxConcurrency();
|
||||||
txBase=trackHeight/5;
|
txBase=trackHeight/5;
|
||||||
txHeight=trackHeight*3/5;
|
txHeight=trackHeight*3/5;
|
||||||
if(trackEntry.selected)
|
if(trackEntry.selected) {
|
||||||
gc.setBackground(this.waveCanvas.colors[WaveformColors.TRACK_BG_HIGHLITE.ordinal()]);
|
gc.setBackground(this.waveCanvas.colors[WaveformColors.TRACK_BG_HIGHLITE.ordinal()]);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
gc.setBackground(this.waveCanvas.colors[even?WaveformColors.TRACK_BG_EVEN.ordinal():WaveformColors.TRACK_BG_ODD.ordinal()]);
|
gc.setBackground(this.waveCanvas.colors[even?WaveformColors.TRACK_BG_EVEN.ordinal():WaveformColors.TRACK_BG_ODD.ordinal()]);
|
||||||
gc.setFillRule(SWT.FILL_EVEN_ODD);
|
gc.setFillRule(SWT.FILL_EVEN_ODD);
|
||||||
@ -61,7 +76,7 @@ public class StreamPainter extends TrackPainter{
|
|||||||
long scaleFactor = this.waveCanvas.getScaleFactor();
|
long scaleFactor = this.waveCanvas.getScaleFactor();
|
||||||
long beginPos = area.x;
|
long beginPos = area.x;
|
||||||
long beginTime = (beginPos + waveCanvas.getXOffset())*scaleFactor;
|
long beginTime = (beginPos + waveCanvas.getXOffset())*scaleFactor;
|
||||||
long endPos = beginPos + area.width;
|
//long endPos = beginPos + area.width;
|
||||||
long endTime = beginTime + area.width*scaleFactor;
|
long endTime = beginTime + area.width*scaleFactor;
|
||||||
|
|
||||||
Entry<Long, ?> firstTx=stream.getEvents().floorEntry(beginTime);
|
Entry<Long, ?> firstTx=stream.getEvents().floorEntry(beginTime);
|
||||||
@ -75,38 +90,43 @@ public class StreamPainter extends TrackPainter{
|
|||||||
|
|
||||||
for( int y1=area.y+trackHeight/2; y1<area.y+trackEntry.height; y1+=trackHeight)
|
for( int y1=area.y+trackHeight/2; y1<area.y+trackEntry.height; y1+=trackHeight)
|
||||||
gc.drawLine(area.x, y1, area.x+area.width, y1);
|
gc.drawLine(area.x, y1, area.x+area.width, y1);
|
||||||
if(firstTx==lastTx)
|
if(firstTx==lastTx) {
|
||||||
for(ITxEvent txEvent:(Collection<? extends ITxEvent>)firstTx.getValue())
|
for(ITxEvent txEvent:(Collection<? extends ITxEvent>)firstTx.getValue())
|
||||||
drawTx(gc, area, txEvent.getTransaction());
|
drawTx(gc, area, txEvent.getTransaction(), false);
|
||||||
else{
|
}else{
|
||||||
seenTx.clear();
|
seenTx.clear();
|
||||||
NavigableMap<Long,?> entries = stream.getEvents().subMap(firstTx.getKey(), true, lastTx.getKey(), true);
|
NavigableMap<Long,?> entries = stream.getEvents().subMap(firstTx.getKey(), true, lastTx.getKey(), true);
|
||||||
boolean highlighed=false;
|
boolean highlighed=false;
|
||||||
gc.setForeground(this.waveCanvas.colors[WaveformColors.LINE.ordinal()]);
|
gc.setForeground(this.waveCanvas.colors[WaveformColors.LINE.ordinal()]);
|
||||||
gc.setBackground(this.waveCanvas.colors[WaveformColors.TX_BG.ordinal()]);
|
|
||||||
for(Entry<Long, ?> entry: entries.entrySet())
|
for(Entry<Long, ?> entry: entries.entrySet())
|
||||||
for(ITxEvent txEvent:(Collection<? extends ITxEvent>)entry.getValue()){
|
for(ITxEvent txEvent:(Collection<? extends ITxEvent>)entry.getValue()){
|
||||||
if(txEvent.getType()==ITxEvent.Type.BEGIN)
|
if(txEvent.getType()==ITxEvent.Type.BEGIN)
|
||||||
seenTx.add(txEvent.getTransaction());
|
seenTx.add(txEvent.getTransaction());
|
||||||
if(txEvent.getType()==ITxEvent.Type.END){
|
if(txEvent.getType()==ITxEvent.Type.END){
|
||||||
ITx tx = txEvent.getTransaction();
|
ITx tx = txEvent.getTransaction();
|
||||||
highlighed|=waveCanvas.currentSelection!=null && waveCanvas.currentSelection.equals(tx);
|
highlighed|=waveCanvas.currentSelection!=null && waveCanvas.currentSelection.equals(tx);
|
||||||
drawTx(gc, area, tx);
|
drawTx(gc, area, tx, false);
|
||||||
seenTx.remove(tx);
|
seenTx.remove(tx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for(ITx tx:seenTx){
|
for(ITx tx:seenTx){
|
||||||
drawTx(gc, area, tx);
|
drawTx(gc, area, tx, false);
|
||||||
}
|
}
|
||||||
if(highlighed){
|
if(highlighed){
|
||||||
gc.setForeground(this.waveCanvas.colors[WaveformColors.LINE_HIGHLITE.ordinal()]);
|
gc.setForeground(this.waveCanvas.colors[WaveformColors.LINE_HIGHLITE.ordinal()]);
|
||||||
gc.setBackground(this.waveCanvas.colors[WaveformColors.TX_BG_HIGHLITE.ordinal()]);
|
drawTx(gc, area, waveCanvas.currentSelection, true);
|
||||||
drawTx(gc, area, waveCanvas.currentSelection);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void drawTx(GC gc, Rectangle area, ITx tx) {
|
protected void drawTx(GC gc, Rectangle area, ITx tx, boolean highlighted ) {
|
||||||
|
// compute colors
|
||||||
|
java.awt.Color[] fallbackColors = trackEntry.getColors();
|
||||||
|
java.awt.Color[] transColor = TrackEntry.computeColor( tx.getGenerator().getName(), fallbackColors[0], fallbackColors[1] );
|
||||||
|
|
||||||
|
gc.setBackground( toSwtColor( gc, transColor[highlighted?1:0] ) );
|
||||||
|
|
||||||
int offset = tx.getConcurrencyIndex()*this.waveCanvas.getTrackHeight();
|
int offset = tx.getConcurrencyIndex()*this.waveCanvas.getTrackHeight();
|
||||||
Rectangle bb = new Rectangle(
|
Rectangle bb = new Rectangle(
|
||||||
(int)(tx.getBeginTime()/this.waveCanvas.getScaleFactor()-waveCanvas.getXOffset()), area.y+offset+txBase,
|
(int)(tx.getBeginTime()/this.waveCanvas.getScaleFactor()-waveCanvas.getXOffset()), area.y+offset+txBase,
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package com.minres.scviewer.database.swt.internal;
|
package com.minres.scviewer.database.swt.internal;
|
||||||
|
|
||||||
|
import java.awt.Color;
|
||||||
import java.beans.PropertyChangeEvent;
|
import java.beans.PropertyChangeEvent;
|
||||||
import java.beans.PropertyChangeListener;
|
import java.beans.PropertyChangeListener;
|
||||||
import java.beans.PropertyChangeSupport;
|
import java.beans.PropertyChangeSupport;
|
||||||
@ -485,13 +486,15 @@ public class WaveformViewer implements IWaveformViewer {
|
|||||||
resultsList[tx.getConcurrencyIndex()]= evt.getTransaction();
|
resultsList[tx.getConcurrencyIndex()]= evt.getTransaction();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
firstTx=stream.getEvents().lowerEntry(firstTx.getKey());
|
firstTx=stream.getEvents().lowerEntry(firstTx.getKey());
|
||||||
}while(firstTx!=null && !isArrayFull(resultsList));
|
}while(firstTx!=null && !isArrayFull(resultsList));
|
||||||
entry.currentValue="";
|
entry.currentValue="";
|
||||||
boolean separator=false;
|
boolean separator=false;
|
||||||
|
|
||||||
for(ITx o:resultsList){
|
for(ITx o:resultsList){
|
||||||
if(separator) entry.currentValue+="|";
|
if(separator) entry.currentValue+="|";
|
||||||
if(o!=null) entry.currentValue+=((ITx)o).getGenerator().getName();
|
if(o!=null) entry.currentValue+=((ITx)o).getGenerator().getName();
|
||||||
|
|
||||||
separator=true;
|
separator=true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -502,7 +505,8 @@ public class WaveformViewer implements IWaveformViewer {
|
|||||||
valueListScrolled.setMinSize(width, trackVerticalHeight);
|
valueListScrolled.setMinSize(width, trackVerticalHeight);
|
||||||
valueListScrolled.redraw();
|
valueListScrolled.redraw();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private boolean isArrayFull(Object[] array){
|
private boolean isArrayFull(Object[] array){
|
||||||
for(Object o:array){
|
for(Object o:array){
|
||||||
if(o==null) return false;
|
if(o==null) return false;
|
||||||
@ -600,6 +604,9 @@ public class WaveformViewer implements IWaveformViewer {
|
|||||||
TrackEntry trackEntry = getEntryForStream(txSel.getStream());
|
TrackEntry trackEntry = getEntryForStream(txSel.getStream());
|
||||||
if(trackEntry==null && addIfNeeded){
|
if(trackEntry==null && addIfNeeded){
|
||||||
trackEntry=new TrackEntry(txSel.getStream());
|
trackEntry=new TrackEntry(txSel.getStream());
|
||||||
|
// compute fallback colors
|
||||||
|
Color fallbackColors[] = TrackEntry.computeColor(txSel.getStream().getName(), TrackEntry.fallbackColor, TrackEntry.highlightedFallbackColor);
|
||||||
|
trackEntry.setColor(fallbackColors[0], fallbackColors[1]);
|
||||||
streams.add(trackEntry);
|
streams.add(trackEntry);
|
||||||
}
|
}
|
||||||
currentTxSelection = txSel;
|
currentTxSelection = txSel;
|
||||||
|
@ -10,13 +10,87 @@
|
|||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package com.minres.scviewer.database.ui;
|
package com.minres.scviewer.database.ui;
|
||||||
|
|
||||||
|
|
||||||
|
import java.awt.Color;
|
||||||
|
|
||||||
import com.minres.scviewer.database.ISignal;
|
import com.minres.scviewer.database.ISignal;
|
||||||
import com.minres.scviewer.database.ITxEvent;
|
import com.minres.scviewer.database.ITxEvent;
|
||||||
import com.minres.scviewer.database.ITxStream;
|
import com.minres.scviewer.database.ITxStream;
|
||||||
import com.minres.scviewer.database.IWaveform;
|
import com.minres.scviewer.database.IWaveform;
|
||||||
|
|
||||||
|
|
||||||
public class TrackEntry {
|
public class TrackEntry {
|
||||||
|
|
||||||
|
// color info
|
||||||
|
public static Color fallbackColor = new Color(200,0,0);
|
||||||
|
public static Color highlightedFallbackColor = new Color(255,0,0);
|
||||||
|
private Color[]signalColors;
|
||||||
|
|
||||||
|
// list of random colors
|
||||||
|
private static Color[][] randomColors = {
|
||||||
|
{ new Color( 170, 66, 37 ), new Color ( 190, 66, 37 ) },
|
||||||
|
{ new Color( 96, 74, 110 ), new Color ( 96, 74, 130 ) },
|
||||||
|
{ new Color( 133, 105, 128 ), new Color ( 153, 105, 128 ) },
|
||||||
|
{ new Color( 0, 126, 135 ), new Color ( 0, 126, 155 ) },
|
||||||
|
{ new Color( 243, 146, 75 ), new Color ( 255, 146, 75 ) },
|
||||||
|
{ new Color( 206, 135, 163 ), new Color ( 226, 135, 163 ) },
|
||||||
|
{ new Color( 124, 103, 74 ), new Color ( 144, 103, 74 ) },
|
||||||
|
{ new Color( 194, 187, 169 ), new Color ( 214, 187, 169 ) },
|
||||||
|
{ new Color( 104, 73, 71 ), new Color ( 124, 73, 71 ) },
|
||||||
|
{ new Color( 75, 196, 213 ), new Color ( 75, 196, 233 ) },
|
||||||
|
{ new Color( 206, 232, 229 ), new Color ( 206, 252, 229 ) },
|
||||||
|
{ new Color( 169, 221, 199 ), new Color ( 169, 241, 199 ) },
|
||||||
|
{ new Color( 100, 165, 197 ), new Color ( 100, 165, 217 ) },
|
||||||
|
{ new Color( 150, 147, 178 ), new Color ( 150, 147, 198 ) },
|
||||||
|
{ new Color( 200, 222, 182 ), new Color ( 200, 242, 182 ) },
|
||||||
|
{ new Color( 147, 208, 197 ), new Color ( 147, 228, 197 ) }
|
||||||
|
};
|
||||||
|
|
||||||
|
public static Color[] computeColor (String streamValue, Color fallback, Color highlightedFallback) {
|
||||||
|
|
||||||
|
Color[]result = new Color[2];
|
||||||
|
|
||||||
|
result[0] = fallback;
|
||||||
|
result[1] = highlightedFallback;
|
||||||
|
|
||||||
|
// assign colors to standard values
|
||||||
|
if (streamValue.contains("read")){
|
||||||
|
result[0] = new Color(86,174,53);
|
||||||
|
result[1] = new Color (86,194,53);
|
||||||
|
}else if (streamValue.contains("rdata")){
|
||||||
|
result[0] = new Color(138,151,71);
|
||||||
|
result[1] = new Color (138,171,71);
|
||||||
|
}else if (streamValue.contains("addr")){
|
||||||
|
result[0] = new Color(233,187,68);
|
||||||
|
result[1] = new Color (233,207,68);
|
||||||
|
}else if (streamValue.contains("write")){
|
||||||
|
result[0] = new Color(1,128,191);
|
||||||
|
result[1] = new Color (1,128,211);
|
||||||
|
}else if (streamValue.contains("wdata")){
|
||||||
|
result[0] = new Color(2,181,160);
|
||||||
|
result[1] = new Color (2,201,160);
|
||||||
|
|
||||||
|
}else {
|
||||||
|
// assign "random" color here, one name always results in the same color!
|
||||||
|
if( randomColors.length > 0 ) {
|
||||||
|
int index = streamValue.hashCode() % randomColors.length;
|
||||||
|
result[0] = randomColors[index][0];
|
||||||
|
result[1] = randomColors[index][1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setColor(Color changedColor, Color highlightColor) {
|
||||||
|
signalColors[0] = changedColor;
|
||||||
|
signalColors[1] = highlightColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Color[] getColors() {
|
||||||
|
return signalColors;
|
||||||
|
}
|
||||||
|
|
||||||
public enum ValueDisplay {
|
public enum ValueDisplay {
|
||||||
DEFAULT, SIGNED, UNSIGNED
|
DEFAULT, SIGNED, UNSIGNED
|
||||||
|
|
||||||
@ -45,6 +119,9 @@ public class TrackEntry {
|
|||||||
vOffset=0;
|
vOffset=0;
|
||||||
height=0;
|
height=0;
|
||||||
selected=false;
|
selected=false;
|
||||||
|
signalColors = new Color[2];
|
||||||
|
signalColors[0] = fallbackColor;
|
||||||
|
signalColors[1] = highlightedFallbackColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isStream(){
|
public boolean isStream(){
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
eclipse.preferences.version=1
|
|
||||||
encoding/<project>=UTF-8
|
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
|
||||||
<classpathentry kind="src" path="src"/>
|
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||||
|
<classpathentry kind="src" path="src/"/>
|
||||||
<classpathentry kind="output" path="target/classes"/>
|
<classpathentry kind="output" path="target/classes"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
eclipse.preferences.version=1
|
|
||||||
encoding/<project>=UTF-8
|
|
@ -76,6 +76,7 @@ public class BitVector {
|
|||||||
for(int i=resWidth-1; i>=0; i--){
|
for(int i=resWidth-1; i>=0; i--){
|
||||||
int digit=0;
|
int digit=0;
|
||||||
for(int j=3; j>=0; j--){
|
for(int j=3; j>=0; j--){
|
||||||
|
if((4*i+j)>=value.length) continue;
|
||||||
BitValue val = BitValue.fromChar(value[4*i+j]);
|
BitValue val = BitValue.fromChar(value[4*i+j]);
|
||||||
switch(val) {
|
switch(val) {
|
||||||
case X:
|
case X:
|
||||||
|
@ -3,5 +3,5 @@
|
|||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||||
<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 kind="output" path="bin"/>
|
<classpathentry kind="output" path="target/classes"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
@ -26,7 +26,9 @@
|
|||||||
</menus>
|
</menus>
|
||||||
</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">
|
||||||
|
<tags>NoAutoCollapse</tags>
|
||||||
|
</children>
|
||||||
<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 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>
|
||||||
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
|||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: %Bundle-Name
|
Bundle-Name: %Bundle-Name
|
||||||
Bundle-SymbolicName: com.minres.scviewer.e4.application;singleton:=true
|
Bundle-SymbolicName: com.minres.scviewer.e4.application;singleton:=true
|
||||||
Bundle-Version: 2.0.5.qualifier
|
Bundle-Version: 2.1.1.qualifier
|
||||||
Bundle-Vendor: %Bundle-Vendor
|
Bundle-Vendor: %Bundle-Vendor
|
||||||
Require-Bundle: javax.inject;bundle-version="1.0.0",
|
Require-Bundle: javax.inject;bundle-version="1.0.0",
|
||||||
org.eclipse.core.runtime;bundle-version="3.11.1",
|
org.eclipse.core.runtime;bundle-version="3.11.1",
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<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.e4.application</artifactId>
|
<artifactId>com.minres.scviewer.e4.application</artifactId>
|
||||||
<version>2.0.5-SNAPSHOT</version>
|
<version>2.1.1-SNAPSHOT</version>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.minres.scviewer</groupId>
|
<groupId>com.minres.scviewer</groupId>
|
||||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||||
|
@ -40,13 +40,16 @@ public class AddWaveformHandler {
|
|||||||
@Named(IServiceConstants.ACTIVE_SELECTION) @Optional IStructuredSelection selection) {
|
@Named(IServiceConstants.ACTIVE_SELECTION) @Optional IStructuredSelection selection) {
|
||||||
if(designBrowser==null) designBrowser = getListPart( partService);
|
if(designBrowser==null) designBrowser = getListPart( partService);
|
||||||
if(designBrowser==null || designBrowser.getActiveWaveformViewerPart()==null) return false;
|
if(designBrowser==null || designBrowser.getActiveWaveformViewerPart()==null) return false;
|
||||||
Boolean before = "before".equalsIgnoreCase(where); //$NON-NLS-1$
|
boolean before = "before".equalsIgnoreCase(where); //$NON-NLS-1$
|
||||||
|
IStructuredSelection waveformSelection = null;
|
||||||
|
if(designBrowser.getActiveWaveformViewerPart()!=null)
|
||||||
|
waveformSelection = (IStructuredSelection)designBrowser.getActiveWaveformViewerPart().getSelection();
|
||||||
if("true".equalsIgnoreCase(all)) //$NON-NLS-1$
|
if("true".equalsIgnoreCase(all)) //$NON-NLS-1$
|
||||||
return designBrowser.getFilteredChildren().length>0 &&
|
return designBrowser.getFilteredChildren().length>0 &&
|
||||||
(!before || ((IStructuredSelection)designBrowser.getActiveWaveformViewerPart().getSelection()).size()>0);
|
(!before || (waveformSelection!=null && waveformSelection.size()>0));
|
||||||
else
|
else
|
||||||
return selection.size()>0 &&
|
return selection!=null && selection.size()>0 &&
|
||||||
(!before || ((IStructuredSelection)designBrowser.getActiveWaveformViewerPart().getSelection()).size()>0);
|
(!before || (waveformSelection!=null && waveformSelection.size()>0));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Execute
|
@Execute
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
AboutDialog_0=\nSCViewer - a SystemC waveform viewer\n\nVersion: {0}\n
|
AboutDialog_0=\nSCViewer - a SystemC waveform viewer\n\nVersion: {0}\n
|
||||||
AboutDialog_1=\nCopyright (c) 2015, 2019 MINRES Technologies GmbH and others.\n\nAll rights reserved. MINRES and the MINRES logo are trademarks of MINRES Technologies GmbH, http://www.minres.com/. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html\n\nParts of the software are governed by the Apache License Version 2.0 available at http://www.apache.org/licenses/. These are namely org.mapdb and org.sqlite JDBC driver\n\nSource code is hosted at https://git.minres.com/VP/SCViewer and the master branch is mirrored to GitHub: https://git.com/minres/SCViewer\n
|
AboutDialog_1=\nCopyright (c) 2015, 2019 MINRES Technologies GmbH and others.\n\nAll rights reserved. MINRES and the MINRES logo are trademarks of MINRES Technologies GmbH, http://www.minres.com/. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html\n\nParts of the software are governed by the Apache License Version 2.0 available at http://www.apache.org/licenses/. These are namely org.mapdb and org.sqlite JDBC driver\n\nSource code is hosted at https://git.minres.com/VP-Tools/SCViewer and the master branch is mirrored to GitHub: https://github.com/minres/SCViewer\n
|
||||||
DesignBrowser_12=Append all after
|
DesignBrowser_12=Append all after
|
||||||
DesignBrowser_16=Insert all before
|
DesignBrowser_16=Insert all before
|
||||||
DesignBrowser_2=Enter text to filter waveforms
|
DesignBrowser_2=Enter text to filter waveforms
|
||||||
|
@ -139,7 +139,7 @@ public class AboutDialog extends Dialog {
|
|||||||
// links are activated on mouse down when the control key is held down
|
// links are activated on mouse down when the control key is held down
|
||||||
// if ((event.stateMask & SWT.MOD1) != 0) {
|
// if ((event.stateMask & SWT.MOD1) != 0) {
|
||||||
try {
|
try {
|
||||||
int offset = ((StyledText)event.widget).getOffsetAtPoint(new Point (event.x, event.y));
|
int offset = ((StyledText)event.widget).getOffsetAtLocation(new Point (event.x, event.y));
|
||||||
StyleRange style = ((StyledText)event.widget).getStyleRangeAtOffset(offset);
|
StyleRange style = ((StyledText)event.widget).getStyleRangeAtOffset(offset);
|
||||||
if (style != null && style.underline && style.underlineStyle == SWT.UNDERLINE_LINK) {
|
if (style != null && style.underline && style.underlineStyle == SWT.UNDERLINE_LINK) {
|
||||||
Desktop.getDesktop().browse(new java.net.URI(style.data.toString()));
|
Desktop.getDesktop().browse(new java.net.URI(style.data.toString()));
|
||||||
|
@ -826,14 +826,26 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
|||||||
List<TrackEntry> streams = waveformPane.getStreamList();
|
List<TrackEntry> streams = waveformPane.getStreamList();
|
||||||
ISelection sel = waveformPane.getSelection();
|
ISelection sel = waveformPane.getSelection();
|
||||||
TrackEntry newSelection=null;
|
TrackEntry newSelection=null;
|
||||||
|
|
||||||
if(sel instanceof IStructuredSelection && ((IStructuredSelection) sel).size()==2) {
|
if(sel instanceof IStructuredSelection && ((IStructuredSelection) sel).size()==2) {
|
||||||
Iterator<?> it = ((IStructuredSelection)sel).iterator();
|
Iterator<?> it = ((IStructuredSelection)sel).iterator();
|
||||||
it.next();
|
it.next();
|
||||||
int idx = streams.indexOf(it.next());
|
int idx = streams.indexOf(it.next());
|
||||||
if(idx==streams.size()-1)
|
|
||||||
newSelection=streams.get(idx-1);
|
if(idx==streams.size()-1) {
|
||||||
else
|
//last stream gets deleted, no more selection
|
||||||
|
if(idx==0) {
|
||||||
|
newSelection=null;
|
||||||
|
}
|
||||||
|
//more than 1 stream left, last gets deleted, selection jumps to new last stream
|
||||||
|
else {
|
||||||
|
newSelection=streams.get(idx-1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//more than 1 stream left, any stream but the last gets deleted, selection jumps to the next stream
|
||||||
|
else {
|
||||||
newSelection=streams.get(idx+1);
|
newSelection=streams.get(idx+1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
waveformPane.setSelection(new StructuredSelection());
|
waveformPane.setSelection(new StructuredSelection());
|
||||||
streams.remove(trackEntry);
|
streams.remove(trackEntry);
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
<relativePath>../com.minres.scviewer.parent</relativePath>
|
<relativePath>../com.minres.scviewer.parent</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>com.minres.scviewer.e4.product</artifactId>
|
<artifactId>com.minres.scviewer.e4.product</artifactId>
|
||||||
<version>2.0.5-SNAPSHOT</version>
|
<version>2.1.1-SNAPSHOT</version>
|
||||||
<packaging>eclipse-repository</packaging>
|
<packaging>eclipse-repository</packaging>
|
||||||
<groupId>com.minres.scviewer</groupId>
|
<groupId>com.minres.scviewer</groupId>
|
||||||
<build>
|
<build>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<?pde version="3.5"?>
|
<?pde version="3.5"?>
|
||||||
|
|
||||||
<product name="SCViewer" uid="scviewer" id="com.minres.scviewer.e4.application.product" application="org.eclipse.e4.ui.workbench.swt.E4Application" version="2.0.5.qualifier" useFeatures="false" includeLaunchers="true">
|
<product name="SCViewer" uid="scviewer" id="com.minres.scviewer.e4.application.product" application="org.eclipse.e4.ui.workbench.swt.E4Application" version="2.1.1.qualifier" useFeatures="false" includeLaunchers="true">
|
||||||
|
|
||||||
<configIni use="default">
|
<configIni use="default">
|
||||||
</configIni>
|
</configIni>
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
eclipse.preferences.version=1
|
|
||||||
encoding/<project>=UTF-8
|
|
@ -2,7 +2,6 @@
|
|||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||||
<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="con" path="GROOVY_DSL_SUPPORT"/>
|
|
||||||
<classpathentry kind="output" path="target/classes"/>
|
<classpathentry kind="output" path="target/classes"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
eclipse.preferences.version=1
|
|
||||||
encoding/<project>=UTF-8
|
|
@ -1,2 +0,0 @@
|
|||||||
eclipse.preferences.version=1
|
|
||||||
encoding/<project>=UTF-8
|
|
Reference in New Issue
Block a user