Skip to content

Commit d6df107

Browse files
author
jantje
committed
import static usage
1 parent 9d886c5 commit d6df107

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

io.sloeber.core/src/io/sloeber/core/api/LibraryManager.java

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
package io.sloeber.core.api;
22

3+
import static io.sloeber.core.Messages.*;
4+
import static io.sloeber.core.common.Const.*;
5+
36
import java.io.File;
47
import java.io.FileReader;
58
import java.io.IOException;
@@ -27,10 +30,8 @@
2730
import com.google.gson.Gson;
2831

2932
import io.sloeber.core.Activator;
30-
import io.sloeber.core.Messages;
3133
import io.sloeber.core.common.Common;
3234
import io.sloeber.core.common.ConfigurationPreferences;
33-
import io.sloeber.core.common.Const;
3435
import io.sloeber.core.common.InstancePreferences;
3536
import io.sloeber.core.core.DefaultInstallHandler;
3637
import io.sloeber.core.managers.InternalPackageManager;
@@ -50,10 +51,8 @@ public class LibraryManager {
5051
private static final String PDE = "pde";//$NON-NLS-1$
5152
private static final String CPP = "cpp";//$NON-NLS-1$
5253
private static final String C = "c";//$NON-NLS-1$
53-
private static final String LIBRARY_PATH_SUFFIX = Const.LIBRARY_PATH_SUFFIX ;
5454
private static final String LIBRARY_DESCRIPTOR_PREFIX = "Library"; //$NON-NLS-1$
5555
private static final String EXAMPLE_DESCRIPTOR_PREFIX = "Example"; //$NON-NLS-1$
56-
private static final String FILE = Messages.FILE;
5756

5857
static private List<LibraryIndex> libraryIndices;
5958
private static IInstallLibraryHandler myInstallLibraryHandler = new DefaultInstallHandler();
@@ -188,10 +187,9 @@ public LibraryTree() {
188187
for (io.sloeber.core.managers.Library library : libraryIndex.getLibraries(categoryName)) {
189188
Library lib = category.libraries.get(library.getName() + " (" + libraryIndex.getName() + ")"); //$NON-NLS-1$ //$NON-NLS-2$
190189
if (lib == null) {
191-
StringBuilder builder = new StringBuilder("Architectures:") //$NON-NLS-1$
192-
.append(library.getArchitectures().toString()).append("\n\n") //$NON-NLS-1$
193-
.append(library.getSentence());
194-
lib = new Library(category, library.getName(), libraryIndex.getName(), builder.toString());
190+
String builder = "Architectures:" + library.getArchitectures().toString() + "\n\n" //$NON-NLS-1$ //$NON-NLS-2$
191+
+ library.getSentence();
192+
lib = new Library(category, library.getName(), libraryIndex.getName(), builder);
195193
category.libraries.put(library.getName() + " (" + libraryIndex.getName() + ")", lib); //$NON-NLS-1$//$NON-NLS-2$
196194
}
197195
lib.versions.add(new VersionNumber(library.getVersion()));
@@ -297,7 +295,7 @@ static public void loadJson(File jsonFile) {
297295
libraryIndices.add(index);
298296
} catch (Exception e) {
299297
Common.log(new Status(IStatus.ERROR, Activator.getId(),
300-
Messages.Manager_Failed_to_parse.replace(FILE, jsonFile.getAbsolutePath()), e));
298+
Manager_Failed_to_parse.replace(FILE, jsonFile.getAbsolutePath()), e));
301299
jsonFile.delete();// Delete the file so it stops damaging
302300
}
303301
}

0 commit comments

Comments
 (0)