Compare commits

..

8 Commits

Author SHA1 Message Date
929af41dd3 Merge branch 'release/2.10.0' 2020-11-27 09:34:20 +01:00
979a7672e6 update version numbers 2020-11-27 09:34:12 +01:00
67818ff4dd Squashed commit of the following:
commit dccd2c524c1c00ab3998546276b7244e6d0f389c
Author: eyck <eyck@minres.com>
Date:   Fri Nov 27 08:52:58 2020 +0100

	re-layout sashes

commit d932367a67e081307c49fd248c54c057357a96d2
Author: eyck <eyck@minres.com>
Date:   Fri Nov 27 08:47:50 2020 +0100

	fix string filter and layout

commit 7f4bf0a64d4d685390e9a7af61f377a512d5332d
Author: eyck <eyck@minres.com>
Date:   Fri Nov 27 08:46:30 2020 +0100

	set single clock selection

commit 972e3ce9267c9cd2b9437e5f7403b3ff69d2928f
Author: eyck <eyck@minres.com>
Date:   Fri Nov 27 08:45:49 2020 +0100

	apply filter only to attributes

commit 13a25692bd7909bad98169648edabd01872a7ecb
Author: eyck <eyck@minres.com>
Date:   Fri Nov 27 08:45:22 2020 +0100

	re-layout elements
2020-11-27 08:53:34 +01:00
0c7631e912 Merge branch 'release/2.9.3' 2020-11-24 16:20:18 +01:00
a06b888365 Merge branch 'release/2.9.3' into develop 2020-11-24 16:20:18 +01:00
ded10e1c22 fix some bugs
* NPE when stream contains no transactions and hence no attributes
* changed sash hierarchy in waveform pane
2020-11-24 16:20:08 +01:00
2f3bc0d892 Merge branch 'release/2.9.2' into develop 2020-11-11 18:00:59 +01:00
c88eb32db8 Merge branch 'release/2.9.1' into develop 2020-11-11 07:25:06 +01:00
15 changed files with 81 additions and 79 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.10.0.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.10.0-SNAPSHOT</version>
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>

View File

