Smalltalk documentation tools?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Smalltalk documentation tools?

kobetic
"David Long"<[hidden email]> wrote:

> I was wondering what recommendations anyone may have for a tool that can

> create documentation for Smalltalk classes. I'm looking for something

> that

> would be able to write them out to html or some readable format.



In Xtreams we're using google-style wiki markup in package comments so that we can use them as documentation on the google project site: http://code.google.com/p/xtreams/. For the site we upload the comments as they are but Xtreams also contain a PEG parser to convert the wiki document into xhtml (see WikiGenerator class>>generateHtmlDocsInto:).



        HTH,



        Martin

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Smalltalk documentation tools?

david.long
Hi Martin,
great, I am looking at it now. By the way, what package does the WikiGenerator class live in?

thanks,
David
-----Original Message-----
From: [hidden email]
To: David Long <[hidden email]>
Cc: [hidden email]
Subject: [vwnc] Smalltalk documentation tools?
Date: Mon, 30 Aug 2010 09:58:16 -0400

WikiGenerator
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Smalltalk documentation tools?

david.long
In reply to this post by kobetic
I found it.

thx!

David
-----Original Message-----
From: [hidden email]
To: David Long <[hidden email]>
Cc: [hidden email]
Subject: [vwnc] Smalltalk documentation tools?
Date: Mon, 30 Aug 2010 09:58:16 -0400

WikiGenerator
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Smalltalk documentation tools?

david.long
In reply to this post by kobetic
Hi Martin,
ok, gave it a try with a class extension to WikiGenerator. It came back and said the result of Parser parserPEG was nil, which cause the code not to run.

Is there something I need to initialize?

regards,

David

ps I set it up to run on a package instead of a bundle, hopefully this didn't break it.

-----Original Message-----
From: [hidden email]
To: David Long <[hidden email]>
Cc: [hidden email]
Subject: [vwnc] Smalltalk documentation tools?
Date: Mon, 30 Aug 2010 09:58:16 -0400
Mailer: Stampy(7.7 - 59,mkobetic)= / VisualWorks 7.7.1

"David Long"<[hidden email]> wrote:

> I was wondering what recommendations anyone may have for a tool that can

> create documentation for Smalltalk classes. I'm looking for something

> that

> would be able to write them out to html or some readable format.



In Xtreams we're using google-style wiki markup in package comments so that we can use them as documentation on the google project site: http://code.google.com/p/xtreams/. For the site we upload the comments as they are but Xtreams also contain a PEG parser to convert the wiki document into xhtml (see WikiGenerator class>>generateHtmlDocsInto:).



	HTH,



	Martin


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Smalltalk documentation tools?

david.long
In reply to this post by kobetic
Hi Martin,

the code isn't running because one of the methods is reporting some kind of failure when looking up a grammar, here's the place where it runs into trouble:

parse: definition stream: aStream actor: anActor
"Parse @definition from aStream using @anActor to act on the matching rules.
"" definition <String> identifies the rule of the grammar to apply to the input
aStream <ReadStream> the input to parse
anActor <Actor> receives callbacks from the parser for the successfully rules with the matching the input
^ <Object> result of the actor action for the @definition
"
| object |
actor := anActor.
stream := aStream reading.
self clear.
object := (grammar at: definition) value.
^object == Failure
ifTrue: [nil]                             <---------------------For some reason this is returning a nil, so object == Failure for some reason ????
ifFalse: [object]

-----Original Message-----
From: [hidden email]
To: David Long <[hidden email]>
Cc: [hidden email]
Subject: [vwnc] Smalltalk documentation tools?
Date: Mon, 30 Aug 2010 09:58:16 -0400
Mailer: Stampy(7.7 - 59,mkobetic)= / VisualWorks 7.7.1

"David Long"<[hidden email]> wrote:

> I was wondering what recommendations anyone may have for a tool that can

> create documentation for Smalltalk classes. I'm looking for something

> that

> would be able to write them out to html or some readable format.



In Xtreams we're using google-style wiki markup in package comments so that we can use them as documentation on the google project site: http://code.google.com/p/xtreams/. For the site we upload the comments as they are but Xtreams also contain a PEG parser to convert the wiki document into xhtml (see WikiGenerator class>>generateHtmlDocsInto:).



	HTH,



	Martin


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Smalltalk documentation tools?

david.long
In reply to this post by kobetic
I thought this might help, the stack trace:

Unhandled exception: Message not understood: #parse:stream:actor:
UndefinedObject(Object)>>doesNotUnderstand:
PEG.WikiGenerator class>>parser
PEG.WikiGenerator class>>process:
optimized [] in PEG.WikiGenerator class>>generateHtmlDocsInto:
optimized [] in OrderedCollection>>collect:
OrderedCollection>>do:
OrderedCollection>>collect:
PEG.WikiGenerator class>>generateHtmlDocsInto:
UndefinedObject>>unboundMethod
UndefinedObject(Object)>>performMethod:arguments:
UndefinedObject(Object)>>performMethod:
HighlightingTextEditorController(ParagraphEditor)>>evaluateCompiled:
optimized [] in ParagraphEditor>>evaluateSelection
BlockClosure>>ensure:
Cursor>>showWhile:
HighlightingTextEditorController(ParagraphEditor)>>evaluateSelection
optimized [] in ParagraphEditor>>doIt
BlockClosure>>on:do:
HighlightingTextEditorController(ParagraphEditor)>>doIt
HighlightingTextEditorController(TextEditorController)>>dispatchMenuSymbol:
HighlightingTextEditorController(TextEditorController)>>dispatchMenuSelection:
HighlightingTextEditorController(ControllerWithMenu)>>processMenu:at:centered:
HighlightingTextEditorController(ControllerWithMenu)>>processMenuAt:centered:
HighlightingTextEditorController(ControllerWithMenu)>>yellowButtonPressedEvent:
HighlightingTextEditorController(ParagraphEditor)>>yellowButtonPressedEvent:
HighlightingTextEditorController(TextEditorController)>>yellowButtonPressedEvent:
YellowButtonPressedEvent>>dispatchTo:
HighlightingTextEditorController(ControllerWithMenu)>>handleEvent:
EventDispatcher>>dispatch:to:
EventDispatcher>>dispatchEvent:
YellowButtonPressedEvent(Event)>>dispatch
YellowButtonPressedEvent(Event)>>dispatchForWindowManager:
optimized [] in WindowManager>>safelyDispatchForWindowManager:
BlockClosure>>on:do:
WindowManager>>safelyDispatchForWindowManager:
WindowManager>>processNextEvent
optimized [] in [] in WindowManager>>newProcess
BlockClosure>>on:do:
optimized [] in WindowManager>>newProcess
BlockClosure>>on:do:
optimized [] in Process class>>forBlock:priority:

