From 57e03ac1a4c3650634c4f17e8b558973262a2e2a Mon Sep 17 00:00:00 2001 From: Kai Brassel <mail@khbrassel.de> Date: Tue, 16 Mar 2021 14:52:55 +0100 Subject: [PATCH] About dialog with Java version info --- .../application/handlers/AboutHandler.java | 19 ++++++++++--------- .../application/parts/CatalogPart.java | 1 - 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/de.hftstuttgart.buildingphysics.application/src/de/hftstuttgart/buildingphysics/application/handlers/AboutHandler.java b/de.hftstuttgart.buildingphysics.application/src/de/hftstuttgart/buildingphysics/application/handlers/AboutHandler.java index 798a578..cee68e9 100644 --- a/de.hftstuttgart.buildingphysics.application/src/de/hftstuttgart/buildingphysics/application/handlers/AboutHandler.java +++ b/de.hftstuttgart.buildingphysics.application/src/de/hftstuttgart/buildingphysics/application/handlers/AboutHandler.java @@ -1,6 +1,5 @@ package de.hftstuttgart.buildingphysics.application.handlers; -import org.eclipse.core.runtime.Platform; import org.eclipse.e4.core.di.annotations.Execute; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.swt.widgets.Shell; @@ -9,13 +8,15 @@ public class AboutHandler { @Execute public void execute(Shell shell) { String txt = """ - HfT Stuttgart - Building Physics Catalog - ---------------------------------------- - - Workspace allowsDefault: %s - Workspace getDefault: %s"""; - MessageDialog.openInformation(shell, "About", String.format(txt, - Platform.getInstanceLocation().allowsDefault(), - Platform.getInstanceLocation().getDefault())); + HfT Stuttgart - Building Physics Catalog + ---------------------------------------- + + Java version: %s + Java vendor: %s + java.vm.version: %s + java.version.date: %s"""; + MessageDialog.openInformation(shell, "About", + txt.formatted(System.getProperty("java.version"), System.getProperty("java.vendor"), + System.getProperty("java.vm.version"), System.getProperty("java.version.date"))); } } diff --git a/de.hftstuttgart.buildingphysics.application/src/de/hftstuttgart/buildingphysics/application/parts/CatalogPart.java b/de.hftstuttgart.buildingphysics.application/src/de/hftstuttgart/buildingphysics/application/parts/CatalogPart.java index 0031381..6dbd106 100644 --- a/de.hftstuttgart.buildingphysics.application/src/de/hftstuttgart/buildingphysics/application/parts/CatalogPart.java +++ b/de.hftstuttgart.buildingphysics.application/src/de/hftstuttgart/buildingphysics/application/parts/CatalogPart.java @@ -13,7 +13,6 @@ import org.eclipse.emf.ecp.ui.view.swt.ECPSWTViewRenderer; import org.eclipse.jface.layout.GridLayoutFactory; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Dialog; /** * Part for displaying a Forms Editor for a Building Physics Catalog. -- GitLab