Remove importClass for java.io.File

This commit is contained in:
tlrobinson
2009-05-10 03:56:13 -07:00
parent dcec480f08
commit 6c0a281ac2
3 changed files with 8 additions and 13 deletions
+1 -2
View File
@@ -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,
+2 -5
View File
@@ -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)
+5 -6
View File
@@ -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")
{