----------------------------------------------------------------------
UndefinedObject(Object)>>doesNotUnderstand:
Receiver:
an UndefinedObject
Arguments:
aMessage = a Message with selector: #parse:stream:actor: and arguments: #('Grammar' CollectionReadStream position: 0 size: 1273
''  |  'Page <- (P'...
'Page <- (Preformatted / Code / UnorderedList / OrderedList / Heading / Table / Paragraph / Empty)*

LineCharacter <- [^\n]
Flow <- Escape / Bold / Italic / LinkShort / LinkFull / LineCharacter
Escape <- "**" / "__" / "[["
Bold <- "*" Flow{"*"}
Italic <- "_" Flow{"_"}
LinkShort <- "[" .{&[>\]]} "]"
LinkFull <- "[" Flow{">"} .{"]"}

Line <- Flow{1,"\n"}
Paragraph <- Line
Empty <- "\n"
Preformatted <- "---\n" .{"---\n"}
Code <- "{{{\n" .{"}}}\n"}
Whitespace <- [\t\s]*
Heading <- Heading4 / Heading3 / Heading2 / Heading1
Heading1 <- Whitespace "= " Flow{" =\n"}
Heading2 <- Whitespace "== " Flow{" ==\n"}
Heading3 <- Whitespace "=== " Flow{" ===\n"}
Heading4 <- Whitespace "==== " Flow{" ====\n"}

Bullet1 <- Whitespace "*" Line
Bullet2 <- Whitespace "**" Line
Bullet3 <- Whitespace "***" Line
UnorderedList <- (UnorderedList2 / Bullet1)+
UnorderedList2 <- (UnorderedList3 / Bullet2)+
UnorderedList3 <- Bullet3+

Hash1 <- Whitespace "#" Line
Hash2 <- Whitespace "##" Line
Hash3 <- Whitespace "###" Line
OrderedList <- (OrderedList2 / Hash1)+
OrderedList2 <- (OrderedList3 / Hash2)+
OrderedList3 <- Hash3+

Table <- HeadingRow TableRow*
HeadingRow <- Whitespace "||" HeadingCell{"\n"}
HeadingCell <- Flow{"||"}
TableRow <- Whitespace "||" Cell{"\n"}
Cell <- Flow{"||"}
' a PEG.ParserParser)
Temporaries:
excpt = a MessageNotUnderstood
resumeValue = nil
Context PC = 25

