Merge branch 'release/2.0.2'

This commit is contained in:
2019-03-14 20:59:41 +01:00
14 changed files with 101 additions and 39 deletions

View File

@ -32,6 +32,7 @@
</children>
</children>
</children>
<children xsi:type="basic:Part" xmi:id="__VNlAIytEeWid7xO48ZBXw" elementId="com.minres.scviewer.e4.application.dialog.aboutscviewer" toBeRendered="false" visible="false" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.parts.AboutDialog" label="About SCViewer"/>
<mainMenu xmi:id="_95PfyXNmEeWBq8z1Dv39LA" elementId="menu:org.eclipse.ui.main.menu">
<children xsi:type="menu:Menu" xmi:id="_95QGwHNmEeWBq8z1Dv39LA" elementId="com.minres.scviewer.e4.application.menu.file" label="File">
<children xsi:type="menu:HandledMenuItem" xmi:id="_VJG3YHgvEeWwZ-9vrAR2UQ" elementId="" label="Open Database" iconURI="platform:/plugin/com.minres.scviewer.e4.application/icons/folder_database.png" command="_95PfwHNmEeWBq8z1Dv39LA"/>
@ -142,9 +143,6 @@
</children>
</trimBars>
</children>
<children xsi:type="basic:Window" xmi:id="_8BTkQIytEeWid7xO48ZBXw" elementId="com.minres.scviewer.e4.application.dialog.aboutscviewer" toBeRendered="false" visible="false" selectedElement="__VNlAIytEeWid7xO48ZBXw" label="About SCViewer" x="200" y="200">
<children xsi:type="basic:Part" xmi:id="__VNlAIytEeWid7xO48ZBXw" elementId="com.minres.scviewer.e4.application.part.0" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.parts.AboutDialog"/>
</children>
<handlers xmi:id="_95PfvXNmEeWBq8z1Dv39LA" elementId="com.minres.scviewer.e4.application.handler.quitCommand" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.QuitHandler" command="_95PfvHNmEeWBq8z1Dv39LA"/>
<handlers xmi:id="_95PfwXNmEeWBq8z1Dv39LA" elementId="com.minres.scviewer.e4.application.handler.openCommand" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.OpenHandler" command="_95PfwHNmEeWBq8z1Dv39LA"/>
<handlers xmi:id="_95PfxHNmEeWBq8z1Dv39LA" elementId="com.minres.scviewer.e4.application.handler.saveCommand" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.SaveHandler" command="_95Pfw3NmEeWBq8z1Dv39LA"/>

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.0.0.qualifier
Bundle-Version: 2.0.2.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,6 +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.0.2-SNAPSHOT</version>
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>

View File

@ -12,6 +12,7 @@ package com.minres.scviewer.e4.application.handlers;
import org.eclipse.e4.core.di.annotations.Execute;
import org.eclipse.e4.ui.model.application.MApplication;
import org.eclipse.e4.ui.model.application.ui.basic.MPart;
import org.eclipse.e4.ui.model.application.ui.basic.MWindow;
import org.eclipse.e4.ui.workbench.modeling.EModelService;
import org.eclipse.swt.widgets.Shell;
@ -22,9 +23,9 @@ public class AboutHandler {
@Execute
public void execute(Shell shell, MApplication app, MWindow window, EModelService ms /*@Named("mdialog01.dialog.0") MDialog dialog*/) {
MWindow dialog = (MWindow) ms.find(DIALOG_ID, app); //$NON-NLS-1$
dialog.setToBeRendered(true);
dialog.setToBeRendered(false);
MPart mel = (MPart) ms.find(DIALOG_ID, app); //$NON-NLS-1$
mel.setToBeRendered(true);
mel.setToBeRendered(false);
}
}

View File

