diff --git a/plugins/org.eclipse.fordiac.ide.library/src/org/eclipse/fordiac/ide/library/LibraryManager.java b/plugins/org.eclipse.fordiac.ide.library/src/org/eclipse/fordiac/ide/library/LibraryManager.java index 5b5ac153fa..976e4f62ea 100644 --- a/plugins/org.eclipse.fordiac.ide.library/src/org/eclipse/fordiac/ide/library/LibraryManager.java +++ b/plugins/org.eclipse.fordiac.ide.library/src/org/eclipse/fordiac/ide/library/LibraryManager.java @@ -12,10 +12,10 @@ *******************************************************************************/ package org.eclipse.fordiac.ide.library; +import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; -import java.net.URISyntaxException; import java.nio.file.DirectoryStream.Filter; import java.nio.file.FileSystems; import java.nio.file.Files; @@ -299,6 +299,11 @@ public java.net.URI extractLibrary(final Path path, final IProject project, fina } checkLibChanges(); + // strip potential trailing slash + if (folderName.endsWith("/")) { //$NON-NLS-1$ + folderName = folderName.substring(0, folderName.length() - 1); + } + final java.net.URI importURI = URIUtil.append(workspaceLibraryURI, folderName); if (autoImport && project != null) { @@ -1125,12 +1130,10 @@ public void addLibraryChangeListener() { } private static Path getStandardLibPath() { - try { - final Path fordiacInstallPath = Paths.get(Platform.getInstallLocation().getURL().toURI()); - return fordiacInstallPath.resolve(TypeLibraryTags.TYPE_LIBRARY); - } catch (final URISyntaxException e) { - FordiacLogHelper.logError("Cannot resolve system lib path!", e); //$NON-NLS-1$ - } - return null; + // go why a java file to handle any special characters in the installation + // location URL + final File installLocationFile = new File(Platform.getInstallLocation().getURL().getPath()); + final Path fordiacInstallPath = installLocationFile.toPath(); + return fordiacInstallPath.resolve(TypeLibraryTags.TYPE_LIBRARY); } } diff --git a/plugins/org.eclipse.fordiac.ide.product/org.eclipse.fordiac.ide.product b/plugins/org.eclipse.fordiac.ide.product/org.eclipse.fordiac.ide.product index f02ee07fbf..194d53fa91 100644 --- a/plugins/org.eclipse.fordiac.ide.product/org.eclipse.fordiac.ide.product +++ b/plugins/org.eclipse.fordiac.ide.product/org.eclipse.fordiac.ide.product @@ -23,6 +23,7 @@ -Dorg.eclipse.swt.graphics.Resource.reportNonDisposed=true -Declipse.e4.inject.javax.warning=false -Dorg.slf4j.simpleLogger.defaultLogLevel=off +-Dswt.autoScale=exact -XX:+UseG1GC -XX:+UseStringDeduplication -Dosgi.dataAreaRequiresExplicitInit=true