]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.ui/src/org/simantics/scl/ui/modulebrowser/CreateModuleAction.java
Externalize strings in org.simantics.scl.ui
[simantics/platform.git] / bundles / org.simantics.scl.ui / src / org / simantics / scl / ui / modulebrowser / CreateModuleAction.java
index 1d70442c85d709f5162f06da8e7427ca8b252404..fb47d553e0a19a4bc60c004dd4d1632966a04c4c 100644 (file)
@@ -12,15 +12,15 @@ import org.simantics.scl.ui.Activator;
 import gnu.trove.map.hash.THashMap;
 
 public class CreateModuleAction {
-    public static final String PREFIX = "reference:file:/";
+    public static final String PREFIX = "reference:file:/"; //$NON-NLS-1$
     
     public static final void createModule(Bundle bundle, String packageName, String moduleName) throws IOException {
         String bundleLocation = bundle.getLocation();
         bundleLocation = bundleLocation.substring(PREFIX.length());
         
-        Path packagePath = Paths.get(bundleLocation).resolve("scl").resolve(packageName);
+        Path packagePath = Paths.get(bundleLocation).resolve("scl").resolve(packageName); //$NON-NLS-1$
         Files.createDirectories(packagePath);
-        Path modulePath = packagePath.resolve(moduleName + ".scl");
+        Path modulePath = packagePath.resolve(moduleName + ".scl"); //$NON-NLS-1$
         if(Files.exists(modulePath))
             return;
         Files.createFile(modulePath);
@@ -31,7 +31,7 @@ public class CreateModuleAction {
         THashMap<String,Bundle> result = new THashMap<String,Bundle>();
         for(Bundle bundle : context.getBundles()) {
             String location = bundle.getLocation();
-            if(location.endsWith(".jar") || !location.startsWith(PREFIX))
+            if(location.endsWith(".jar") || !location.startsWith(PREFIX)) //$NON-NLS-1$
                 continue;
             location = location.substring(PREFIX.length());
             Path bundlePath = Paths.get(location);
@@ -46,21 +46,21 @@ public class CreateModuleAction {
         for(Bundle bundle : bundles.values()) {
             String location = bundle.getLocation();
             location = location.substring(PREFIX.length());
-            Path packagePath = Paths.get(location).resolve("scl").resolve(packageName);
+            Path packagePath = Paths.get(location).resolve("scl").resolve(packageName); //$NON-NLS-1$
             if(Files.exists(packagePath))
                 return bundle.getSymbolicName();
         }
         int p = packageName.lastIndexOf('/');
         if(p == -1)
-            return "";
+            return ""; //$NON-NLS-1$
         else
             return findBestPlugin(bundles, packageName.substring(0, p));
     }
 
     public static int packageMatchLength(Bundle bundle, String packageName) {
-        if(bundle.getEntry("scl") == null)
+        if(bundle.getEntry("scl") == null) //$NON-NLS-1$
             return 0;
-        packageName = "scl/" + packageName;
+        packageName = "scl/" + packageName; //$NON-NLS-1$
         while(packageName.length() > 3) {
             if(bundle.getEntry(packageName) != null)
                 return packageName.length();