1
1
package io .sloeber .core .api ;
2
2
3
+ import static io .sloeber .core .Messages .*;
4
+ import static io .sloeber .core .common .Const .*;
5
+
3
6
import java .io .File ;
4
7
import java .io .FileReader ;
5
8
import java .io .IOException ;
27
30
import com .google .gson .Gson ;
28
31
29
32
import io .sloeber .core .Activator ;
30
- import io .sloeber .core .Messages ;
31
33
import io .sloeber .core .common .Common ;
32
34
import io .sloeber .core .common .ConfigurationPreferences ;
33
- import io .sloeber .core .common .Const ;
34
35
import io .sloeber .core .common .InstancePreferences ;
35
36
import io .sloeber .core .core .DefaultInstallHandler ;
36
37
import io .sloeber .core .managers .InternalPackageManager ;
@@ -50,10 +51,8 @@ public class LibraryManager {
50
51
private static final String PDE = "pde" ;//$NON-NLS-1$
51
52
private static final String CPP = "cpp" ;//$NON-NLS-1$
52
53
private static final String C = "c" ;//$NON-NLS-1$
53
- private static final String LIBRARY_PATH_SUFFIX = Const .LIBRARY_PATH_SUFFIX ;
54
54
private static final String LIBRARY_DESCRIPTOR_PREFIX = "Library" ; //$NON-NLS-1$
55
55
private static final String EXAMPLE_DESCRIPTOR_PREFIX = "Example" ; //$NON-NLS-1$
56
- private static final String FILE = Messages .FILE ;
57
56
58
57
static private List <LibraryIndex > libraryIndices ;
59
58
private static IInstallLibraryHandler myInstallLibraryHandler = new DefaultInstallHandler ();
@@ -188,10 +187,9 @@ public LibraryTree() {
188
187
for (io .sloeber .core .managers .Library library : libraryIndex .getLibraries (categoryName )) {
189
188
Library lib = category .libraries .get (library .getName () + " (" + libraryIndex .getName () + ")" ); //$NON-NLS-1$ //$NON-NLS-2$
190
189
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 );
195
193
category .libraries .put (library .getName () + " (" + libraryIndex .getName () + ")" , lib ); //$NON-NLS-1$//$NON-NLS-2$
196
194
}
197
195
lib .versions .add (new VersionNumber (library .getVersion ()));
@@ -297,7 +295,7 @@ static public void loadJson(File jsonFile) {
297
295
libraryIndices .add (index );
298
296
} catch (Exception e ) {
299
297
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 ));
301
299
jsonFile .delete ();// Delete the file so it stops damaging
302
300
}
303
301
}
0 commit comments