Merge branch 'jake' of git://github.com/280north/cappuccino into jake

This commit is contained in:
Klaas Pieter Annema committed 2010-02-03 10:16:45 +01:00
commit 5940e6913d
4 files changed
+1379 -98

No files matched your search

+3
View File
@@ -70,6 +70,9 @@ task ("documentation", function()
{
if (executableExists("doxygen"))
{
if (OS.system(["ruby", FILE.join("Tools", "Documentation", "make_headers")]))
OS.exit(1); //rake abort if ($? != 0)
if (OS.system(["doxygen", FILE.join("Tools", "Documentation", "Cappuccino.doxygen")]))
OS.exit(1); //rake abort if ($? != 0)
+1 -1
View File
@@ -391,7 +391,7 @@ objj_preprocessor.prototype.implementation = function(tokens, /*objj_stringBuffe
else
{
this._currentSuperClass = "objj_getClass(\"" + superclass_name + "\")";
this._currentSuperMetaClass = "objj_getMeraClass(\"" + superclass_name + "\")";
this._currentSuperMetaClass = "objj_getMetaClass(\"" + superclass_name + "\")";
}
}
else
File diff suppressed because it is too large. Load diff
+46
View File
@@ -0,0 +1,46 @@
#! /usr/bin/env ruby
@outputFiles = []
def makeHeaderFileFrom(fileName)
# Grab the entire file (text)
data = File.new(fileName).read
# Extract out all the "implementation" lines. Note, there may be
# more than on in a given .j file.
m = data.scan(/.*?(@implementation.*?\{.*?\})/m)
if m.length > 0
for i in 0...m.length
line = m[i][0]
# Skip category definitions
if not /.*?\(.*?\).*?\{/m.match(line)
# Extract the class name
m2 = line.scan(/.*?@implementation(.*?):.*/m)
if !m2.nil? && !m2[0].nil?
className = m2[0][0].strip()
# Change "implementation" to "interface", create the .h file, and write the interface
newLine = line.sub("implementation", "interface")
newFileName = File.dirname(fileName) + "/" + className + ".h"
f = File.new(newFileName, "w")
f.write(newLine + "\n@end")
f.close()
@outputFiles.push(newFileName)
end
end
end
end
end
fileList = Dir['AppKit/**/*.j'] + Dir['Foundation/**/*.j']
for fileName in fileList
makeHeaderFileFrom(fileName)
end
for fileName in @outputFiles
File.delete(fileName)
end