Exemple #1
0
def main(cix_filename, updatePerforce=False):
    cix_yui = createCixRoot(name="YUI-%s" % (yui_major_minor_version, ),
                            description="Yahoo! User Interface Library - v%s" % (yui_version))
    #cix_yui_file = createCixFile(cix_yui, "yui", lang="JavaScript")
    #cix_yui_module = createCixModule(cix_yui_file, "*", lang="JavaScript")

    files = getYUIFilesFromWebpage()
    jscile = JavaScriptCiler(Manager(), "yui")
    for filename, content in files.items():
        if filename in ("utilities.js",
                        "yahoo-dom-event.js",   # v2.2.0
                        "yahoo-event-dom.js",
                        "yuiloader-dom-event.js"):  # v2.7.0
            # This is just a compressed up version of multiple files
            continue
        print "filename: %r" % (filename)
        jscile.path = filename
        jscile.scan_puretext(content, updateAllScopeNames=False)
    print "updating scope names"
    jscile.cile.updateAllScopeNames()
    # Convert the Javascript to CIX, content goes into cix element
    #jscile.toElementTree(cix)
    print "converting to cix"
    jscile.convertToElementTreeFile(cix_yui, "JavaScript")

    #mergeElementTreeScopes(cix_yui_module)

    #remove_cix_line_numbers_from_tree(cix_yui)

    # Write out the tree
    print "writing cix"
    updateCix(cix_filename, get_cix_string(cix_yui), updatePerforce)
    print "done"
def main(cix_filename, toolkit_jar_file, updatePerforce=False):
    cix_komodo = createCixRoot(name="Mozilla Toolkit", description="Mozilla Toolkit API - version 1.8")
    #cix_yui_file = createCixFile(cix_yui, "yui", lang="JavaScript")
    #cix_yui_module = createCixModule(cix_yui_file, "*", lang="JavaScript")

    print "cix_filename: %r" % (cix_filename, )
    filenames_and_content = getMozillaToolkitFilenamesAndContent(toolkit_jar_file)
    jscile = JavaScriptCiler(Manager(), "Mozilla Toolkit")
    for filename, content in filenames_and_content.items():
        jscile.scan_puretext(content)
    jscile.convertToElementTreeFile(cix_komodo, "JavaScript")

    #mergeElementTreeScopes(cix_yui_module)
    #remove_cix_line_numbers_from_tree(cix_komodo)

    #remove_private_elements(cix_komodo)

    # Write out the tree
    updateCix(cix_filename, get_cix_string(cix_komodo), updatePerforce)
def main(cix_filename, toolkit_jar_file, updatePerforce=False):
    cix_komodo = createCixRoot(name="Mozilla Toolkit",
                               description="Mozilla Toolkit API - version 1.8")
    #cix_yui_file = createCixFile(cix_yui, "yui", lang="JavaScript")
    #cix_yui_module = createCixModule(cix_yui_file, "*", lang="JavaScript")

    print "cix_filename: %r" % (cix_filename, )
    filenames_and_content = getMozillaToolkitFilenamesAndContent(
        toolkit_jar_file)
    jscile = JavaScriptCiler(Manager(), "Mozilla Toolkit")
    for filename, content in filenames_and_content.items():
        jscile.scan_puretext(content)
    jscile.convertToElementTreeFile(cix_komodo, "JavaScript")

    #mergeElementTreeScopes(cix_yui_module)
    #remove_cix_line_numbers_from_tree(cix_komodo)

    #remove_private_elements(cix_komodo)

    # Write out the tree
    updateCix(cix_filename, get_cix_string(cix_komodo), updatePerforce)
def main(cix_filename):
    cix = createCixRoot(name="%s_%s" % (library_name,
                                        library_version.replace(".", "")),
                        description="%s JavaScript framework - version %s" % (
                                         library_name, library_version))
    files = getFilesFromWebpage()
    jscile = JavaScriptCiler(Manager(), "extjs")
    for path, (dirname, filename, content) in files["source"].items():
        dir_split = dirname.split("/")
        if ("source" in dir_split and not filename.startswith("ext-lang-")) or \
           ("src" in dir_split and not "adapter" in dir_split):
            print "filename: %r" % (filename)
            jscile.path = filename
            jscile.scan_puretext(content.decode("utf-8"), updateAllScopeNames=False)

    jscile.cile.updateAllScopeNames()
    jscile.cile.name = "%s_%s" % (library_name.lower(),
                                  library_version.replace(".", ""))
    # Convert the Javascript to CIX, content goes into cix element
    jscile.convertToElementTreeFile(cix, "JavaScript")
    # Write out the tree
    updateCix(cix_filename, get_cix_string(cix))
Exemple #5
0
def main(cix_filename):
    cix = createCixRoot(name="%s_%s" %
                        (library_name, library_version.replace(".", "")),
                        description="%s JavaScript framework - version %s" %
                        (library_name, library_version))
    files = getFilesFromWebpage()
    jscile = JavaScriptCiler(Manager(), "extjs")
    for path, (dirname, filename, content) in files["source"].items():
        dir_split = dirname.split("/")
        if ("source" in dir_split and not filename.startswith("ext-lang-")) or \
           ("src" in dir_split and not "adapter" in dir_split):
            print "filename: %r" % (filename)
            jscile.path = filename
            jscile.scan_puretext(content.decode("utf-8"),
                                 updateAllScopeNames=False)

    jscile.cile.updateAllScopeNames()
    jscile.cile.name = "%s_%s" % (library_name.lower(),
                                  library_version.replace(".", ""))
    # Convert the Javascript to CIX, content goes into cix element
    jscile.convertToElementTreeFile(cix, "JavaScript")
    # Write out the tree
    updateCix(cix_filename, get_cix_string(cix))