diff --git a/com.minres.scviewer.target/com.minres.scviewer.target.target b/com.minres.scviewer.target/com.minres.scviewer.target.target
index 57ff270..4408563 100644
--- a/com.minres.scviewer.target/com.minres.scviewer.target.target
+++ b/com.minres.scviewer.target/com.minres.scviewer.target.target
@@ -20,6 +20,13 @@
+
+
+
+
+
+
+
diff --git a/plugins/com.minres.scviewer.e4.application/.settings/org.eclipse.pde.core.prefs b/plugins/com.minres.scviewer.e4.application/.settings/org.eclipse.pde.core.prefs
index 4b08937..f29e940 100644
--- a/plugins/com.minres.scviewer.e4.application/.settings/org.eclipse.pde.core.prefs
+++ b/plugins/com.minres.scviewer.e4.application/.settings/org.eclipse.pde.core.prefs
@@ -1,2 +1,3 @@
eclipse.preferences.version=1
pluginProject.extensions=false
+resolve.requirebundle=false
diff --git a/plugins/com.minres.scviewer.e4.application/Application.e4xmi b/plugins/com.minres.scviewer.e4.application/Application.e4xmi
index baa15c1..491b550 100644
--- a/plugins/com.minres.scviewer.e4.application/Application.e4xmi
+++ b/plugins/com.minres.scviewer.e4.application/Application.e4xmi
@@ -54,6 +54,7 @@
+
@@ -137,6 +138,7 @@
+
type:user
@@ -277,6 +279,7 @@
+
diff --git a/plugins/com.minres.scviewer.e4.application/META-INF/MANIFEST.MF b/plugins/com.minres.scviewer.e4.application/META-INF/MANIFEST.MF
index b169c00..d0d19ec 100644
--- a/plugins/com.minres.scviewer.e4.application/META-INF/MANIFEST.MF
+++ b/plugins/com.minres.scviewer.e4.application/META-INF/MANIFEST.MF
@@ -31,7 +31,11 @@ Require-Bundle: javax.inject;bundle-version="1.0.0",
org.eclipse.core.resources;bundle-version="3.13.0",
javax.annotation;bundle-version="1.2.0",
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
Import-Package: com.minres.scviewer.database,
javax.inject;version="1.0.0"
diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/UpdateHandler.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/UpdateHandler.java
new file mode 100644
index 0000000..1c26b8d
--- /dev/null
+++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/UpdateHandler.java
@@ -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");
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/TransactionList.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/TransactionList.java
index cae3de4..6b09468 100644
--- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/TransactionList.java
+++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/TransactionList.java
@@ -1,7 +1,6 @@
package com.minres.scviewer.e4.application.parts;
import java.util.ArrayList;
-import java.util.Collection;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
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.e4.application.parts.txTableTree.AbstractTransactionTreeContentProvider;
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;
public class TransactionList extends Composite {
@@ -115,12 +116,14 @@ public class TransactionList extends Composite {
int idx = searchPropCombo.getSelectionIndex();
AttributeNameBean sel = attrNames.get(idx);
txFilter.setSearchProp(sel.getName(), sel.getType());
+ treeViewer.refresh();
}
@Override
public void widgetDefaultSelected(SelectionEvent e) {
int idx = searchPropCombo.getSelectionIndex();
AttributeNameBean sel = attrNames.get(idx);
txFilter.setSearchProp(sel.getName(), sel.getType());
+ treeViewer.refresh();
}
});
@@ -131,7 +134,6 @@ public class TransactionList extends Composite {
public void modifyText(ModifyEvent e) {
txFilter.setSearchValue(((Text) e.widget).getText());
treeViewer.refresh();
- //treeViewer.expandAll(false);
}
});
@@ -150,25 +152,21 @@ public class TransactionList extends Composite {
@Override
public void widgetSelected(SelectionEvent e) {
int idx = viewPropCombo.getSelectionIndex();
- AttributeNameBean sel = attrNames.get(idx);
- nameLabelProvider.setShowProp(sel.getName());
+ nameLabelProvider.setShowProp(attrNames.get(idx).getName());
treeViewer.refresh(true);
}
@Override
public void widgetDefaultSelected(SelectionEvent e) { }
});
- treeViewer = new TreeViewer(this, SWT.BORDER);
+ treeViewer = new TreeViewer(this);
treeViewer.setContentProvider(new AbstractTransactionTreeContentProvider(waveformViewer) {
- @SuppressWarnings("rawtypes")
+ @SuppressWarnings("unchecked")
@Override
public Object[] getElements(Object inputElement) {
- if (inputElement instanceof Object[]) {
- return (Object[]) inputElement;
- }
- if (inputElement instanceof Collection) {
- return ((Collection) inputElement).toArray();
+ if (inputElement instanceof ArrayList>) {
+ return ((ArrayList) inputElement).stream().map(tx-> new TransactionTreeNode(tx, TransactionTreeNodeType.TX)).collect(Collectors.toList()).toArray();
}
return new Object[0];
}
@@ -181,6 +179,8 @@ public class TransactionList extends Composite {
Object selected = treeSelection.getFirstElement();
if(selected instanceof ITx){
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() {
- stream.getEvents().values().parallelStream().forEach(evtLst -> {
- evtLst.forEach(evt -> {
- if(evt.getType()==Type.BEGIN) {
- eventList.add(evt.getTransaction());
- for(ITxAttribute attr: evt.getTransaction().getAttributes()) {
+ eventList = stream.getEvents().values().parallelStream()
+ .flatMap(List::stream)
+ .filter(evt -> evt.getType()==Type.BEGIN)
+ .map(evt-> {
+ ITx tx = evt.getTransaction();
+ for(ITxAttribute attr: tx.getAttributes()) {
propNames.put(attr.getName(), attr.getDataType());
}
- }
- });
- });
- eventList = eventList.parallelStream().sorted((t1, t2)-> t1.getBeginTime().compareTo(t2.getBeginTime())).collect(Collectors.toList());
+ return tx;
+ })
+ .sorted((t1, t2)-> t1.getBeginTime().compareTo(t2.getBeginTime()))
+ .collect(Collectors.toList());
getDisplay().asyncExec(new Runnable() {
@Override
public void run() {
@@ -265,6 +266,7 @@ public class TransactionList extends Composite {
searchPropComboViewer.setInput(attrNames);
searchPropComboViewer.setSelection(new StructuredSelection(searchPropComboViewer.getElementAt(0)));
}
+ treeViewer.refresh(true);
}
});
}
diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/txTableTree/AbstractTransactionTreeContentProvider.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/txTableTree/AbstractTransactionTreeContentProvider.java
index d9604e2..9934945 100644
--- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/txTableTree/AbstractTransactionTreeContentProvider.java
+++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/txTableTree/AbstractTransactionTreeContentProvider.java
@@ -46,38 +46,39 @@ public abstract class AbstractTransactionTreeContentProvider implements ITreeCon
@Override
public Object[] getChildren(Object element) {
if(element instanceof ITx) {
- return new Object[]{
- new TransactionTreeNode((ITx)element, TransactionTreeNodeType.ATTRS)
- };
+ return new Object[]{new TransactionTreeNode((ITx)element, TransactionTreeNodeType.ATTRS)};
} else if(element instanceof TransactionTreeNode){
- TransactionTreeNode propertyHolder=(TransactionTreeNode) element;
- if(propertyHolder.type == TransactionTreeNodeType.PROPS){
+ TransactionTreeNode node=(TransactionTreeNode) element;
+ switch(node.type) {
+ case PROPS:
return new Object[][]{
- {Messages.TransactionDetails_1, Messages.TransactionDetails_16, propertyHolder.element.getStream().getFullName()},
- {Messages.TransactionDetails_2, Messages.TransactionDetails_16, propertyHolder.element.getGenerator().getName()},
- {Messages.TransactionDetails_19, Messages.TransactionDetails_20, waveformViewerPart.getScaledTime(propertyHolder.element.getBeginTime())},
- {Messages.TransactionDetails_21, Messages.TransactionDetails_20, waveformViewerPart.getScaledTime(propertyHolder.element.getEndTime())}
+ {Messages.TransactionDetails_1, Messages.TransactionDetails_16, node.element.getStream().getFullName()},
+ {Messages.TransactionDetails_2, Messages.TransactionDetails_16, node.element.getGenerator().getName()},
+ {Messages.TransactionDetails_19, Messages.TransactionDetails_20, waveformViewerPart.getScaledTime(node.element.getBeginTime())},
+ {Messages.TransactionDetails_21, Messages.TransactionDetails_20, waveformViewerPart.getScaledTime(node.element.getEndTime())}
};
- }else if(propertyHolder.type == TransactionTreeNodeType.ATTRS || propertyHolder.type == TransactionTreeNodeType.HIER)
- return propertyHolder.getAttributeListForHier();
- else if(propertyHolder.type == TransactionTreeNodeType.IN_REL){
- Vector