Skip to content

Commit

Permalink
Improve PDF-Debug generation
Browse files Browse the repository at this point in the history
Add System.lineSeparator()
Add System.getProperty
  • Loading branch information
Nirus2000 committed Dec 2, 2024
1 parent b9083e5 commit 8924ae4
Showing 1 changed file with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 8924ae4

Please sign in to comment.