PackageDescription: LibTidyBundle(Bundle)


Lib Tidy Bundle

Last published: September 27, 2004 by 'jamesr'

No bundle comment found. Component comments follow

PackageDescription: File Repository

This package allows you to place text files under VW's source control.
Create a subclass of FileRepository and add methods containing a pragma.

Refactoring Browser buttons are provided for comparing the internal and external version of files, updating the internal or external file and launching the Differator. Browsing a file method will automatically compare the internal and external file.
You must close and re-open Refactoring Browser's in order for the extensions be activated.

Internal files are not stored in the image, but are stored in the change file.
Adding a post load action to a StORE package of the form:
[:package | MyFileRepository updateAllInternalToExternal ] will cause external files to be created or updated if necessary when a package is loaded.

Enjoy,
David Pennell
Quallaby Corporation
---
Extensions by Cees de Groot @ Soops:
- pragma stores files in a gzipped string-encoded format;
- VersionedDirectory will suck in whole directories at a time (to be done - whole subdirectory trees ;-)).

To version a directory, create a subclass of VersionedDirectory and implement #directoryName on the class side. Optionally, override #externalFileListMatchBlock which allows you to filter out unwanted entries. The most useful methods on YourVersionedDirectory:

YourVersionedDirectory updateAllExternalToInternal - this synchronizes the class with what is on disk. If files have been deleted, their corresponding selectors are removed; if files have been added, they their corresponding selectors are created. You want to run this as the first thing after creating a VersionedDirectory subclass.

YourVersionedDirectory updateAllInternalToExternal - this writes out all files represented by the class to disk (at this moment, nothing on disk is removed although this should be trivial

PackageDescription: LibTidy

(XML.Tidy.TidyInterface current tidy: '

foo' onWarnings: [:w | ] onErrors: [:e | ]) asByteArray asStringEncoding: 'utf-8'

(XML.Tidy.TidyInterface current tidy: '

foo ॸ

' onWarnings: [:w | ] onErrors: [:e | ]) asByteArray asStringEncoding: 'utf-8'

XML.Tidy.TidyInterface current tidy: ('

',('

' asXML root elements first text),'

')
onWarnings: [:w | ] onErrors: [:e | ]