trunk/loadAll
author Jan Vrany <jan.vrany@fit.cvut.cz>
Tue, 08 Apr 2008 19:47:42 +0000
changeset 0 5057afe1ec87
permissions -rw-r--r--
Initial import from CVS

"/
"/ $Header: /opt/data/cvs/stx/goodies/xmlsuite/loadAll,v 1.15 2007-11-06 14:48:24 wrobll1 Exp $
"/
"/ loadAll-file to fileIn code for: stx:goodies/xmlsuite
"/
"/ Automatically generated by the browsers generate-loadAll function.
"/ DO NOT MODIFY THIS fILE;
"/
"/
"/ Prerequisites:
"/
"/ Smalltalk loadPackage:'module:directory'.
"/ Smalltalk loadPackage:'....'.
!
'Executing preLoad script if any...' infoPrintCR.
Smalltalk fileIn:'preLoad.st'.
!
"{ package:'stx:goodies/xmlsuite' }"
!

|files|

'loading package stx:goodies/xmlsuite...' infoPrintCR.

files := #(
  'XMLv2__AbstractDOM3TestCase.st'
  'XMLv2__AbstractSAX2Handler.st'
  'XMLv2__AbstractW3CDOM3TestCase.st'
  'XMLv2__DOM3Inspector.st'
  'XMLv2__DOM3NodeDumper.st'
  'XMLv2__DOMBuilder.st'
  'XMLv2__DOMConfiguration.st'
  'XMLv2__DOMError.st'
  'XMLv2__DOMErrorHandler.st'
  'XMLv2__DOMErrorMonitor.st'
  'XMLv2__DOMImplementation.st'
  'XMLv2__DOMImplementationRegistry.st'
  'XMLv2__EncodingTests.st'
  'XMLv2__InputSource.st'
  'XMLv2__JamesClarkCanonicalXMLWriterTestResource.st'
  'XMLv2__JamesClarkCanonicalXMLWriterTests.st'
  'XMLv2__NameList.st'
  'XMLv2__Node.st'
  'XMLv2__NodeList.st'
  'XMLv2__NodeName.st'
  'XMLv2__ParseError.st'
  'XMLv2__Parser.st'
  'XMLv2__SAXError.st'
  'XMLv2__TypeInfo.st'
  'XMLv2__UserDataHandler.st'
  'XMLv2__W3XMLTestSuiteResource.st'
  'XMLv2__XMLBuilder.st'
  'XMLv2__XMLBuilderTests.st'
  'XMLv2__XMLReader.st'
  'XMLv2__XMLWriter.st'
  'XMLv2__XMLWriterTests.st'
  'XMLv2__Attr.st'
  'XMLv2__CharacterData.st'
  'XMLv2__CincomDOMXMLReader.st'
  'XMLv2__CincomImplementation.st'
  'XMLv2__ContentHandler.st'
  'XMLv2__DOM3XMLReader.st'
  'XMLv2__DOMException.st'
  'XMLv2__DTDHandler.st'
  'XMLv2__Document.st'
  'XMLv2__DocumentFragment.st'
  'XMLv2__DocumentType.st'
  'XMLv2__Element.st'
  'XMLv2__Entity.st'
  'XMLv2__EntityReference.st'
  'XMLv2__EntityResolver.st'
  'XMLv2__ErrorHandler.st'
  'XMLv2__IndentingXMLWriter.st'
  'XMLv2__JamesClarkCanonicalXMLWriter.st'
  'XMLv2__NamedNodeMap.st'
  'XMLv2__NodeTests.st'
  'XMLv2__Notation.st'
  'XMLv2__ProcessingInstruction.st'
  'XMLv2__SAXParseError.st'
  'XMLv2__W3CDOM3CoreTests.st'
  'XMLv2__XMLSuiteDOM3Implementation.st'
  'XMLv2__Attributes.st'
  'XMLv2__CDATASection.st'
  'XMLv2__Comment.st'
  'XMLv2__DOM3Builder.st'
  'XMLv2__IndentingAndHighlightingXMLWriter.st'
  'XMLv2__OldXMLWriter.st'
  'XMLv2__Text.st'
  'XMLv2__XMLSyntaxHighlightingWriter.st'
  'extensions.st'

) asOrderedCollection.

"/ see if there is a classLibrary
(Smalltalk fileInClassLibrary:'goodies/xmlsuite') ifTrue:[
    |handle loaded|

    handle := ObjectFileLoader loadedObjectHandles 
                    detect:[:h | h package = 'stx:goodies/xmlsuite'] ifNone:nil.
    handle ifNotNil:[
        loaded := Set new:(handle classes size).
        handle classes do:[:c| c isMeta ifFalse:[loaded add:c classFilename]].
        files := files asOrderedCollection select:[:f| (loaded includes:f) not].
    ].
].

"/ load files which are not in the classLibrary (all if there is none)
files size > 0 ifTrue:[
  ApplicationLoader::FileLoadingStartedEvent ifNotNil:[
    ApplicationLoader::FileLoadingStartedEvent new
        filenames:files;
        raise
    ].

  files do:[:f |
    f asFilename exists ifTrue:[
        Smalltalk fileIn:f.
        ApplicationLoader::FileLoadedEvent ifNotNil:[
            ApplicationLoader::FileLoadedEvent new
                raise
        ] ifNil:[
            '.' infoPrint.
        ]
    ] ifFalse:[
        Smalltalk fileIn:('source/' , f).
        ApplicationLoader::FileLoadedEvent ifNotNil:[
            ApplicationLoader::FileLoadedEvent new
                raise
        ] ifNil:[
            '.' infoPrint.
                ]
    ]

  ].
  ApplicationLoader::FileLoadingFinishedEvent ifNotNil:[
    ApplicationLoader::FileLoadingFinishedEvent new
        raise
    ].


  ' ' infoPrintCR.
].
' done (stx:goodies/xmlsuite).' infoPrintCR.
'Executing postLoad script if any...' infoPrintCR.
Smalltalk fileIn:'postLoad.st'.
!