From 8924ae41c8708f14fa683fbb29646339fcc02321 Mon Sep 17 00:00:00 2001 From: Alexander Ott Date: Mon, 2 Dec 2024 19:02:19 +0100 Subject: [PATCH] Improve PDF-Debug generation Add System.lineSeparator() Add System.getProperty --- .../ui/handlers/CreateTextFromPDFHandler.java | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/name.abuchen.portfolio.ui/src/name/abuchen/portfolio/ui/handlers/CreateTextFromPDFHandler.java b/name.abuchen.portfolio.ui/src/name/abuchen/portfolio/ui/handlers/CreateTextFromPDFHandler.java index 65e84c1ed9..7c80bd618e 100644 --- a/name.abuchen.portfolio.ui/src/name/abuchen/portfolio/ui/handlers/CreateTextFromPDFHandler.java +++ b/name.abuchen.portfolio.ui/src/name/abuchen/portfolio/ui/handlers/CreateTextFromPDFHandler.java @@ -48,16 +48,22 @@ public void execute(@Named(IServiceConstants.ACTIVE_PART) MPart part, StringBuilder textBuilder = new StringBuilder(); textBuilder.append("```") //$NON-NLS-1$ - .append("\n"); //$NON-NLS-1$ + .append(System.lineSeparator()); textBuilder.append("PDFBox Version: ") //$NON-NLS-1$ .append(inputFile.getPDFBoxVersion().toString()) // - .append("\n"); //$NON-NLS-1$ + .append(System.lineSeparator()); textBuilder.append("Portfolio Performance Version: ") //$NON-NLS-1$ .append(PortfolioPlugin.getDefault().getBundle().getVersion().toString()) // - .append("\n"); //$NON-NLS-1$ - textBuilder.append("-----------------------------------------\n"); //$NON-NLS-1$ + .append(System.lineSeparator()); + textBuilder.append("System: ") //$NON-NLS-1$ + .append(System.getProperty("osgi.os")).append(" | ") //$NON-NLS-1$ //$NON-NLS-2$ + .append(System.getProperty("osgi.arch")).append(" | ") //$NON-NLS-1$ //$NON-NLS-2$ + .append(System.getProperty("java.vm.version")).append(" | ") //$NON-NLS-1$ //$NON-NLS-2$ + .append(System.getProperty("java.vm.vendor")) //$NON-NLS-1$ + .append(System.lineSeparator()); + textBuilder.append("-----------------------------------------").append(System.lineSeparator()); //$NON-NLS-1$ textBuilder.append(inputFile.getText().replace("\r", "")) //$NON-NLS-1$ //$NON-NLS-2$ - .append("\n"); //$NON-NLS-1$ + .append(System.lineSeparator()); textBuilder.append("```"); //$NON-NLS-1$ String text = textBuilder.toString();