From 6c0a281ac29d09bc6e040eb773474ded48e01276 Mon Sep 17 00:00:00 2001 From: tlrobinson Date: Sun, 10 May 2009 03:56:13 -0700 Subject: [PATCH] Remove importClass for java.io.File --- Objective-J/Tools/objj/bin/objjc | 3 +-- Objective-J/Tools/objj/bin/plutil | 7 ++----- Tools/nib2cib/main.j | 11 +++++------ 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/Objective-J/Tools/objj/bin/objjc b/Objective-J/Tools/objj/bin/objjc index 085295539..e1dff2f83 100755 --- a/Objective-J/Tools/objj/bin/objjc +++ b/Objective-J/Tools/objj/bin/objjc @@ -6,7 +6,6 @@ with (objjc) importPackage(java.lang); -importClass(java.io.File); importClass(java.io.BufferedReader); importClass(java.io.FileReader); importClass(java.io.BufferedWriter); @@ -123,7 +122,7 @@ function preprocess(aFilePath, outFilePath, gccArgs, flags) reader.close(); // Preprocess contents into fragments. - var filePath = new String(new File(aFilePath).getName()), + var filePath = new String(new java.io.File(aFilePath).getName()), fragments = objj_preprocess(fileContents, { path:"/x" }, {path:filePath}, flags), index = 0, count = fragments.length, diff --git a/Objective-J/Tools/objj/bin/plutil b/Objective-J/Tools/objj/bin/plutil index 2848fca66..6168fd7b5 100755 --- a/Objective-J/Tools/objj/bin/plutil +++ b/Objective-J/Tools/objj/bin/plutil @@ -1,8 +1,5 @@ #!/usr/bin/env narwhal -importPackage(java.lang); - -importClass(java.io.File); importClass(java.io.BufferedReader); importClass(java.io.FileReader); importClass(java.io.BufferedWriter); @@ -62,7 +59,7 @@ function main() for (; index < count; ++index) { // Read the plist file - var file = new File(filePaths[index]), + var file = new java.io.File(filePaths[index]), reader = new BufferedReader(new FileReader(file)), fileContents = ""; @@ -87,7 +84,7 @@ function main() var outFile = file; if (outPath) - outFile = new File(outPath); + outFile = new java.io.File(outPath); // else if (outExtension) diff --git a/Tools/nib2cib/main.j b/Tools/nib2cib/main.j index 6fa45fcb0..100badb6a 100644 --- a/Tools/nib2cib/main.j +++ b/Tools/nib2cib/main.j @@ -30,7 +30,6 @@ @import "Nib2CibKeyedUnarchiver.j" importPackage(java.io); -importClass(java.io.File); CPLogRegister(CPLogPrint); @@ -84,7 +83,7 @@ function convert(inputFileName, outputFileName, resourcesPath) if (resourcesPath) { - resourcesFile = new File(resourcesPath).getCanonicalFile(); + resourcesFile = new java.io.File(resourcesPath).getCanonicalFile(); if (!resourcesFile.canRead()) { @@ -101,7 +100,7 @@ function convert(inputFileName, outputFileName, resourcesPath) } // Compile xib or nib to make sure we have a non-new format nib. - var temporaryNibFile = Packages.java.io.File.createTempFile("temp", ".nib"), + var temporaryNibFile = java.io.File.createTempFile("temp", ".nib"), temporaryNibFilePath = temporaryNibFile.getAbsolutePath(); temporaryNibFile.deleteOnExit(); @@ -113,7 +112,7 @@ function convert(inputFileName, outputFileName, resourcesPath) } // Convert from binary plist to XML plist - var temporaryPlistFile = Packages.java.io.File.createTempFile("temp", ".plist"), + var temporaryPlistFile = java.io.File.createTempFile("temp", ".plist"), temporaryPlistFilePath = temporaryPlistFile.getAbsolutePath(); temporaryPlistFile.deleteOnExit(); @@ -171,7 +170,7 @@ function loadFrameworks(frameworkPaths, aCallback) var frameworkPath = frameworkPaths.shift(), - infoPlist = new File(frameworkPath + "/Info.plist"); + infoPlist = new java.io.File(frameworkPath + "/Info.plist"); if (!infoPlist.exists()) { @@ -179,7 +178,7 @@ function loadFrameworks(frameworkPaths, aCallback) java.lang.System.exit(1); } - var infoDictionary = readPlist(new File(frameworkPath + "/Info.plist")); + var infoDictionary = readPlist(new java.io.File(frameworkPath + "/Info.plist")); if ([infoDictionary objectForKey:@"CPBundlePackageType"] !== "FMWK") {