@ -41,8 +41,6 @@ public class SearchHandler {
public void execute(Shell shell, MPart activePart){
Object obj = activePart.getObject();
if(obj instanceof WaveformViewer){
WaveformViewer wfv = (WaveformViewer)obj;
wfv.showSearch();
// ISelection sel = wfv.getSelection();
// if(sel instanceof StructuredSelection) {
// TrackEntry e = findTrackEntry(((StructuredSelection)sel).toArray());

View File

@ -22,7 +22,7 @@ StatusBarControl_2=\nLast task:
StatusBarControl_3=Currently running:
StatusBarControl_4=No background progress running.
SWTResourceManager_0=Wrong decorate corner
TransactionDetails_0=Enter text to filter
TransactionDetails_0=Enter text to filter attributes
TransactionDetails_1=Name
TransactionDetails_10=Properties
TransactionDetails_11=Attributes

View File

@ -48,6 +48,7 @@ import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
@ -114,6 +115,7 @@ public class TransactionDetails {
*/
@PostConstruct
public void createComposite(final Composite parent, @Optional WaveformViewer waveformViewerPart) {
parent.setLayout(new FillLayout());
this.waveformViewerPart=waveformViewerPart;
top = new Composite(parent, SWT.NONE);
@ -378,6 +380,7 @@ public class TransactionDetails {
}
private void setTopItemFromHier(List<String> names, TreeItem [] items) {
if(names.size()==0) return;
for (TreeItem item : items) { // find item from category
if(item.getText(0).equals(names.get(0))) {
if(names.size()==1 || item.getItemCount()==0) {

View File

@ -13,8 +13,10 @@ import org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider;
import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.IDoubleClickListener;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.TableViewerColumn;
@ -23,6 +25,7 @@ import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Combo;
@ -98,6 +101,8 @@ public class TransactionList extends Composite {
*/
public TransactionList(Composite parent, int style, WaveformViewer waveformViewer) {
super(parent, style);
parent.setLayout(new FillLayout());
setLayout(new GridLayout(5, false));
txFilter = new TxFilter();
@ -186,10 +191,10 @@ public class TransactionList extends Composite {
}
});
tableViewer.addFilter(txFilter);
tableViewer.addDoubleClickListener(new IDoubleClickListener() {
tableViewer.addSelectionChangedListener(new ISelectionChangedListener() {
@Override
public void doubleClick(DoubleClickEvent event) {
ISelection treeSelection = tableViewer.getSelection();
public void selectionChanged(SelectionChangedEvent event) {
ISelection treeSelection = event.getSelection();
if(treeSelection instanceof IStructuredSelection) {
Object selected = ((IStructuredSelection)treeSelection).getFirstElement();
if(selected instanceof ITx){
@ -230,11 +235,6 @@ public class TransactionList extends Composite {
// Turn on the header and the lines
table.setHeaderVisible(true);
table.setLinesVisible(true);
new Label(this, SWT.NONE);
new Label(this, SWT.NONE);
new Label(this, SWT.NONE);
new Label(this, SWT.NONE);
new Label(this, SWT.NONE);
}
public void setInput(TrackEntry trackEntry) {
@ -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

@ -181,9 +181,6 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
/** The waveform pane. */
private IWaveformView waveformPane;
private CTabFolder tabFolder;
private CTabItem tbtmSearchResults;
/** get UISynchronize injected as field */
@Inject UISynchronize sync;
@ -278,44 +275,32 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
}
});
parent.setLayout(new FillLayout(SWT.HORIZONTAL));
SashForm sashFormTop = new SashForm(parent, SWT.BORDER | SWT.SMOOTH);
Composite left = new Composite(sashFormTop, SWT.NONE);
IEclipseContext ctx = myPart.getContext();
ctx.set(WaveformViewer.class, this);
ctx.set(IWaveformDb.class, database);
ctx.set(Composite.class, left);
SashForm topSash = new SashForm(parent, SWT.BORDER | SWT.SMOOTH | SWT.HORIZONTAL);
Composite left = new Composite(topSash, SWT.NONE);
SashForm middleSash = new SashForm(topSash, SWT.BORDER | SWT.SMOOTH | SWT.VERTICAL);
Composite right = new Composite(topSash, SWT.NONE);
topSash.setWeights(new int[] {20, 60, 20});
Composite middleTop = new Composite(middleSash, SWT.NONE);
Composite middleBottom = new Composite(middleSash, SWT.NONE);
middleSash.setWeights(new int[] {75, 25});
ctx.set(Composite.class, left);
browser = ContextInjectionFactory.make(DesignBrowser.class, ctx);
//Composite right = new Composite(sashFormTop, SWT.NONE);
SashForm sashFormRight = new SashForm(sashFormTop, SWT.BORDER | SWT.SMOOTH | SWT.VERTICAL);
sashFormTop.setWeights(new int[] {25, 75});
Composite rightTop = new Composite(sashFormRight, SWT.NONE);
waveformPane = factory.createPanel(rightTop);
tabFolder = new CTabFolder(sashFormRight, SWT.BORDER);
tabFolder.setSelectionBackground(Display.getCurrent().getSystemColor(SWT.COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT));
CTabItem tbtmDetails = new CTabItem(tabFolder, SWT.NONE);
tbtmDetails.setText("Transaction Details");
ctx.set(Composite.class, tabFolder);
ctx.set(Composite.class, right);
detailsView = ContextInjectionFactory.make(TransactionDetails.class, ctx);
tbtmDetails.setControl(detailsView.getControl());
tbtmSearchResults = new CTabItem(tabFolder, SWT.NONE);
tbtmSearchResults.setText("Search Results");
transactionList = ContextInjectionFactory.make(TransactionListView.class, ctx);
tbtmSearchResults.setControl(transactionList.getControl());
sashFormRight.setWeights(new int[] {75, 25});
tabFolder.setSelection(0);
waveformPane = factory.createPanel(middleTop);
ctx.set(Composite.class, middleBottom);
transactionList = ContextInjectionFactory.make(TransactionListView.class, ctx);
waveformPane.setMaxTime(0);
setupColors();
//set selection to empty selection when opening a new waveformPane
@ -1314,16 +1299,11 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
eventBroker.post(WaveStatusBarControl.MARKER_DIFF, null);
}
}
public void showSearch() {
tabFolder.setSelection(tbtmSearchResults);
}
public void search(String propName, DataType type, String propValue) {
// StructuredSelection sel = (StructuredSelection) getSelection();
// TrackEntry e = findTrackEntry((sel).toArray());
// if(e==null) return;
tabFolder.setSelection(tbtmSearchResults);
transactionList.getControl().setSearchProps(propName, type, propValue);
}
}

View File

@ -43,13 +43,14 @@ public class TxAttributeFilter extends ViewerFilter {
return true;
}
}
if(element instanceof Object[]) {
try {
return (((Object[])element)[0]).toString().toLowerCase().matches(searchString.toLowerCase());
} catch (PatternSyntaxException e) {
return true;
}
}
return false;
// if(element instanceof Object[]) {
// try {
// return (((Object[])element)[0]).toString().toLowerCase().matches(searchString.toLowerCase());
// } catch (PatternSyntaxException e) {
// return true;
// }
// }
// return false;
return true;
}
}

View File

@ -2,6 +2,8 @@ package com.minres.scviewer.e4.application.parts.txTableTree;
import java.math.BigInteger;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;
import java.util.stream.Collectors;
@ -23,6 +25,8 @@ public class TxFilter extends ViewerFilter {
private DataType searchType;
/** The search string. */
private String searchValue;
private Pattern pattern=null;
/**
* Sets the search text.
@ -41,6 +45,14 @@ public class TxFilter extends ViewerFilter {
*/
public void setSearchValue(String s) {
this.searchValue = s;
if(searchType==DataType.STRING) {
try {
//pattern = Pattern.compile(searchValue, Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE);
pattern = Pattern.compile(searchValue);
} catch (PatternSyntaxException e) {
pattern = null;
}
}
}
/* (non-Javadoc)
@ -70,9 +82,10 @@ public class TxFilter extends ViewerFilter {
BigInteger sval = parseBigInteger(searchValue);
return lval.equals(sval);
case STRING:
try {
return (((ITxAttribute) element).getName().toLowerCase().matches(searchValue.toLowerCase()));
} catch (PatternSyntaxException e) {
if(pattern!=null) {
Matcher matcher = pattern.matcher( attr.getValue().toString());
return matcher.find();
} else {
return true;
}
default:

View File

@ -10,7 +10,7 @@
<relativePath>../..</relativePath>
</parent>
<artifactId>com.minres.scviewer.e4.product</artifactId>
<version>2.9.2-SNAPSHOT</version>
<version>2.10.0-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.10.0.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.10.0-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.10.0.qualifier" useFeatures="false" includeLaunchers="true">
<configIni use="default">
</configIni>