From 701733e69d05ade7b4efd64f1358b4f9313353c0 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Fri, 15 Mar 2019 08:50:12 +0100 Subject: [PATCH] Updated version numbers and display in about dialog --- com.minres.scviewer.e4.application/META-INF/MANIFEST.MF | 2 +- com.minres.scviewer.e4.application/pom.xml | 2 +- .../minres/scviewer/e4/application/messages.properties | 4 ++-- .../minres/scviewer/e4/application/parts/AboutDialog.java | 8 +++++++- com.minres.scviewer.e4.product/pom.xml | 2 +- com.minres.scviewer.e4.product/scviewer.product | 2 +- 6 files changed, 13 insertions(+), 7 deletions(-) diff --git a/com.minres.scviewer.e4.application/META-INF/MANIFEST.MF b/com.minres.scviewer.e4.application/META-INF/MANIFEST.MF index 0d9c4c9..0e1400a 100644 --- a/com.minres.scviewer.e4.application/META-INF/MANIFEST.MF +++ b/com.minres.scviewer.e4.application/META-INF/MANIFEST.MF @@ -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.2.qualifier +Bundle-Version: 2.0.4.qualifier Bundle-Vendor: %Bundle-Vendor Require-Bundle: javax.inject;bundle-version="1.0.0", org.eclipse.core.runtime;bundle-version="3.11.1", diff --git a/com.minres.scviewer.e4.application/pom.xml b/com.minres.scviewer.e4.application/pom.xml index 58c79e5..cd58a3e 100644 --- a/com.minres.scviewer.e4.application/pom.xml +++ b/com.minres.scviewer.e4.application/pom.xml @@ -1,7 +1,7 @@ 4.0.0 com.minres.scviewer.e4.application - 2.0.2-SNAPSHOT + 2.0.4-SNAPSHOT com.minres.scviewer com.minres.scviewer.parent diff --git a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/messages.properties b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/messages.properties index 5485315..c5e0081 100644 --- a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/messages.properties +++ b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/messages.properties @@ -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\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 +AboutDialog_0=\nSCViewer - a SystemC waveform viewer\n\nVersion: {0}\n +AboutDialog_1=\nCopyright (c) 2015, 2019 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 diff --git a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/AboutDialog.java b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/AboutDialog.java index 691e378..b832f0b 100644 --- a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/AboutDialog.java +++ b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/AboutDialog.java @@ -19,8 +19,10 @@ import java.util.regex.Pattern; import javax.annotation.PostConstruct; import javax.inject.Inject; +import org.eclipse.core.runtime.Platform; import org.eclipse.jface.dialogs.Dialog; import org.eclipse.jface.dialogs.IDialogConstants; +import org.eclipse.osgi.util.NLS; import org.eclipse.swt.SWT; import org.eclipse.swt.custom.StyleRange; import org.eclipse.swt.custom.StyledText; @@ -39,6 +41,7 @@ import org.eclipse.swt.widgets.Listener; import org.eclipse.swt.widgets.Shell; import org.eclipse.wb.swt.ResourceManager; import org.eclipse.wb.swt.SWTResourceManager; +import org.osgi.framework.Version; import com.minres.scviewer.e4.application.Messages; @@ -101,7 +104,10 @@ public class AboutDialog extends Dialog { styledText.setEditable(false); GridData gd_styledText = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1); styledText.setLayoutData(gd_styledText); - styledText.setText(productTitle+copyrightText); + Version version = Platform.getProduct().getDefiningBundle().getVersion(); + String versionString = String.format("%d.%d.%d", version.getMajor(), version.getMinor(), version.getMicro()); + String pt = NLS.bind(Messages.AboutDialog_0, versionString); + styledText.setText(pt+copyrightText); styledText.setBackground(white); styledText.setWordWrap(true); styledText.setLeftMargin(5); diff --git a/com.minres.scviewer.e4.product/pom.xml b/com.minres.scviewer.e4.product/pom.xml index a3cc935..e196163 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.0.2-SNAPSHOT + 2.0.4-SNAPSHOT eclipse-repository com.minres.scviewer diff --git a/com.minres.scviewer.e4.product/scviewer.product b/com.minres.scviewer.e4.product/scviewer.product index fe82252..bd763f1 100644 --- a/com.minres.scviewer.e4.product/scviewer.product +++ b/com.minres.scviewer.e4.product/scviewer.product @@ -1,7 +1,7 @@ - +