@ -1,5 +1,5 @@
AboutDialog_0=\nSCViewer - a SystemC waveform viewer\n\nVersion: 2.0\n
AboutDialog_1=\nCopyright (c) 2015, 2018 MINRES Technologies GmbH and others.\n\nAll rights reserved. MINRES and the MINRES logo are trademarks of MINRES Technologies GmbH, http://www.minres.com/. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html\n\nParts of the software are governed by the Apache License Version 2.0 available at http://www.apache.org/licenses/. These are namely org.mapdb and org.sqlite JDBC driver\n\nSources code is hosted at https://git.minres.com/VP/SCViewer and the master branch is mirrored to GitHub: https://git.com/minres/SCViewer\n
AboutDialog_1=\nCopyright (c) 2015, 2018 MINRES Technologies GmbH and others.\n\nAll rights reserved. MINRES and the MINRES logo are trademarks of MINRES Technologies GmbH, http://www.minres.com/. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html\n\nParts of the software are governed by the Apache License Version 2.0 available at http://www.apache.org/licenses/. These are namely org.mapdb and org.sqlite JDBC driver\n\nSource code is hosted at https://git.minres.com/VP/SCViewer and the master branch is mirrored to GitHub: https://git.com/minres/SCViewer\n
DesignBrowser_12=Append all after
DesignBrowser_16=Insert all before
DesignBrowser_2=Enter text to filter waveforms

View File

@ -75,7 +75,7 @@ public class AboutDialog extends Dialog {
Composite composite = new Composite(parent, SWT.NONE);
GridData gd_composite = new GridData(SWT.LEFT, SWT.FILL, true, true);
gd_composite.widthHint = 600;
gd_composite.heightHint =250;
gd_composite.heightHint =300;
composite.setLayoutData(gd_composite);
composite.setLayout(new GridLayout(2, false));
@ -86,7 +86,7 @@ public class AboutDialog extends Dialog {
Canvas canvas = new Canvas(composite,SWT.NO_REDRAW_RESIZE);
GridData gd_canvas = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_canvas.widthHint = 200;
gd_canvas.heightHint =250;
gd_canvas.heightHint =300;
canvas.setLayoutData(gd_canvas);
canvas.addPaintListener(new PaintListener() {
public void paintControl(PaintEvent e) {
@ -97,7 +97,7 @@ public class AboutDialog extends Dialog {
}
});
StyledText styledText = new StyledText(composite, SWT.BORDER);
StyledText styledText = new StyledText(composite, SWT.V_SCROLL | SWT.BORDER);
styledText.setEditable(false);
GridData gd_styledText = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
styledText.setLayoutData(gd_styledText);

View File

@ -29,9 +29,11 @@ import org.eclipse.jface.viewers.IDoubleClickListener;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.ITreeViewerListener;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.StyledString;
import org.eclipse.jface.viewers.TreeExpansionEvent;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.TreeViewerColumn;
import org.eclipse.jface.viewers.Viewer;
@ -51,6 +53,7 @@ import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeItem;
import com.minres.scviewer.database.ITx;
import com.minres.scviewer.database.ITxAttribute;
@ -129,6 +132,19 @@ public class TransactionDetails {
treeViewer.addFilter(attributeFilter);
treeViewer.setComparator(viewSorter);
treeViewer.setAutoExpandLevel(2);
treeViewer.addTreeListener(new ITreeViewerListener() {
@Override
public void treeCollapsed(TreeExpansionEvent event) {
treeViewer.getSelection();
}
@Override
public void treeExpanded(TreeExpansionEvent event) {
treeViewer.getSelection();
}
});
// Set up the table
Tree tree = treeViewer.getTree();
@ -247,6 +263,21 @@ public class TransactionDetails {
this.waveformViewerPart=part;
}
public void setInput(Object object) {
if(object instanceof ITx){
TreeItem obj = treeViewer.getTree().getTopItem();
Rectangle bounds = null;
if(obj!=null) bounds=obj.getBounds();
treeViewer.setInput(object);
if(bounds!=null) {
TreeItem ti = treeViewer.getTree().getItem (new Point(bounds.x, bounds.y));
treeViewer.getTree().setTopItem(ti);
}
} else {
treeViewer.setInput(null);
}
}
/**
* Sets the selection.
*
@ -256,12 +287,7 @@ public class TransactionDetails {
public void setSelection(@Named(IServiceConstants.ACTIVE_SELECTION) @Optional IStructuredSelection selection){
if(treeViewer!=null && selection!=null && !treeViewer.getTree().isDisposed()){
if( selection instanceof IStructuredSelection) {
Object object= ((IStructuredSelection)selection).getFirstElement();
if(object instanceof ITx){
treeViewer.setInput(object);
} else {
treeViewer.setInput(null);
}
setInput(((IStructuredSelection)selection).getFirstElement());
}
}
}