From 8b55548cca90f71b8e45fa4f211acdb1f006e655 Mon Sep 17 00:00:00 2001 From: Brita Keller Date: Mon, 17 Feb 2020 19:43:27 +0100 Subject: [PATCH 1/3] Fixed #16 - Setting and deleting filter removes properties --- .../application/parts/TransactionDetails.java | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/TransactionDetails.java b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/TransactionDetails.java index db0aa1e..ae67699 100644 --- a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/TransactionDetails.java +++ b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/TransactionDetails.java @@ -119,8 +119,10 @@ public class TransactionDetails { public void modifyText(ModifyEvent e) { attributeFilter.setSearchText(((Text) e.widget).getText()); treeViewer.refresh(); + treeViewer.expandAll(true); } }); + nameFilter.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); attributeFilter = new TxAttributeFilter(); @@ -461,16 +463,20 @@ public class TransactionDetails { */ @Override public boolean select(Viewer viewer, Object parentElement, Object element) { + if (searchString == null || searchString.length() == 0) { return true; } - if(element instanceof ITxAttribute){ - ITxAttribute p = (ITxAttribute) element; - if (p.getName().matches(searchString)) { - return true; - } - } else if(element instanceof TreeNode) + if(element instanceof TreeNode) { return true; + } + if(element instanceof ITxAttribute){ + return (((ITxAttribute) element).getName().toLowerCase().matches(searchString.toLowerCase())); + } + if(element instanceof Object[]) { + return (((Object[])element)[0]).toString().toLowerCase().matches(searchString.toLowerCase()); + } + return false; } } From 0623b8de4ac3d9dec4724650cb57672fdcaef841 Mon Sep 17 00:00:00 2001 From: Brita Keller Date: Fri, 28 Feb 2020 21:19:40 +0100 Subject: [PATCH 2/3] Fixed #25 - TransactionDetails vanish when setting filter for streamlist --- .../e4/application/parts/TransactionDetails.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/TransactionDetails.java b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/TransactionDetails.java index ae67699..bb39838 100644 --- a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/TransactionDetails.java +++ b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/TransactionDetails.java @@ -21,7 +21,9 @@ import org.eclipse.e4.core.di.annotations.Optional; import org.eclipse.e4.core.services.events.IEventBroker; import org.eclipse.e4.ui.di.Focus; import org.eclipse.e4.ui.di.UIEventTopic; +import org.eclipse.e4.ui.model.application.ui.basic.MPart; import org.eclipse.e4.ui.services.IServiceConstants; +import org.eclipse.e4.ui.workbench.modeling.EPartService; import org.eclipse.e4.ui.workbench.modeling.ESelectionService; import org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider; import org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.IStyledLabelProvider; @@ -343,10 +345,14 @@ public class TransactionDetails { * @param selection the new selection */ @Inject - public void setSelection(@Named(IServiceConstants.ACTIVE_SELECTION) @Optional IStructuredSelection selection){ + public void setSelection(@Named(IServiceConstants.ACTIVE_SELECTION) @Optional IStructuredSelection selection, EPartService partService){ + // only react if selection is actually from the WaveformViewer and nothing else + MPart part = partService.getActivePart(); + if( part == null || ! (part.getObject() instanceof WaveformViewer ) ) + return; if(treeViewer!=null && selection!=null && !treeViewer.getTree().isDisposed()){ if( selection instanceof IStructuredSelection) { - setInput(((IStructuredSelection)selection).getFirstElement()); + setInput(((IStructuredSelection)selection).getFirstElement()); } } } From e4329213fae529e03c2151a6fdba015828741da4 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Mon, 9 Mar 2020 17:53:35 +0100 Subject: [PATCH 3/3] Fixed missing version number --- com.minres.scviewer.e4.product/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.minres.scviewer.e4.product/pom.xml b/com.minres.scviewer.e4.product/pom.xml index 129b5ce..53f52b6 100644 --- a/com.minres.scviewer.e4.product/pom.xml +++ b/com.minres.scviewer.e4.product/pom.xml @@ -10,7 +10,7 @@ ../com.minres.scviewer.parent com.minres.scviewer.e4.product - 2.1.2-SNAPSHOT + 2.1.3-SNAPSHOT eclipse-repository com.minres.scviewer