----------------------------------------------------------------------
PEG.WikiGenerator class>>parser
Receiver:
a PEG.WikiGenerator class
Instance Variables:
superclass = PEG.Actor
methodDict = a MethodDictionary[25]
format = 16385
subclasses = nil
instanceVariables = nil
organization = ('Lexical' #Bold: #Character: #Escape: #Italic: #LineCharacter: #Link: #Link:address: #Underline:)
('Structural' #Empty #Heading1: #Heading2: #Heading3: #Heading4: #ListItem:flow: #OrderedList: #OrderedListN: #Page: #Paragraph: #Preformatted: #Table:rows: #TableCell: #TableHeadingCell: #TableRow: #UnorderedList: #UnorderedListN:)

name = #WikiGenerator
classPool = a NameSpaceOfClass[21]
environment = a NameSpace[5]
Context PC = 11

----------------------------------------------------------------------
PEG.WikiGenerator class>>process:
Receiver:
a PEG.WikiGenerator class
Instance Variables:
superclass = PEG.Actor
methodDict = a MethodDictionary[25]
format = 16385
subclasses = nil
instanceVariables = nil
organization = ('Lexical' #Bold: #Character: #Escape: #Italic: #LineCharacter: #Link: #Link:address: #Underline:)
('Structural' #Empty #Heading1: #Heading2: #Heading3: #Heading4: #ListItem:flow: #OrderedList: #OrderedListN: #Page: #Paragraph: #Preformatted: #Table:rows: #TableCell: #TableHeadingCell: #TableRow: #UnorderedList: #UnorderedListN:)

name = #WikiGenerator
classPool = a NameSpaceOfClass[21]
environment = a NameSpace[5]
Arguments:
input = CollectionReadStream position: 0 size: 15403
''  |  'Xtreams is'...
'Xtreams is a generalized stream/iterator framework providing simple, unified API for reading from different kinds of *sources* and writing into different kinds of *destinations* (Collections, Sockets, Files, Pipes, etc). Streams themselves can be sources or destinations as well. This allows to *stack* streams on top of each other. At the bottom of such stack is some kind of non-stream (e.g. a collection), we will call it a *terminal*. Directly above that is a specialized stream providing a streaming facade over the terminal. The rest of the streams in the stack we''ll call *transforms*. Their primary purpose is to perform some kind of transformation on the elements that are passing through. Application code interacts with the top stream of the stack the same way it would with any other stream (or stream stack) producing/consuming the same elements. The goal of the framework is to provide consistent behavior between different stacks so that the application can treat them the same way regardless of what exactly is the ultimate source or destination. For example if the application code analyzes binary data, it should be able to treat the source stream the same way if it is a simple stream over a ByteArray or if it is a stack that provides contents of a specific binary part of a mulitpart, gziped, chunked HTTP response from a socket. Xtreams is an attempt to achieve this goal in a scalable and efficient manner.

Note that the sequence of streams in a stack cannot be completely arbitrary. Each transform constrains the type of input it accepts and the type of output it produces. Since the adjacent streams in a stack are linked so that input of one is connected to the output of the other, the type of the input has to match the type of the output. For example, a "character encoding" read transform converting bytes to characters can only sit on top of a stream that produces bytes (0..255). These constraints are not checked when the stack is constructed, it is up to the application code to make sure the components of the stack are aligned properly.

The framework is split into several packages:
|| *Package* || *Notes* ||
|| [Xtreams-Core] || Defines the API and core classes ||
|| [Xtreams-Terminals] || Streams for all supported terminals (Collections, Blocks, Files, Sockets, Pipes, etc) ||
|| [Xtreams-Transforms] || Core transform streams (Collection style, encodings, substreams, etc) ||
|| [Xtreams-Substreams] || Streams embedded in other streams ||
|| [Xtreams-Xtras] || Additional non-core transforms (compression, hashing, encryption, object marshaling, etc) ||
|| [Xtreams-Parsing] || PEG parsing for Xtreams with a collection of parsers/generators (PEG, Smalltalk, Javascript, Wiki, etc) ||


== Stream Creation ==

Xtreams strictly separate read and write streams. This allows for simpler API with better consistency. If necessary it is quite simple to create a wrapper that holds a separate read and write stream and dispatches the read operations to one and write operations to the other.

Streams are primarily created by messages with -ing suffix on the first keyword (it often is a simple unary message). A read stream on top of an arbitrary "source" is created by sending the source message #reading. The source can be a collection, an IOAccessor (socket, pipe), aFilename, etc. For an exhaustive list of supported type of source see package Xtreams-Terminals. If #reading is sent to a stream, the same stream is returned. Similarly, a write stream is created by sending #writing to an arbitrary "destination". Generally the same kinds of objects can serve as sources or destinations, again Xtreams-Terminals provides further details. Again, #writing sent to a write stream returns the same stream.


== Basic Operations ==

Here are few simple examples showing equivalent code in classic streams and xtreams:
{{{
"classic" ''hello world'' readStream next: 5.
"xtreams" ''hello world'' reading read: 5.
}}}
{{{
"classic" String new writeStream nextPutAll: ''hello''; contents
"xtreams" String new writing write: ''hello''; conclusion
}}}
Nothing terribly surprising here, just some API changes. Note that xtreams do not provide the #contents message. It''s a read operation and as such it doesn''t really fit a write stream. Consequently it only works in specific circumstances (e.g. above), but not in a case like this for example:
{{{
(ByteArray new withEncoding: #ascii) writeStream nextPutAll: ''Hello''; contents
}}}
Instead, in Xtreams, if you close a write stream on a collection it will trim the underlying collection down to the actual content. So the collection itself corresponds to the stream #contents after closing. This provides equivalent capability within the constraints of generally applicable write stream API. Message #terminal can be used to retrieve the underlying collection from the stream. Message #conclusion is a convenience method that combines #close and #terminal together.

Here''s a rough correspondence table of the most common API

|| *classic* || *xtreams* ||
|| next || get ||
|| nextPut: || put: ||
|| next: || read: ||
|| next:into:startingAt: || read:into:/read:into:at: ||
|| nextPutAll: || write: ||
|| next:putAll:startingAt: || write:from:/write:from:at: ||
|| upToEnd || rest ||
|| skip: || ++ ||


== Stream Copying ==

Another useful difference is that you can use a read stream as the argument of write: and write:from:. This provides a simple and efficient way of copying from stream to stream. These stream interactions are specifically optimized, so, for example copying between two collection streams, will eventually boil down to a single copy operation between the underlying collections. So the classic (slow) stream copying pattern:
{{{
source := ''Hello World'' readStream.
destination := String new writeStream.
[ source atEnd ] whileFalse: [ destination nextPut: source next ].
destination contents
}}}
becomes simple and optimal
{{{
String new writing write: ''Hello World'' reading; conclusion
}}}


== End Of Stream ==

Another difference that you''ll probably notice early on is that reading past the end of stream is not a notification which returns nil by default. With xtreams it is always an exception, Incomplete, the same way you get an IncompleteNextCountError with #next:/#next:into:startingAt: (but not with #next). Incomplete always carries count of elements that were read successfully, and optionally a collection and start parameters to provide easy access to whatever was successfully read. The collection and start would be nil in case of skipping rather than reading from a stream. As usual the stream that raised the exception is the originator.
{{{
[ ''Hello World!'' reading read: 6; read: 50 ] on: Incomplete do: [ :ex | ex contents ]
}}}
Another significant difference is that xtreams do not provide the #atEnd test. Depending on the type of the stream, implementing such test may require an actual read attempt to be able to answer. Once you perform a read, you''ll need to cache the element if the stream is not positionable. This gets even more complicated with complex stream stacks. Instead xtreams provide several alternatives each suitable for different circumstances. Message #rest reads everything that is left in the stream and automatically handles the Incomplete exception at the end.
{{{
''Hello World!'' reading read: 6; rest
}}}
If you don''t want to collect all the elements in the collection, xtreams also support collection style iteration protocols
{{{
''Hello World!'' reading
read: 6;
inject: 0 into: [ :count :each | count + 1 ]
}}}
For comparison here''s a common "read line by line" example in both classic and xtream style
{{{
text := ''line1\line2\line3\line4'' withCRs readStream.
lines := OrderedCollection new.
[ text atEnd ] whileFalse: [ lines add: (text upTo: Character cr) ].
lines
}}}
{{{
text := ''line1\line2\line3\line4'' withCRs reading.
slicer := text ender: [ :char | char = Character cr ].
slicer collect: [ :line | line rest ]
}}}
The xtreams example relies on some features that are yet to be discussed, but the point we''re trying to make here is that there''s often better way to handle the classic pattern. For example if you want only up to first 3 characters from each line, just change the ''line rest'' bit into ''(line limiting: 3) rest''. The slicing layer will take care of aligning the underlying stream for you automatically, whereas in the classic case the code would have to handle it explicitly. It''s also worth noting that the xtreams solution will do it efficiently. Each line can be processed as a stream of its own avoiding creation of unnecessary and potentially costly garbage.


== Enumeration ==

As was alluded to above, read streams provide all the traditional, collection style enumeration API: #collect:, #select:, #inject:into:, etc. Including some of the more recent additions like #do:separatedBy: and #groupedBy. This allows certain level of polymorphism with Collections. It''s not clear at this point how far should we take this. For example stream concatenation might be interesting, we could employ #, as well and even allow concatenating stream with collection (presumably resulting in a stream).


== Closing ==

It is beneficial to get into the habit of always closing a stream when you''re done with it. Even though in particular cases it may end up being a noop, not making that assumption in your algorithm may extend its applicability to wider range of streams and stream stacks. Closing the stream isn''t necessarily just a matter of releasing resources. Especially with write streams it may be important to perform additional activity to properly terminate the stream. Given that a stream transform may involve arbitrary side-effects, it may apply to read streams as well.


== Positioning / Seeking ==

Not all streams are naturally positionable. Traditionally, an algorithm that required positionability was restricted to naturally positionable streams. Xtreams attempt to bridge this gap by providing positioning for non-positionable streams via a special buffering transform (PositionRead/WriteStream). To make sure a stream is positionable, send it #positioning. It returns the same stream if it is already positionable.
{{{
Random new reading positioning read: 5; -- 2; read: 2
}}}
The positioning API imitates pointer arithmetic. Skipping forward (++) is the only operation that is available on both positionable and non-positionable streams.

|| *message* || *notes* ||
|| position || returns current position from the beginning(1) of the stream ||
|| position: || sets current position from the beginning(1) of the stream ||
|| available || how many elements are left from current position to the end(1) ||
|| length || total size of the stream (position + available) ||
|| ++ || skips forward specified number of elements ||
|| -- || skips backward specified number of elements ||
|| -= || skips backward specified number of elements from the end(1) of the stream ||
|| += || skips forward specified number of elements from the beginning(1) of the stream ||

(1) Note that interpretation of beginning and end of the stream is slightly different in the case of augmented non-positionable streams. The true beginning of the stream may not be reachable by the time the stream is wrapped in the positioning layer, so the beginning refers to the position at the time the stream is wrapped. Similarly the end of the stream refers to the last position that has been reached so far. In other words beginning and end are the opposite ends of the *positionable area* of the stream. Both interpretations apply equally to read and write streams.

The backward skipping operators -- and -= cannot skip past the beginning of the stream. Incomplete will be raised if such request is made leaving the stream positioned at the beginning. Similarly the forward skipping operator += cannot skip past the end of the stream, and raises Incomplete if such request is made (leaving the stream positioned at the end). Note that the ++ operator does allow skipping past the end of the positioning area of augmented streams, but will raise Incomplete if it goes past the *real end* of the stream.
{{{
Random new reading positioning read: 5; -= 8; length.
Random new reading positioning read: 5; -- 8; length.
Random new reading positioning read: 5; += 8; length.
Random new reading positioning read: 5; ++ 8; length.
}}}
There are several things to keep in mind when using the positioning/buffering transform. In general the positioning layer can only be removed when its position is aligned with the underlying stream, i.e. the stream stack would yield the same results when read at either level. So the positioning layer cannot be added and removed arbitrarily. In the case of read streams the underlying stream is always aligned with the end of the buffer. With write stream the underlying destination stream is aligned with the beginning of the buffer, i.e. the elements are only written when they fall out of the bottom of the buffer (e.g. in case of fixed size ring buffer) or the stream is explicitly flushed (all buffered elements are written and buffer is reinitialized). Consequently, if an algorithm requires a positionable stream, it should be the caller''s responsibility to pass in a positionable stream, not the algorithm attempting to turn arbitrary steam into a positionable one, because the positioning layer usually cannot be passed back to the caller.

Buffering requires memory and different algorithms may require different buffering strategies. There are several Buffer classes available, used throughout the framework for various purposes. Streams that employ buffers allow to replace the default buffer with a different one via the #buffer: message. For example if an algorithm only needs to be able to peek up to five elements ahead, RingBuffer of size 5 is efficient and doesn''t waste memory.


== Exploring ==

Any positionable stream can be explored. The #explore: method is an enhancement of the classic #peek. A ''stream peek'' can be replaced with
{{{
stream explore: [ stream get ]
}}}
The advantage of #explore: is that the block allows arbitrary activity with the stream. The stream will return back to its original position when the block completes. For example you can peek for arbitrary number of elements, not just one:
{{{
actions at: (stream explore: [ stream read: 3 ]))
ifAbsent: [ "not an action ID, do something else with the stream" ]
ifPresent: [ :action | stream ++ 3. action value: stream ]
}}}

Positionable write streams can also be explored. The motivating use case is attempting a complex write and being able to abandon it if it doesn''t work out.
{{{
String new writing
write: ''Hello '';
explore: [ :stream | stream write: ''Fooled!'' ];
write: ''World!'';
conclusion
}}}
{{{
String new writing
write: ''Hello '';
explore: [ :stream | stream write: ''World!'' ];
-= 0;
conclusion
}}}


== Write vs Insert ==

At times it is useful to be able to insert elements into the existing content of a positionable write stream. All the #write:... methods have an #insert:... equivalent for that purpose. Insert at the end of the stream has the same effect as write.
{{{
String new writing
write: ''Hello World!'';
+= 5;
insert: '', Hello'';
-= 0;
conclusion
}}}
'
Context PC = 4

----------------------------------------------------------------------
optimized [] in PEG.WikiGenerator class>>generateHtmlDocsInto:
Receiver:
an UndefinedObject
Arguments:
p = [Xtreams-Core]
Temporaries:
body = nil
file = nil
.self = PEG.WikiGenerator
.directory = an UnixFilename('/home/david/sagetea/bizprolauncher.sourceforge.net')
Context PC = 9

----------------------------------------------------------------------
optimized [] in OrderedCollection>>collect:
Receiver:
an UndefinedObject
Arguments:
each = [Xtreams-Core]
Temporaries:
.newCollection = an OrderedCollection[0]
.aBlock = BlockClosure [] in PEG.WikiGenerator class>>generateHtmlDocsInto:
Context PC = 7

----------------------------------------------------------------------
OrderedCollection>>do:
Receiver:
an OrderedCollection
Instance Variables:
firstIndex = 1
lastIndex = 7
Arguments:
aBlock = BlockClosure [] in OrderedCollection>>collect:
Temporaries:
index = 1
Context PC = 17

----------------------------------------------------------------------
OrderedCollection>>collect:
Receiver:
an OrderedCollection
Instance Variables:
firstIndex = 1
lastIndex = 7
Arguments:
aBlock = BlockClosure [] in PEG.WikiGenerator class>>generateHtmlDocsInto:
Temporaries:
newCollection = an OrderedCollection[0]
Context PC = 16

----------------------------------------------------------------------
PEG.WikiGenerator class>>generateHtmlDocsInto:
Receiver:
a PEG.WikiGenerator class
Instance Variables:
superclass = PEG.Actor
methodDict = a MethodDictionary[25]
format = 16385
subclasses = nil
instanceVariables = nil
organization = ('Lexical' #Bold: #Character: #Escape: #Italic: #LineCharacter: #Link: #Link:address: #Underline:)
('Structural' #Empty #Heading1: #Heading2: #Heading3: #Heading4: #ListItem:flow: #OrderedList: #OrderedListN: #Page: #Paragraph: #Preformatted: #Table:rows: #TableCell: #TableHeadingCell: #TableRow: #UnorderedList: #UnorderedListN:)

name = #WikiGenerator
classPool = a NameSpaceOfClass[21]
environment = a NameSpace[5]
Arguments:
directory = an UnixFilename('/home/david/sagetea/bizprolauncher.sourceforge.net')
Context PC = 14

----------------------------------------------------------------------
UndefinedObject>>unboundMethod
Receiver:
an UndefinedObject
Context PC = 7

----------------------------------------------------------------------
UndefinedObject(Object)>>performMethod:arguments:
Receiver:
an UndefinedObject
Arguments:
method = AnnotatedMethod UndefinedObject>>unboundMethod
args = an Array[0]
Context PC = 5

----------------------------------------------------------------------
UndefinedObject(Object)>>performMethod:
Receiver:
an UndefinedObject
Arguments:
method = AnnotatedMethod UndefinedObject>>unboundMethod
Context PC = 5

----------------------------------------------------------------------
HighlightingTextEditorController(ParagraphEditor)>>evaluateCompiled:
Receiver:
a HighlightingTextEditorController
Instance Variables:
model = a PluggableAdaptor
view = a TextEditorView
sensor = a TranslatingSensor
menuHolder = a ValueHolder on: a Menu
performer = a WorkspacePage
beginTypeInIndex = nil
anchorIndex = 699
emphasisHere = nil
dispatchTable = a DispatchTable
charComposer = a CharacterComposer
textHasChanged = true
feelPolicy = a MotifFeelPolicy
supportCodeEditingFeels = true
localMenuItems = an Array[20]
extendingDown = true
keyboardProcessor = a KeyboardProcessor
keyboardHook = nil
readOnly = false
accepted = false
autoAccept = false
continuousAccept = false
tabMeansNextField = true
tabRequiresControl = true
dispatcher = an UIDispatcher
selectable = false
highlightingProcess = a Process in nil
highlighters = an IdentityDictionary[1]
Arguments:
aMethod = AnnotatedMethod UndefinedObject>>unboundMethod
Temporaries:
context = nil
Context PC = 13

----------------------------------------------------------------------
optimized [] in ParagraphEditor>>evaluateSelection
Receiver:
an UndefinedObject
Temporaries:
.self = a HighlightingTextEditorController
.code = AnnotatedMethod UndefinedObject>>unboundMethod
Context PC = 7

----------------------------------------------------------------------
BlockClosure>>ensure:
Receiver:
a BlockClosure
Instance Variables:
method = CompiledBlock [] in ParagraphEditor>>evaluateSelection
outerContext = nil
copiedValues = an Array[2]
Arguments:
aBlock = BlockClosure [] in Cursor>>showWhile:
Temporaries:
result = nil
Context PC = 4

----------------------------------------------------------------------
Cursor>>showWhile:
Receiver:
a Cursor
Instance Variables:
errorCode = 0
handle = a ByteArray[8]
image = Depth1Image(extent: 16 @ 16 depth: 1)
mask = Depth1Image(extent: 16 @ 16 depth: 1)
hotSpot = 1 @ 1
name = 'xeq'
Arguments:
aBlock = BlockClosure [] in ParagraphEditor>>evaluateSelection
Temporaries:
oldcursor = Cursor normal
Context PC = 23

----------------------------------------------------------------------
HighlightingTextEditorController(ParagraphEditor)>>evaluateSelection
Receiver:
a HighlightingTextEditorController
Instance Variables:
model = a PluggableAdaptor
view = a TextEditorView
sensor = a TranslatingSensor
menuHolder = a ValueHolder on: a Menu
performer = a WorkspacePage
beginTypeInIndex = nil
anchorIndex = 699
emphasisHere = nil
dispatchTable = a DispatchTable
charComposer = a CharacterComposer
textHasChanged = true
feelPolicy = a MotifFeelPolicy
supportCodeEditingFeels = true
localMenuItems = an Array[20]
extendingDown = true
keyboardProcessor = a KeyboardProcessor
keyboardHook = nil
readOnly = false
accepted = false
autoAccept = false
continuousAccept = false
tabMeansNextField = true
tabRequiresControl = true
dispatcher = an UIDispatcher
selectable = false
highlightingProcess = a Process in nil
highlighters = an IdentityDictionary[1]
Temporaries:
code = AnnotatedMethod UndefinedObject>>unboundMethod
result = nil
Context PC = 14

----------------------------------------------------------------------
optimized [] in ParagraphEditor>>doIt
Receiver:
an UndefinedObject
Temporaries:
.self = a HighlightingTextEditorController
Context PC = 6

----------------------------------------------------------------------
BlockClosure>>on:do:
Receiver:
a BlockClosure
Instance Variables:
method = CompiledBlock [] in ParagraphEditor>>doIt
outerContext = nil
copiedValues = a HighlightingTextEditorController
Arguments:
anExceptionSelector = CompilationError
handlerBlock = BlockClosure [] in ParagraphEditor>>doIt
Context PC = 18

----------------------------------------------------------------------
HighlightingTextEditorController(ParagraphEditor)>>doIt
Receiver:
a HighlightingTextEditorController
Instance Variables:
model = a PluggableAdaptor
view = a TextEditorView
sensor = a TranslatingSensor
menuHolder = a ValueHolder on: a Menu
performer = a WorkspacePage
beginTypeInIndex = nil
anchorIndex = 699
emphasisHere = nil
dispatchTable = a DispatchTable
charComposer = a CharacterComposer
textHasChanged = true
feelPolicy = a MotifFeelPolicy
supportCodeEditingFeels = true
localMenuItems = an Array[20]
extendingDown = true
keyboardProcessor = a KeyboardProcessor
keyboardHook = nil
readOnly = false
accepted = false
autoAccept = false
continuousAccept = false
tabMeansNextField = true
tabRequiresControl = true
dispatcher = an UIDispatcher
selectable = false
highlightingProcess = a Process in nil
highlighters = an IdentityDictionary[1]
Context PC = 20

----------------------------------------------------------------------
HighlightingTextEditorController(TextEditorController)>>dispatchMenuSymbol:
Receiver:
a HighlightingTextEditorController
Instance Variables:
model = a PluggableAdaptor
view = a TextEditorView
sensor = a TranslatingSensor
menuHolder = a ValueHolder on: a Menu
performer = a WorkspacePage
beginTypeInIndex = nil
anchorIndex = 699
emphasisHere = nil
dispatchTable = a DispatchTable
charComposer = a CharacterComposer
textHasChanged = true
feelPolicy = a MotifFeelPolicy
supportCodeEditingFeels = true
localMenuItems = an Array[20]
extendingDown = true
keyboardProcessor = a KeyboardProcessor
keyboardHook = nil
readOnly = false
accepted = false
autoAccept = false
continuousAccept = false
tabMeansNextField = true
tabRequiresControl = true
dispatcher = an UIDispatcher
selectable = false
highlightingProcess = a Process in nil
highlighters = an IdentityDictionary[1]
Arguments:
menuSelection = #doIt
Context PC = 27

----------------------------------------------------------------------
HighlightingTextEditorController(TextEditorController)>>dispatchMenuSelection:
Receiver:
a HighlightingTextEditorController
Instance Variables:
model = a PluggableAdaptor
view = a TextEditorView
sensor = a TranslatingSensor
menuHolder = a ValueHolder on: a Menu
performer = a WorkspacePage
beginTypeInIndex = nil
anchorIndex = 699
emphasisHere = nil
dispatchTable = a DispatchTable
charComposer = a CharacterComposer
textHasChanged = true
feelPolicy = a MotifFeelPolicy
supportCodeEditingFeels = true
localMenuItems = an Array[20]
extendingDown = true
keyboardProcessor = a KeyboardProcessor
keyboardHook = nil
readOnly = false
accepted = false
autoAccept = false
continuousAccept = false
tabMeansNextField = true
tabRequiresControl = true
dispatcher = an UIDispatcher
selectable = false
highlightingProcess = a Process in nil
highlighters = an IdentityDictionary[1]
Arguments:
menuSelection = #doIt
Context PC = 35

----------------------------------------------------------------------
HighlightingTextEditorController(ControllerWithMenu)>>processMenu:at:centered:
Receiver:
a HighlightingTextEditorController
Instance Variables:
model = a PluggableAdaptor
view = a TextEditorView
sensor = a TranslatingSensor
menuHolder = a ValueHolder on: a Menu
performer = a WorkspacePage
beginTypeInIndex = nil
anchorIndex = 699
emphasisHere = nil
dispatchTable = a DispatchTable
charComposer = a CharacterComposer
textHasChanged = true
feelPolicy = a MotifFeelPolicy
supportCodeEditingFeels = true
localMenuItems = an Array[20]
extendingDown = true
keyboardProcessor = a KeyboardProcessor
keyboardHook = nil
readOnly = false
accepted = false
autoAccept = false
continuousAccept = false
tabMeansNextField = true
tabRequiresControl = true
dispatcher = an UIDispatcher
selectable = false
highlightingProcess = a Process in nil
highlighters = an IdentityDictionary[1]
Arguments:
aMenu = a Menu
aPoint = 965 @ 790
centered = true
Temporaries:
valueResult = a MenuItem 'Do it'
Context PC = 41

----------------------------------------------------------------------
HighlightingTextEditorController(ControllerWithMenu)>>processMenuAt:centered:
Receiver:
a HighlightingTextEditorController
Instance Variables:
model = a PluggableAdaptor
view = a TextEditorView
sensor = a TranslatingSensor
menuHolder = a ValueHolder on: a Menu
performer = a WorkspacePage
beginTypeInIndex = nil
anchorIndex = 699
emphasisHere = nil
dispatchTable = a DispatchTable
charComposer = a CharacterComposer
textHasChanged = true
feelPolicy = a MotifFeelPolicy
supportCodeEditingFeels = true
localMenuItems = an Array[20]
extendingDown = true
keyboardProcessor = a KeyboardProcessor
keyboardHook = nil
readOnly = false
accepted = false
autoAccept = false
continuousAccept = false
tabMeansNextField = true
tabRequiresControl = true
dispatcher = an UIDispatcher
selectable = false
highlightingProcess = a Process in nil
highlighters = an IdentityDictionary[1]
Arguments:
aPoint = 965 @ 790
centered = true
Context PC = 9

----------------------------------------------------------------------
HighlightingTextEditorController(ControllerWithMenu)>>yellowButtonPressedEvent:
Receiver:
a HighlightingTextEditorController
Instance Variables:
model = a PluggableAdaptor
view = a TextEditorView
sensor = a TranslatingSensor
menuHolder = a ValueHolder on: a Menu
performer = a WorkspacePage
beginTypeInIndex = nil
anchorIndex = 699
emphasisHere = nil
dispatchTable = a DispatchTable
charComposer = a CharacterComposer
textHasChanged = true
feelPolicy = a MotifFeelPolicy
supportCodeEditingFeels = true
localMenuItems = an Array[20]
extendingDown = true
keyboardProcessor = a KeyboardProcessor
keyboardHook = nil
readOnly = false
accepted = false
autoAccept = false
continuousAccept = false
tabMeansNextField = true
tabRequiresControl = true
dispatcher = an UIDispatcher
selectable = false
highlightingProcess = a Process in nil
highlighters = an IdentityDictionary[1]
Arguments:
event = a YellowButtonPressedEvent
Context PC = 13

----------------------------------------------------------------------
HighlightingTextEditorController(ParagraphEditor)>>yellowButtonPressedEvent:
Receiver:
a HighlightingTextEditorController
Instance Variables:
model = a PluggableAdaptor
view = a TextEditorView
sensor = a TranslatingSensor
menuHolder = a ValueHolder on: a Menu
performer = a WorkspacePage
beginTypeInIndex = nil
anchorIndex = 699
emphasisHere = nil
dispatchTable = a DispatchTable
charComposer = a CharacterComposer
textHasChanged = true
feelPolicy = a MotifFeelPolicy
supportCodeEditingFeels = true
localMenuItems = an Array[20]
extendingDown = true
keyboardProcessor = a KeyboardProcessor
keyboardHook = nil
readOnly = false
accepted = false
autoAccept = false
continuousAccept = false
tabMeansNextField = true
tabRequiresControl = true
dispatcher = an UIDispatcher
selectable = false
highlightingProcess = a Process in nil
highlighters = an IdentityDictionary[1]
Arguments:
event = a YellowButtonPressedEvent
Context PC = 9

----------------------------------------------------------------------
HighlightingTextEditorController(TextEditorController)>>yellowButtonPressedEvent:
Receiver:
a HighlightingTextEditorController
Instance Variables:
model = a PluggableAdaptor
view = a TextEditorView
sensor = a TranslatingSensor
menuHolder = a ValueHolder on: a Menu
performer = a WorkspacePage
beginTypeInIndex = nil
anchorIndex = 699
emphasisHere = nil
dispatchTable = a DispatchTable
charComposer = a CharacterComposer
textHasChanged = true
feelPolicy = a MotifFeelPolicy
supportCodeEditingFeels = true
localMenuItems = an Array[20]
extendingDown = true
keyboardProcessor = a KeyboardProcessor
keyboardHook = nil
readOnly = false
accepted = false
autoAccept = false
continuousAccept = false
tabMeansNextField = true
tabRequiresControl = true
dispatcher = an UIDispatcher
selectable = false
highlightingProcess = a Process in nil
highlighters = an IdentityDictionary[1]
Arguments:
anEvent = a YellowButtonPressedEvent
Context PC = 19

----------------------------------------------------------------------
YellowButtonPressedEvent>>dispatchTo:
Receiver:
a YellowButtonPressedEvent
Instance Variables:
time = 13800110
initiator = an EventDispatcher
window = an ApplicationWindow 96469025
state = 2
x = 292
y = 372
gx = 965
gy = 790
buttonNumber = 2
Arguments:
anObject = a HighlightingTextEditorController
Context PC = 4

----------------------------------------------------------------------
HighlightingTextEditorController(ControllerWithMenu)>>handleEvent:
Receiver:
a HighlightingTextEditorController
Instance Variables:
model = a PluggableAdaptor
view = a TextEditorView
sensor = a TranslatingSensor
menuHolder = a ValueHolder on: a Menu
performer = a WorkspacePage
beginTypeInIndex = nil
anchorIndex = 699
emphasisHere = nil
dispatchTable = a DispatchTable
charComposer = a CharacterComposer
textHasChanged = true
feelPolicy = a MotifFeelPolicy
supportCodeEditingFeels = true
localMenuItems = an Array[20]
extendingDown = true
keyboardProcessor = a KeyboardProcessor
keyboardHook = nil
readOnly = false
accepted = false
autoAccept = false
continuousAccept = false
tabMeansNextField = true
tabRequiresControl = true
dispatcher = an UIDispatcher
selectable = false
highlightingProcess = a Process in nil
highlighters = an IdentityDictionary[1]
Arguments:
anEvent = a YellowButtonPressedEvent
Context PC = 38

----------------------------------------------------------------------
EventDispatcher>>dispatch:to:
Receiver:
an EventDispatcher
Instance Variables:
windowController = an ApplicationStandardSystemController
currentMouseConsumer = nil
grabbingMouse = false
keyboardProcessor = a KeyboardProcessor
lastControlObject = nil
trapList = nil
state = nil
repairDamageWhenDebugging = true
flushQueueAfterError = true
distributeEventsWhenDebugging = true
dragDropInProgress = false
dragDropTracker = nil
dispatchUnknownEvents = false
Arguments:
event = a YellowButtonPressedEvent
object = a HighlightingTextEditorController
Temporaries:
tmp = nil
Context PC = 10

----------------------------------------------------------------------
EventDispatcher>>dispatchEvent:
Receiver:
an EventDispatcher
Instance Variables:
windowController = an ApplicationStandardSystemController
currentMouseConsumer = nil
grabbingMouse = false
keyboardProcessor = a KeyboardProcessor
lastControlObject = nil
trapList = nil
state = nil
repairDamageWhenDebugging = true
flushQueueAfterError = true
distributeEventsWhenDebugging = true
dragDropInProgress = false
dragDropTracker = nil
dispatchUnknownEvents = false
Arguments:
event = a YellowButtonPressedEvent
Temporaries:
objectWantingControl = a HighlightingTextEditorController
targetKeyboardProcessor = nil
Context PC = 113

----------------------------------------------------------------------
YellowButtonPressedEvent(Event)>>dispatch
Receiver:
a YellowButtonPressedEvent
Instance Variables:
time = 13800110
initiator = an EventDispatcher
window = an ApplicationWindow 96469025
state = 2
x = 292
y = 372
gx = 965
gy = 790
buttonNumber = 2
Context PC = 16

----------------------------------------------------------------------
YellowButtonPressedEvent(Event)>>dispatchForWindowManager:
Receiver:
a YellowButtonPressedEvent
Instance Variables:
time = 13800110
initiator = an EventDispatcher
window = an ApplicationWindow 96469025
state = 2
x = 292
y = 372
gx = 965
gy = 790
buttonNumber = 2
Arguments:
aWinMgr = a WindowManager
Context PC = 4

----------------------------------------------------------------------
optimized [] in WindowManager>>safelyDispatchForWindowManager:
Receiver:
an UndefinedObject
Temporaries:
.event = a YellowButtonPressedEvent
.self = a WindowManager
Context PC = 6

----------------------------------------------------------------------
BlockClosure>>on:do:
Receiver:
a BlockClosure
Instance Variables:
method = CompiledBlock [] in WindowManager>>safelyDispatchForWindowManager:
outerContext = nil
copiedValues = an Array[2]
Arguments:
anExceptionSelector = BadControllerError
handlerBlock = BlockClosure [] in WindowManager>>safelyDispatchForWindowManager:
Context PC = 18

----------------------------------------------------------------------
WindowManager>>safelyDispatchForWindowManager:
Receiver:
a WindowManager
Instance Variables:
windows = an OrderedCollection[1]
activeController = nil
interruptLock = false
outstandingMetaOrDamage = false
openInProgress = false
eventQueue = an EventQueue
baseProcess = a Process in Semaphore>>waitIfCurtailedSignal
dontFilterEvents = false
Arguments:
event = a YellowButtonPressedEvent
Context PC = 13

----------------------------------------------------------------------
WindowManager>>processNextEvent
Receiver:
a WindowManager
Instance Variables:
windows = an OrderedCollection[1]
activeController = nil
interruptLock = false
outstandingMetaOrDamage = false
openInProgress = false
eventQueue = an EventQueue
baseProcess = a Process in Semaphore>>waitIfCurtailedSignal
dontFilterEvents = false
Temporaries:
event = a YellowButtonPressedEvent
Context PC = 9

----------------------------------------------------------------------
optimized [] in [] in WindowManager>>newProcess
Receiver:
an UndefinedObject
Temporaries:
.self = a WindowManager
Context PC = 13

----------------------------------------------------------------------
BlockClosure>>on:do:
Receiver:
a BlockClosure
Instance Variables:
method = CompiledBlock [] in [] in WindowManager>>newProcess
outerContext = nil
copiedValues = a WindowManager
Arguments:
anExceptionSelector = TerminateException
handlerBlock = BlockClosure [] in [] in WindowManager>>newProcess
Context PC = 18

----------------------------------------------------------------------
optimized [] in WindowManager>>newProcess
Receiver:
an UndefinedObject
Temporaries:
.self = a WindowManager
Context PC = 15

----------------------------------------------------------------------
BlockClosure>>on:do:
Receiver:
a BlockClosure
Instance Variables:
method = CompiledBlock [] in WindowManager>>newProcess
outerContext = nil
copiedValues = a WindowManager
Arguments:
anExceptionSelector = TerminateException
handlerBlock = BlockClosure [] in [] in Process class>>forBlock:priority:
Context PC = 18

----------------------------------------------------------------------
optimized [] in Process class>>forBlock:priority:
Receiver:
an UndefinedObject
Temporaries:
.aBlock = BlockClosure [] in WindowManager>>newProcess
Context PC = 9

-----Original Message-----
From: [hidden email]
To: David Long <[hidden email]>
Cc: [hidden email]
Subject: [vwnc] Smalltalk documentation tools?
Date: Mon, 30 Aug 2010 09:58:16 -0400
Mailer: Stampy(7.7 - 59,mkobetic)= / VisualWorks 7.7.1

"David Long"<[hidden email]> wrote:

> I was wondering what recommendations anyone may have for a tool that can

> create documentation for Smalltalk classes. I'm looking for something

> that

> would be able to write them out to html or some readable format.



In Xtreams we're using google-style wiki markup in package comments so that we can use them as documentation on the google project site: http://code.google.com/p/xtreams/. For the site we upload the comments as they are but Xtreams also contain a PEG parser to convert the wiki document into xhtml (see WikiGenerator class>>generateHtmlDocsInto:).



	HTH,



	Martin


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Smalltalk documentation tools?

kobetic
In reply to this post by kobetic
David,



Nothing is going to work until Parser class>>parserPEG gives you a parser. I'm not sure how you arrived at such a state, unless the load failed somehow. Maybe try to step through the parserPEG process to see what's missing ? I assume you're loading latest Xtreams version into recent VW version.



Martin

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Smalltalk documentation tools?

david.long
Hi Martin,
I'll try it again with a clean image...
regards,
David
-----Original Message-----
From: [hidden email]
To: David Long <[hidden email]>
Cc: [hidden email]
Subject: Re: [vwnc] Smalltalk documentation tools?
Date: Mon, 30 Aug 2010 11:59:12 -0400
Mailer: Stampy(7.7 - 59,mkobetic)= / VisualWorks 7.7.1

David,



Nothing is going to work until Parser class>>parserPEG gives you a parser. I'm not sure how you arrived at such a state, unless the load failed somehow. Maybe try to step through the parserPEG process to see what's missing ? I assume you're loading latest Xtreams version into recent VW version.



Martin


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc