Merge branch 'release/2.10.0'
This commit is contained in:
commit
929af41dd3
|
@ -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.3.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",
|
||||
|
|
|
@ -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.3-SNAPSHOT</version>
|
||||
<version>2.10.0-SNAPSHOT</version>
|
||||
<parent>
|
||||
<groupId>com.minres.scviewer</groupId>
|
||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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,43 +275,31 @@ 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");
|
||||
waveformPane = factory.createPanel(middleTop);
|
||||
|
||||
ctx.set(Composite.class, middleBottom);
|
||||
transactionList = ContextInjectionFactory.make(TransactionListView.class, ctx);
|
||||
tbtmSearchResults.setControl(transactionList.getControl());
|
||||
|
||||
sashFormRight.setWeights(new int[] {75, 25});
|
||||
tabFolder.setSelection(0);
|
||||
|
||||
waveformPane.setMaxTime(0);
|
||||
setupColors();
|
||||
|
@ -1315,15 +1300,10 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
|||
}
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
|
@ -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) {
|
||||
// if(element instanceof Object[]) {
|
||||
// try {
|
||||
// return (((Object[])element)[0]).toString().toLowerCase().matches(searchString.toLowerCase());
|
||||
// } catch (PatternSyntaxException e) {
|
||||
// return true;
|
||||
// }
|
||||
// }
|
||||
// return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
|
||||
|
@ -24,6 +26,8 @@ public class TxFilter extends ViewerFilter {
|
|||
/** 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:
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
<artifactId>com.minres.scviewer.e4.product</artifactId>
|
||||
<version>2.9.3-SNAPSHOT</version>
|
||||
<version>2.10.0-SNAPSHOT</version>
|
||||
<packaging>eclipse-repository</packaging>
|
||||
<groupId>com.minres.scviewer</groupId>
|
||||
<build>
|
||||
|
|
|
@ -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.3.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>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
<artifactId>com.minres.scviewer.e4.product_slim</artifactId>
|
||||
<version>2.9.3-SNAPSHOT</version>
|
||||
<version>2.10.0-SNAPSHOT</version>
|
||||
<packaging>eclipse-repository</packaging>
|
||||
<groupId>com.minres.scviewer</groupId>
|
||||
<build>
|
||||
|
|
|
@ -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.3.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>
|
||||
|
|
Loading…
Reference in New Issue