fix some bugs

* NPE when stream contains no transactions and hence no attributes
* changed sash hierarchy in waveform pane
This commit is contained in:
Eyck Jentzsch 2020-11-24 16:20:08 +01:00
parent 184f1b2d2c
commit ded10e1c22
9 changed files with 27 additions and 20 deletions

View File

@ -27,6 +27,10 @@
<unit id="org.eclipse.nebula.widgets.nattable.extension.glazedlists.feature.feature.group" version="1.6.0.201909181823"/>
<unit id="org.eclipse.nebula.widgets.nattable.extension.poi.feature.feature.group" version="1.5.1.201909181823"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<repository location="http://download.eclipse.org/nebula/releases/latest"/>
<unit id="org.eclipse.nebula.widgets.xviewer.feature.feature.group" version="1.1.0.202011020719"/>
</location>
</locations>
<targetJRE path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<launcherArgs>

View File

@ -336,15 +336,19 @@ public class WaveformView implements IWaveformView {
SashForm topSash = new SashForm(top, SWT.SMOOTH);
topSash.setBackground(topSash.getDisplay().getSystemColor(SWT.COLOR_GRAY));
Composite composite = new Composite(topSash, SWT.NONE);
composite.setLayout(new FillLayout(SWT.HORIZONTAL));
Composite namePane = new Composite(topSash, SWT.NONE);
Composite rightPane = new Composite(topSash, SWT.NONE);
rightPane.setLayout(new FillLayout(SWT.HORIZONTAL));
waveformCanvas = new WaveformCanvas(topSash, SWT.NONE);
SashForm rightSash = new SashForm(rightPane, SWT.SMOOTH);
rightSash.setBackground(SWTResourceManager.getColor(SWT.COLOR_GRAY));
SashForm leftSash = new SashForm(composite, SWT.SMOOTH);
leftSash.setBackground(SWTResourceManager.getColor(SWT.COLOR_GRAY));
Composite valuePane = new Composite(rightSash, SWT.NONE);
waveformCanvas = new WaveformCanvas(rightSash, SWT.NONE);
Composite namePane = createTextPane(leftSash, "Name");
// create the name pane
createTextPane(namePane, "Name");
namePaneHeader= namePane.getChildren()[0];
namePane.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND));
@ -380,7 +384,8 @@ public class WaveformView implements IWaveformView {
nameList.addMouseListener(nameValueMouseListener);
nameListScrolled.setContent(nameList);
Composite valuePane = createTextPane(leftSash, "Value");
createTextPane(valuePane, "Value");
valuePane.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND));
valueListScrolled = new ScrolledComposite(valuePane, SWT.H_SCROLL | SWT.V_SCROLL);
valueListScrolled.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
@ -445,8 +450,8 @@ public class WaveformView implements IWaveformView {
valueListScrolled.setOrigin(valueListScrolled.getOrigin().x, y);
}
});
topSash.setWeights(new int[] { 30, 70 });
leftSash.setWeights(new int[] { 75, 25 });
topSash.setWeights(new int[] { 25, 75 });
rightSash.setWeights(new int[] { 10, 90 });
createStreamDragSource(nameList);
createStreamDragSource(valueList);
@ -459,8 +464,7 @@ public class WaveformView implements IWaveformView {
toolTipHandler.activateHoverHelp(waveformCanvas);
}
private Composite createTextPane(SashForm leftSash, String text) {
Composite namePane = new Composite(leftSash, SWT.NONE);
private void createTextPane(Composite namePane, String text) {
GridLayout gl_namePane = new GridLayout(1, false);
gl_namePane.verticalSpacing = 0;
gl_namePane.marginWidth = 0;
@ -480,7 +484,6 @@ public class WaveformView implements IWaveformView {
GridData gd_nameSep = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);
gd_nameSep.heightHint = 2;
nameSep.setLayoutData(gd_nameSep);
return namePane;
}
@Override

View File

@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: com.minres.scviewer.e4.application;singleton:=true
Bundle-Version: 2.9.2.qualifier
Bundle-Version: 2.9.3.qualifier
Bundle-Vendor: %Bundle-Vendor
Require-Bundle: javax.inject;bundle-version="1.0.0",
org.eclipse.core.runtime;bundle-version="3.11.1",

View File

@ -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">
<modelVersion>4.0.0</modelVersion>
<artifactId>com.minres.scviewer.e4.application</artifactId>
<version>2.9.2-SNAPSHOT</version>
<version>2.9.3-SNAPSHOT</version>
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>

View File

@ -273,8 +273,8 @@ public class TransactionList extends Composite {
tableViewer.setInput(eventList);
attrNames.clear();
attrNames.addAll(getEntries());
searchPropComboViewer.getCombo().select(0);
txFilter.setSearchProp(attrNames.get(0).getName(), attrNames.get(0).getType());
if(attrNames.size()>0)
txFilter.setSearchProp(attrNames.get(0).getName(), attrNames.get(0).getType());
if (searchPropComboViewer!=null) {
searchPropComboViewer.setInput(attrNames);
searchPropComboViewer.setSelection(new StructuredSelection(searchPropComboViewer.getElementAt(0)));

View File

@ -10,7 +10,7 @@
<relativePath>../..</relativePath>
</parent>
<artifactId>com.minres.scviewer.e4.product</artifactId>
<version>2.9.2-SNAPSHOT</version>
<version>2.9.3-SNAPSHOT</version>
<packaging>eclipse-repository</packaging>
<groupId>com.minres.scviewer</groupId>
<build>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?pde version="3.5"?>
<product name="SCViewer" uid="product" id="com.minres.scviewer.e4.application.product" application="org.eclipse.e4.ui.workbench.swt.E4Application" version="2.9.2.qualifier" useFeatures="true" includeLaunchers="true">
<product name="SCViewer" uid="product" id="com.minres.scviewer.e4.application.product" application="org.eclipse.e4.ui.workbench.swt.E4Application" version="2.9.3.qualifier" useFeatures="true" includeLaunchers="true">
<configIni use="default">
</configIni>

View File

@ -10,7 +10,7 @@
<relativePath>../..</relativePath>
</parent>
<artifactId>com.minres.scviewer.e4.product_slim</artifactId>
<version>2.9.2-SNAPSHOT</version>
<version>2.9.3-SNAPSHOT</version>
<packaging>eclipse-repository</packaging>
<groupId>com.minres.scviewer</groupId>
<build>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?pde version="3.5"?>
<product name="SCViewer" uid="product_slim" id="com.minres.scviewer.e4.application.product_slim" application="org.eclipse.e4.ui.workbench.swt.E4Application" version="2.9.2.qualifier" useFeatures="false" includeLaunchers="true">
<product name="SCViewer" uid="product_slim" id="com.minres.scviewer.e4.application.product_slim" application="org.eclipse.e4.ui.workbench.swt.E4Application" version="2.9.3.qualifier" useFeatures="false" includeLaunchers="true">
<configIni use="default">
</configIni>