Merge branch 'release/2.9.1'
This commit is contained in:
commit
d47db29b93
|
@ -20,6 +20,13 @@
|
||||||
<repository location="http://dist.springsource.org/snapshot/GRECLIPSE/e4.15/"/>
|
<repository location="http://dist.springsource.org/snapshot/GRECLIPSE/e4.15/"/>
|
||||||
<unit id="org.codehaus.groovy25.feature.feature.group" version="0.0.0"/>
|
<unit id="org.codehaus.groovy25.feature.feature.group" version="0.0.0"/>
|
||||||
</location>
|
</location>
|
||||||
|
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
|
||||||
|
<repository location="http://download.eclipse.org/nattable/releases/1.6.0/repository/"/>
|
||||||
|
<unit id="org.eclipse.nebula.widgets.nattable.core.feature.feature.group" version="1.6.0.201909181823"/>
|
||||||
|
<unit id="org.eclipse.nebula.widgets.nattable.extension.e4.feature.feature.group" version="1.2.0.201909181823"/>
|
||||||
|
<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>
|
||||||
</locations>
|
</locations>
|
||||||
<targetJRE path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
<targetJRE path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||||
<launcherArgs>
|
<launcherArgs>
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
pluginProject.extensions=false
|
pluginProject.extensions=false
|
||||||
|
resolve.requirebundle=false
|
||||||
|
|
|
@ -54,6 +54,7 @@
|
||||||
<children xsi:type="menu:HandledMenuItem" xmi:id="_JTXBgYl_EeWxJ_wPkM6yGQ" elementId="" label="Preferences" command="_AxH6sIl_EeWxJ_wPkM6yGQ"/>
|
<children xsi:type="menu:HandledMenuItem" xmi:id="_JTXBgYl_EeWxJ_wPkM6yGQ" elementId="" label="Preferences" command="_AxH6sIl_EeWxJ_wPkM6yGQ"/>
|
||||||
</children>
|
</children>
|
||||||
<children xsi:type="menu:Menu" xmi:id="_95QGxHNmEeWBq8z1Dv39LA" elementId="com.minres.scviewer.e4.application.menu.help" label="Help">
|
<children xsi:type="menu:Menu" xmi:id="_95QGxHNmEeWBq8z1Dv39LA" elementId="com.minres.scviewer.e4.application.menu.help" label="Help">
|
||||||
|
<children xsi:type="menu:HandledMenuItem" xmi:id="_UQRi0B07EeuiP60JNw0iiA" elementId="com.minres.scviewer.e4.application.handledmenuitem.checkforupdate" visible="false" label="Check for Update" enabled="false" command="_-9ED4B06EeuiP60JNw0iiA"/>
|
||||||
<children xsi:type="menu:HandledMenuItem" xmi:id="_95QGxXNmEeWBq8z1Dv39LA" label="About" command="_95PfxnNmEeWBq8z1Dv39LA"/>
|
<children xsi:type="menu:HandledMenuItem" xmi:id="_95QGxXNmEeWBq8z1Dv39LA" label="About" command="_95PfxnNmEeWBq8z1Dv39LA"/>
|
||||||
</children>
|
</children>
|
||||||
</mainMenu>
|
</mainMenu>
|
||||||
|
@ -137,6 +138,7 @@
|
||||||
<handlers xmi:id="_x4pSEGtTEeqmlpoaaMHoiw" elementId="com.minres.scviewer.e4.application.handler.0" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.EnableHover" command="_uyeyYGtTEeqmlpoaaMHoiw"/>
|
<handlers xmi:id="_x4pSEGtTEeqmlpoaaMHoiw" elementId="com.minres.scviewer.e4.application.handler.0" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.EnableHover" command="_uyeyYGtTEeqmlpoaaMHoiw"/>
|
||||||
<handlers xmi:id="_h3jU8BkWEeudD5MqrWoETQ" elementId="com.minres.scviewer.e4.application.handler.reloadCommand" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.ReloadHandler" command="_srACsBkREeudD5MqrWoETQ"/>
|
<handlers xmi:id="_h3jU8BkWEeudD5MqrWoETQ" elementId="com.minres.scviewer.e4.application.handler.reloadCommand" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.ReloadHandler" command="_srACsBkREeudD5MqrWoETQ"/>
|
||||||
<handlers xmi:id="_gn_boBlEEeuiP60JNw0iiA" elementId="com.minres.scviewer.e4.application.handler.txSearch" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.SearchHandler" command="_XDxTYBlEEeuiP60JNw0iiA"/>
|
<handlers xmi:id="_gn_boBlEEeuiP60JNw0iiA" elementId="com.minres.scviewer.e4.application.handler.txSearch" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.SearchHandler" command="_XDxTYBlEEeuiP60JNw0iiA"/>
|
||||||
|
<handlers xmi:id="_CCEtAB07EeuiP60JNw0iiA" elementId="com.minres.scviewer.e4.application.handler.update" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.UpdateHandler" command="_-9ED4B06EeuiP60JNw0iiA"/>
|
||||||
<bindingTables xmi:id="_95PfvnNmEeWBq8z1Dv39LA" bindingContext="_95PfuXNmEeWBq8z1Dv39LA">
|
<bindingTables xmi:id="_95PfvnNmEeWBq8z1Dv39LA" bindingContext="_95PfuXNmEeWBq8z1Dv39LA">
|
||||||
<bindings xmi:id="_95Pfv3NmEeWBq8z1Dv39LA" elementId="com.minres.scviewer.e4.application.keybinding.quit" keySequence="M1+Q" command="_95PfvHNmEeWBq8z1Dv39LA">
|
<bindings xmi:id="_95Pfv3NmEeWBq8z1Dv39LA" elementId="com.minres.scviewer.e4.application.keybinding.quit" keySequence="M1+Q" command="_95PfvHNmEeWBq8z1Dv39LA">
|
||||||
<tags>type:user</tags>
|
<tags>type:user</tags>
|
||||||
|
@ -277,6 +279,7 @@
|
||||||
<commands xmi:id="_uyeyYGtTEeqmlpoaaMHoiw" elementId="com.minres.scviewer.e4.application.command.enablehover" commandName="Enable hover" description="Enable hover window in waveform"/>
|
<commands xmi:id="_uyeyYGtTEeqmlpoaaMHoiw" elementId="com.minres.scviewer.e4.application.command.enablehover" commandName="Enable hover" description="Enable hover window in waveform"/>
|
||||||
<commands xmi:id="_srACsBkREeudD5MqrWoETQ" elementId="com.minres.scviewer.e4.application.reload" commandName="Reload Command"/>
|
<commands xmi:id="_srACsBkREeudD5MqrWoETQ" elementId="com.minres.scviewer.e4.application.reload" commandName="Reload Command"/>
|
||||||
<commands xmi:id="_XDxTYBlEEeuiP60JNw0iiA" elementId="com.minres.scviewer.e4.application.txSearch" commandName="Search Command"/>
|
<commands xmi:id="_XDxTYBlEEeuiP60JNw0iiA" elementId="com.minres.scviewer.e4.application.txSearch" commandName="Search Command"/>
|
||||||
|
<commands xmi:id="_-9ED4B06EeuiP60JNw0iiA" elementId="com.minres.scviewer.e4.application.command.update" commandName="Update"/>
|
||||||
<addons xmi:id="_95PfsnNmEeWBq8z1Dv39LA" elementId="org.eclipse.e4.core.commands.service" contributionURI="bundleclass://org.eclipse.e4.core.commands/org.eclipse.e4.core.commands.CommandServiceAddon"/>
|
<addons xmi:id="_95PfsnNmEeWBq8z1Dv39LA" elementId="org.eclipse.e4.core.commands.service" contributionURI="bundleclass://org.eclipse.e4.core.commands/org.eclipse.e4.core.commands.CommandServiceAddon"/>
|
||||||
<addons xmi:id="_95Pfs3NmEeWBq8z1Dv39LA" elementId="org.eclipse.e4.ui.contexts.service" contributionURI="bundleclass://org.eclipse.e4.ui.services/org.eclipse.e4.ui.services.ContextServiceAddon"/>
|
<addons xmi:id="_95Pfs3NmEeWBq8z1Dv39LA" elementId="org.eclipse.e4.ui.contexts.service" contributionURI="bundleclass://org.eclipse.e4.ui.services/org.eclipse.e4.ui.services.ContextServiceAddon"/>
|
||||||
<addons xmi:id="_95PftHNmEeWBq8z1Dv39LA" elementId="org.eclipse.e4.ui.bindings.service" contributionURI="bundleclass://org.eclipse.e4.ui.bindings/org.eclipse.e4.ui.bindings.BindingServiceAddon"/>
|
<addons xmi:id="_95PftHNmEeWBq8z1Dv39LA" elementId="org.eclipse.e4.ui.bindings.service" contributionURI="bundleclass://org.eclipse.e4.ui.bindings/org.eclipse.e4.ui.bindings.BindingServiceAddon"/>
|
||||||
|
|
|
@ -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.9.0.qualifier
|
Bundle-Version: 2.9.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",
|
||||||
|
@ -31,7 +31,11 @@ Require-Bundle: javax.inject;bundle-version="1.0.0",
|
||||||
org.eclipse.core.resources;bundle-version="3.13.0",
|
org.eclipse.core.resources;bundle-version="3.13.0",
|
||||||
javax.annotation;bundle-version="1.2.0",
|
javax.annotation;bundle-version="1.2.0",
|
||||||
org.eclipse.core.databinding,
|
org.eclipse.core.databinding,
|
||||||
org.eclipse.jface.databinding
|
org.eclipse.jface.databinding,
|
||||||
|
org.eclipse.equinox.p2.core;bundle-version="2.6.300",
|
||||||
|
org.eclipse.equinox.p2.engine;bundle-version="2.6.600",
|
||||||
|
org.eclipse.equinox.p2.operations;bundle-version="2.5.700",
|
||||||
|
org.eclipse.equinox.p2.metadata.repository;bundle-version="1.3.400"
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
||||||
Import-Package: com.minres.scviewer.database,
|
Import-Package: com.minres.scviewer.database,
|
||||||
javax.inject;version="1.0.0"
|
javax.inject;version="1.0.0"
|
||||||
|
|
|
@ -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.9.0-SNAPSHOT</version>
|
<version>2.9.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>
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
|
||||||
|
package com.minres.scviewer.e4.application.handlers;
|
||||||
|
|
||||||
|
import org.eclipse.core.runtime.IStatus;
|
||||||
|
import org.eclipse.e4.core.di.annotations.Execute;
|
||||||
|
import org.eclipse.e4.ui.di.UISynchronize;
|
||||||
|
import org.eclipse.e4.ui.workbench.IWorkbench;
|
||||||
|
import org.eclipse.equinox.p2.core.IProvisioningAgent;
|
||||||
|
import org.eclipse.equinox.p2.operations.ProvisioningSession;
|
||||||
|
import org.eclipse.equinox.p2.operations.UpdateOperation;
|
||||||
|
import org.eclipse.jface.dialogs.MessageDialog;
|
||||||
|
|
||||||
|
public class UpdateHandler {
|
||||||
|
@Execute
|
||||||
|
public void execute(IProvisioningAgent agent, UISynchronize synchronize, IWorkbench workbench) {
|
||||||
|
ProvisioningSession session = new ProvisioningSession(agent);
|
||||||
|
UpdateOperation operation = new UpdateOperation(session);
|
||||||
|
IStatus status = operation.resolveModal(null);
|
||||||
|
if(status.getCode() == UpdateOperation.STATUS_NOTHING_TO_UPDATE) {
|
||||||
|
MessageDialog.openInformation(null, "Information", "Nothing to update");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -137,7 +137,6 @@ public class TransactionDetails {
|
||||||
|
|
||||||
treeViewer = new TreeViewer(top);
|
treeViewer = new TreeViewer(top);
|
||||||
treeViewer.setContentProvider(new AbstractTransactionTreeContentProvider(waveformViewerPart) {
|
treeViewer.setContentProvider(new AbstractTransactionTreeContentProvider(waveformViewerPart) {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object[] getElements(Object element) {
|
public Object[] getElements(Object element) {
|
||||||
return new Object[]{
|
return new Object[]{
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package com.minres.scviewer.e4.application.parts;
|
package com.minres.scviewer.e4.application.parts;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
@ -40,6 +39,8 @@ import com.minres.scviewer.database.ITxStream;
|
||||||
import com.minres.scviewer.database.ui.TrackEntry;
|
import com.minres.scviewer.database.ui.TrackEntry;
|
||||||
import com.minres.scviewer.e4.application.parts.txTableTree.AbstractTransactionTreeContentProvider;
|
import com.minres.scviewer.e4.application.parts.txTableTree.AbstractTransactionTreeContentProvider;
|
||||||
import com.minres.scviewer.e4.application.parts.txTableTree.AttributeLabelProvider;
|
import com.minres.scviewer.e4.application.parts.txTableTree.AttributeLabelProvider;
|
||||||
|
import com.minres.scviewer.e4.application.parts.txTableTree.TransactionTreeNode;
|
||||||
|
import com.minres.scviewer.e4.application.parts.txTableTree.TransactionTreeNodeType;
|
||||||
import com.minres.scviewer.e4.application.parts.txTableTree.TxFilter;
|
import com.minres.scviewer.e4.application.parts.txTableTree.TxFilter;
|
||||||
|
|
||||||
public class TransactionList extends Composite {
|
public class TransactionList extends Composite {
|
||||||
|
@ -115,12 +116,14 @@ public class TransactionList extends Composite {
|
||||||
int idx = searchPropCombo.getSelectionIndex();
|
int idx = searchPropCombo.getSelectionIndex();
|
||||||
AttributeNameBean sel = attrNames.get(idx);
|
AttributeNameBean sel = attrNames.get(idx);
|
||||||
txFilter.setSearchProp(sel.getName(), sel.getType());
|
txFilter.setSearchProp(sel.getName(), sel.getType());
|
||||||
|
treeViewer.refresh();
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void widgetDefaultSelected(SelectionEvent e) {
|
public void widgetDefaultSelected(SelectionEvent e) {
|
||||||
int idx = searchPropCombo.getSelectionIndex();
|
int idx = searchPropCombo.getSelectionIndex();
|
||||||
AttributeNameBean sel = attrNames.get(idx);
|
AttributeNameBean sel = attrNames.get(idx);
|
||||||
txFilter.setSearchProp(sel.getName(), sel.getType());
|
txFilter.setSearchProp(sel.getName(), sel.getType());
|
||||||
|
treeViewer.refresh();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -131,7 +134,6 @@ public class TransactionList extends Composite {
|
||||||
public void modifyText(ModifyEvent e) {
|
public void modifyText(ModifyEvent e) {
|
||||||
txFilter.setSearchValue(((Text) e.widget).getText());
|
txFilter.setSearchValue(((Text) e.widget).getText());
|
||||||
treeViewer.refresh();
|
treeViewer.refresh();
|
||||||
//treeViewer.expandAll(false);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -150,25 +152,21 @@ public class TransactionList extends Composite {
|
||||||
@Override
|
@Override
|
||||||
public void widgetSelected(SelectionEvent e) {
|
public void widgetSelected(SelectionEvent e) {
|
||||||
int idx = viewPropCombo.getSelectionIndex();
|
int idx = viewPropCombo.getSelectionIndex();
|
||||||
AttributeNameBean sel = attrNames.get(idx);
|
nameLabelProvider.setShowProp(attrNames.get(idx).getName());
|
||||||
nameLabelProvider.setShowProp(sel.getName());
|
|
||||||
treeViewer.refresh(true);
|
treeViewer.refresh(true);
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void widgetDefaultSelected(SelectionEvent e) { }
|
public void widgetDefaultSelected(SelectionEvent e) { }
|
||||||
});
|
});
|
||||||
|
|
||||||
treeViewer = new TreeViewer(this, SWT.BORDER);
|
treeViewer = new TreeViewer(this);
|
||||||
treeViewer.setContentProvider(new AbstractTransactionTreeContentProvider(waveformViewer) {
|
treeViewer.setContentProvider(new AbstractTransactionTreeContentProvider(waveformViewer) {
|
||||||
|
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
public Object[] getElements(Object inputElement) {
|
public Object[] getElements(Object inputElement) {
|
||||||
if (inputElement instanceof Object[]) {
|
if (inputElement instanceof ArrayList<?>) {
|
||||||
return (Object[]) inputElement;
|
return ((ArrayList<ITx>) inputElement).stream().map(tx-> new TransactionTreeNode(tx, TransactionTreeNodeType.TX)).collect(Collectors.toList()).toArray();
|
||||||
}
|
|
||||||
if (inputElement instanceof Collection) {
|
|
||||||
return ((Collection) inputElement).toArray();
|
|
||||||
}
|
}
|
||||||
return new Object[0];
|
return new Object[0];
|
||||||
}
|
}
|
||||||
|
@ -181,6 +179,8 @@ public class TransactionList extends Composite {
|
||||||
Object selected = treeSelection.getFirstElement();
|
Object selected = treeSelection.getFirstElement();
|
||||||
if(selected instanceof ITx){
|
if(selected instanceof ITx){
|
||||||
waveformViewer.setSelection(new StructuredSelection(selected));
|
waveformViewer.setSelection(new StructuredSelection(selected));
|
||||||
|
} else if(selected instanceof TransactionTreeNode && ((TransactionTreeNode)selected).type == TransactionTreeNodeType.TX) {
|
||||||
|
waveformViewer.setSelection(new StructuredSelection(((TransactionTreeNode)selected).element));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -242,17 +242,18 @@ public class TransactionList extends Composite {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void run() {
|
public void run() {
|
||||||
stream.getEvents().values().parallelStream().forEach(evtLst -> {
|
eventList = stream.getEvents().values().parallelStream()
|
||||||
evtLst.forEach(evt -> {
|
.flatMap(List::stream)
|
||||||
if(evt.getType()==Type.BEGIN) {
|
.filter(evt -> evt.getType()==Type.BEGIN)
|
||||||
eventList.add(evt.getTransaction());
|
.map(evt-> {
|
||||||
for(ITxAttribute attr: evt.getTransaction().getAttributes()) {
|
ITx tx = evt.getTransaction();
|
||||||
|
for(ITxAttribute attr: tx.getAttributes()) {
|
||||||
propNames.put(attr.getName(), attr.getDataType());
|
propNames.put(attr.getName(), attr.getDataType());
|
||||||
}
|
}
|
||||||
}
|
return tx;
|
||||||
});
|
})
|
||||||
});
|
.sorted((t1, t2)-> t1.getBeginTime().compareTo(t2.getBeginTime()))
|
||||||
eventList = eventList.parallelStream().sorted((t1, t2)-> t1.getBeginTime().compareTo(t2.getBeginTime())).collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
getDisplay().asyncExec(new Runnable() {
|
getDisplay().asyncExec(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
@ -265,6 +266,7 @@ public class TransactionList extends Composite {
|
||||||
searchPropComboViewer.setInput(attrNames);
|
searchPropComboViewer.setInput(attrNames);
|
||||||
searchPropComboViewer.setSelection(new StructuredSelection(searchPropComboViewer.getElementAt(0)));
|
searchPropComboViewer.setSelection(new StructuredSelection(searchPropComboViewer.getElementAt(0)));
|
||||||
}
|
}
|
||||||
|
treeViewer.refresh(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,38 +46,39 @@ public abstract class AbstractTransactionTreeContentProvider implements ITreeCon
|
||||||
@Override
|
@Override
|
||||||
public Object[] getChildren(Object element) {
|
public Object[] getChildren(Object element) {
|
||||||
if(element instanceof ITx) {
|
if(element instanceof ITx) {
|
||||||
return new Object[]{
|
return new Object[]{new TransactionTreeNode((ITx)element, TransactionTreeNodeType.ATTRS)};
|
||||||
new TransactionTreeNode((ITx)element, TransactionTreeNodeType.ATTRS)
|
|
||||||
};
|
|
||||||
} else if(element instanceof TransactionTreeNode){
|
} else if(element instanceof TransactionTreeNode){
|
||||||
TransactionTreeNode propertyHolder=(TransactionTreeNode) element;
|
TransactionTreeNode node=(TransactionTreeNode) element;
|
||||||
if(propertyHolder.type == TransactionTreeNodeType.PROPS){
|
switch(node.type) {
|
||||||
|
case PROPS:
|
||||||
return new Object[][]{
|
return new Object[][]{
|
||||||
{Messages.TransactionDetails_1, Messages.TransactionDetails_16, propertyHolder.element.getStream().getFullName()},
|
{Messages.TransactionDetails_1, Messages.TransactionDetails_16, node.element.getStream().getFullName()},
|
||||||
{Messages.TransactionDetails_2, Messages.TransactionDetails_16, propertyHolder.element.getGenerator().getName()},
|
{Messages.TransactionDetails_2, Messages.TransactionDetails_16, node.element.getGenerator().getName()},
|
||||||
{Messages.TransactionDetails_19, Messages.TransactionDetails_20, waveformViewerPart.getScaledTime(propertyHolder.element.getBeginTime())},
|
{Messages.TransactionDetails_19, Messages.TransactionDetails_20, waveformViewerPart.getScaledTime(node.element.getBeginTime())},
|
||||||
{Messages.TransactionDetails_21, Messages.TransactionDetails_20, waveformViewerPart.getScaledTime(propertyHolder.element.getEndTime())}
|
{Messages.TransactionDetails_21, Messages.TransactionDetails_20, waveformViewerPart.getScaledTime(node.element.getEndTime())}
|
||||||
};
|
};
|
||||||
}else if(propertyHolder.type == TransactionTreeNodeType.ATTRS || propertyHolder.type == TransactionTreeNodeType.HIER)
|
case TX:
|
||||||
return propertyHolder.getAttributeListForHier();
|
case ATTRS:
|
||||||
else if(propertyHolder.type == TransactionTreeNodeType.IN_REL){
|
case HIER:
|
||||||
Vector<Object[] > res = new Vector<>();
|
return node.getAttributeListForHier();
|
||||||
for(ITxRelation rel:propertyHolder.element.getIncomingRelations()){
|
case IN_REL:
|
||||||
res.add(new Object[]{
|
Vector<Object[] > res_in = new Vector<>();
|
||||||
|
for(ITxRelation rel:node.element.getIncomingRelations()){
|
||||||
|
res_in.add(new Object[]{
|
||||||
rel.getRelationType(),
|
rel.getRelationType(),
|
||||||
rel.getSource().getGenerator().getName(),
|
rel.getSource().getGenerator().getName(),
|
||||||
rel.getSource()});
|
rel.getSource()});
|
||||||
}
|
}
|
||||||
return res.toArray();
|
return res_in.toArray();
|
||||||
} else if(propertyHolder.type == TransactionTreeNodeType.OUT_REL){
|
case OUT_REL:
|
||||||
Vector<Object[] > res = new Vector<>();
|
Vector<Object[] > res_out = new Vector<>();
|
||||||
for(ITxRelation rel:propertyHolder.element.getOutgoingRelations()){
|
for(ITxRelation rel:node.element.getOutgoingRelations()){
|
||||||
res.add(new Object[]{
|
res_out.add(new Object[]{
|
||||||
rel.getRelationType(),
|
rel.getRelationType(),
|
||||||
rel.getTarget().getGenerator().getName(),
|
rel.getTarget().getGenerator().getName(),
|
||||||
rel.getTarget()});
|
rel.getTarget()});
|
||||||
}
|
}
|
||||||
return res.toArray();
|
return res_out.toArray();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -104,9 +104,20 @@ public class AttributeLabelProvider extends LabelProvider implements IStyledLabe
|
||||||
}else
|
}else
|
||||||
return new StyledString(""); //$NON-NLS-1$
|
return new StyledString(""); //$NON-NLS-1$
|
||||||
case TX_TIME:
|
case TX_TIME:
|
||||||
return new StyledString(""); //$NON-NLS-1$
|
if(element instanceof TransactionTreeNode) {
|
||||||
default:
|
ITx iTx = ((TransactionTreeNode) element).element;
|
||||||
if (element instanceof ITxAttribute) {
|
return new StyledString(waveformViewerPart.getScaledTime(iTx.getBeginTime()));
|
||||||
|
}
|
||||||
|
case VALUE:
|
||||||
|
if(element instanceof TransactionTreeNode) {
|
||||||
|
if(showProp!=null){
|
||||||
|
ITx iTx = ((TransactionTreeNode) element).element;
|
||||||
|
List<ITxAttribute> res = iTx.getAttributes().stream().filter(a -> showProp.equals(a.getName())).collect(Collectors.toList());
|
||||||
|
if(res.size()==1)
|
||||||
|
return getAttrValueAsStyledString(res.get(0));
|
||||||
|
}
|
||||||
|
return new StyledString("");
|
||||||
|
} else if (element instanceof ITxAttribute) {
|
||||||
ITxAttribute attribute = (ITxAttribute) element;
|
ITxAttribute attribute = (ITxAttribute) element;
|
||||||
return getAttrValueAsStyledString(attribute);
|
return getAttrValueAsStyledString(attribute);
|
||||||
}else if(element instanceof Object[]){
|
}else if(element instanceof Object[]){
|
||||||
|
|
|
@ -43,6 +43,7 @@ public class TransactionTreeNode implements Comparable<TransactionTreeNode>{
|
||||||
*/
|
*/
|
||||||
public String toString(){
|
public String toString(){
|
||||||
switch(type){
|
switch(type){
|
||||||
|
case TX: return "tx#"+element.getId();
|
||||||
case PROPS: return Messages.TransactionDetails_10;
|
case PROPS: return Messages.TransactionDetails_10;
|
||||||
case ATTRS: return Messages.TransactionDetails_11;
|
case ATTRS: return Messages.TransactionDetails_11;
|
||||||
case IN_REL: return Messages.TransactionDetails_12;
|
case IN_REL: return Messages.TransactionDetails_12;
|
||||||
|
|
|
@ -4,6 +4,7 @@ package com.minres.scviewer.e4.application.parts.txTableTree;
|
||||||
* The Enum Type.
|
* The Enum Type.
|
||||||
*/
|
*/
|
||||||
public enum TransactionTreeNodeType {
|
public enum TransactionTreeNodeType {
|
||||||
|
TX, /** The transaction. */
|
||||||
PROPS, /** The props. */
|
PROPS, /** The props. */
|
||||||
ATTRS, /** The attrs. */
|
ATTRS, /** The attrs. */
|
||||||
IN_REL, /** The in rel. */
|
IN_REL, /** The in rel. */
|
||||||
|
|
|
@ -40,7 +40,7 @@ public class TxFilter extends ViewerFilter {
|
||||||
* @param s the new search text
|
* @param s the new search text
|
||||||
*/
|
*/
|
||||||
public void setSearchValue(String s) {
|
public void setSearchValue(String s) {
|
||||||
this.searchValue = s; //$NON-NLS-1$ //$NON-NLS-2$
|
this.searchValue = s;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -50,11 +50,15 @@ public class TxFilter extends ViewerFilter {
|
||||||
public boolean select(Viewer viewer, Object parentElement, Object element) {
|
public boolean select(Viewer viewer, Object parentElement, Object element) {
|
||||||
if (searchValue == null || searchValue.length() == 0)
|
if (searchValue == null || searchValue.length() == 0)
|
||||||
return true;
|
return true;
|
||||||
if(element instanceof ITx) {
|
ITx iTx = null;
|
||||||
ITx iTx = (ITx) element;
|
if(element instanceof ITx)
|
||||||
List<ITxAttribute> res = iTx.getAttributes().stream().filter(a -> searchProp.equals(a.getName())).collect(Collectors.toList());
|
iTx = (ITx) element;
|
||||||
if(res.size()==1) {
|
else if(element instanceof TransactionTreeNode && ((TransactionTreeNode)element).type == TransactionTreeNodeType.TX)
|
||||||
try {
|
iTx = ((TransactionTreeNode)element).element;
|
||||||
|
if(iTx==null) return true;
|
||||||
|
List<ITxAttribute> res = iTx.getAttributes().stream().filter(a -> searchProp.equals(a.getName())).collect(Collectors.toList());
|
||||||
|
if(res.size()==1) {
|
||||||
|
try {
|
||||||
ITxAttribute attr =res.get(0);
|
ITxAttribute attr =res.get(0);
|
||||||
switch(searchType) {
|
switch(searchType) {
|
||||||
case BOOLEAN: // bool
|
case BOOLEAN: // bool
|
||||||
|
@ -74,11 +78,9 @@ public class TxFilter extends ViewerFilter {
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} catch(RuntimeException ex) {
|
} catch(RuntimeException ex) {
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<relativePath>../..</relativePath>
|
<relativePath>../..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>com.minres.scviewer.e4.product</artifactId>
|
<artifactId>com.minres.scviewer.e4.product</artifactId>
|
||||||
<version>2.9.0-SNAPSHOT</version>
|
<version>2.9.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="product" id="com.minres.scviewer.e4.application.product" application="org.eclipse.e4.ui.workbench.swt.E4Application" version="2.9.0.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.1.qualifier" useFeatures="true" includeLaunchers="true">
|
||||||
|
|
||||||
<configIni use="default">
|
<configIni use="default">
|
||||||
</configIni>
|
</configIni>
|
||||||
|
@ -49,6 +49,7 @@
|
||||||
<features>
|
<features>
|
||||||
<feature id="com.minres.scviewer.e4.feature" installMode="root"/>
|
<feature id="com.minres.scviewer.e4.feature" installMode="root"/>
|
||||||
<feature id="com.minres.scviewer.e4.platform.feature" installMode="root"/>
|
<feature id="com.minres.scviewer.e4.platform.feature" installMode="root"/>
|
||||||
|
<feature id="org.eclipse.equinox.p2.core.feature" installMode="root"/>
|
||||||
</features>
|
</features>
|
||||||
|
|
||||||
<configurations>
|
<configurations>
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<relativePath>../..</relativePath>
|
<relativePath>../..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>com.minres.scviewer.e4.product_slim</artifactId>
|
<artifactId>com.minres.scviewer.e4.product_slim</artifactId>
|
||||||
<version>2.9.0-SNAPSHOT</version>
|
<version>2.9.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="product_slim" id="com.minres.scviewer.e4.application.product_slim" application="org.eclipse.e4.ui.workbench.swt.E4Application" version="2.9.0.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.1.qualifier" useFeatures="false" includeLaunchers="true">
|
||||||
|
|
||||||
<configIni use="default">
|
<configIni use="default">
|
||||||
</configIni>
|
</configIni>
|
||||||
|
|
Loading…
Reference in New Issue