|
CommentOfTheDayContest
Comment Of The Day Contest - One Day One CommentRules
Results: http://code.google.com/p/pharo/wiki/CommentOfTheDayContest Use latest image on the Hudson server: https://pharo-ic.lille.inria.fr/hudson/view/Pharo/job/Pharo%20Core%201.3/ COTDC script(SystemNavigation default
allClassesAndTraits reject: [:aClass|
aClass hasComment
or: [aClass inheritsFrom:TestCase]] ) atRandomAbortedWe did not manage to correctly comment the following classes. Please submit a comment to help. MCSystemCategoryParserI parse PackageInfo statement from Monticello packages file ? TextStyleAsFontFamilyResults83 - MCVersionInspector - Sean P. DeNigrisI am a tool that visually represents an MCVersion. While I can be opened on anMCVersion, you've probably seen me most often after saving a package in the Monticello Browser. I have buttons to perform common version-related actions - like browsing, loading, and viewing changes. In my main text area, I display the following information about my version - name, author, timestamp, UUID, ancestors and log message. 82 - TestRunnerBrowser - Sean P. DeNigrisAlthough tests can be most easily be run from a browser, I provide the ability to: * select sets of test suites to run. I am designed to make it easy to execute groups of tests * obtain a more detailed log of the results UI Description ___________ My left-most pane lists all of the categories that contain test classes (i.e., subclasses of TestCase); when some of these categories are selected, the test classes that they contain appear in the pane to the right. Abstract classes are italicized, and the test class hierarchy is shown by indentation, so subclasses of ClassTestCase are indented more than subclasses of TestCase. The tests that did not pass (if any) are listed in the right-hand panes of the Test Runner; if you want to debug one, to see why it failed, just click on the name. 81 - RBSubclassOfClassToRename - Sean P. DeNigrisThere is some mismatch between intention and expression here. This class is used in RBRenameClassTest, but it is also used in ProtectInstanceVariableRefactoring, where there is no subclassing or renaming to be found. Maybe it should either be renamed or the ProtectInstanceVariableRefactoring split out into another class. Also, maybe Test categories should be initially excluded from COTDC. This class seems like a very low priority and probably doesn't need a comment at all. 80 - CategoryEnvironment - Sean P. DeNigrisI restrict the scope of refactoring to specific categories. 79 - RefactoryChange - HwaJong OhI am superclass of all refactoring change objects. All I have is a name for the refactoring, but I can perform one or more refactoring operations with message #execute. I am a composite object. To know about the components of mine, ask me with #changes and #changesSize. 78 - RBSubclassResponsibilityNotDefinedRule - S.Ducasse, L. RenggliThis rules identifies when several methods in a set of subclasses are defined but not in the superclass. It identifies that an abstract method is missing in the superclass. RBLintRuleEach of my subclasses has a method called #rationale that describes its intent. Long descriptions for most rules can be found here: http://www.refactory.com/RefactoringBrowser/BrowserPagesLintChecks.html 77 - LazyMorphTreeMorph - T.GirbaI am a MorphTreeMorph, but I only render the rows lazily as they appear on screen. Caveat: There is no rendering in the background. This means that if a row takes too long to render, you can experience a shorter or longer freeze when scrolling. 76 - TextComposer - A.PlantecClass intention I compose a collection of lines to fit the size of a physical container (especially according to the paragraph container height, width and position). The result of my computation is a collection of TextLine that is ready to be managed by a paragraph to be drawn on a canvas in a particular screen area. Class collaborations I collaborate with a CompositionScanners for character measurement and with a TextContainer which holds the text to be composed Class main API #composeLinesFrom: argStart to: argStop delta: argDelta into: argLinesCollection priorLines: argPriorLines atY: argStartY textStyle: argTextStyle text: argText container: argContainer wantsColumnBreaks: argWantsColumnBreaks It is my main public method which returns the collection of TextLines (as the first element of an array) MultiTextComposerSee TextComposer comments first. I'm a specialization for the management of complex text (internationalized text). TextComposer and MultiTextComposer should be merged in a near futur 75 - MorphTreeNavigationBar - L.LaffontI'm a pager control used to navigate in a MorphTreeMorph that has a lot of entries. You can see one of my subclass in action using: ClassListExample new open 74 - MorphTreeNodeMorph - L.LaffontI draw the node part of a tree. 73 - MorphTreeNodeModel - L.LaffontI wrap an item to be displayed in a TreeMorph, so I can answers content/children and representation in a polymorphic way. My hierarchy usually follows TreeMorphModel one. 72 - MorphTreeModel - L.LaffontI'm the base class for tree models. See ClassListExample for basic usage. 71 - TMorphTreeModel - A.Plantec, L.LaffontI define the basic behaviors of a MorphTreeMorph model. The main intention is not clear at all. In fact this trait is not useful and all its methods should be directly added in MorphTreeModel. 70 - DeflateStream - L.LaffontI'm the base class for "stream compressor". For example, my subclass GZipWriteStream can compress a stream contents using gzip algorithm. Try: gzData := String streamContents: [:aStream| (GZipWriteStream on: aStream) nextPutAll: 'Some data to be gzipped'; close. ]. Transcript show: gzData; cr; show: (GZipReadStream on: gzData) upToEnd; cr. 69 - HostSystemMenusWindows - G.PolitoMe and the HostSystemMenusMacOSX are specializations of HostSystemMenusProxy. We know how to answer to #isActiveHostMenuProxyClass, which is used by HostSystemMenus class>>activeMenuProxyClass to determine the active menu. That's why I don't have direct references. Read HostSystemMenusProxy for more info. HostSystemMenusMacOSXSee HostSystemMenusWindows 68 - MultiNewParagraph - A.PlantecClass intention My intention is the same as my super class. This is a good reason to merge me with my super class and to remove me. My main supplementary intention is to display the different kinds of text selection (secondary, find-replace and selection bar). Class collaborations SelectionBlock instances are built by myself and stored in the extraSelectionBlocks instance variable in order to display supplementary selections Class main API no particular main API. Instance Variables extraSelectionBlocks: <Collection of SelectionBlock> findReplaceSelectionRegex: <RxMatcher> presentationLines: <Object> presentationText: <Object> refreshExtraSelection: <Boolean> secondarySelection: <String> extraSelectionBlocks - a collection of SelectionBlock for the drowing of the differents kind of text selection findReplaceSelectionRegex - the find/replace matcher that is set from the editor of by the FindReplaceService presentationLines - created for debugging purpose, should be removed ? presentationText - created for debugging purpose, should be removed ? refreshExtraSelection - a boolean that is set to tru when there is a need to refresh selections secondarySelection - the string of the secondary selection that is set from the editor when a portion of text is selected 67 - MultiDisplayScanner - S.DucasseI'm a class related to the computation of characters counting for text flow. 66 - LogicalFont - L.LaffontI describe a font. 65 - LogicalFontManager - L.LaffontI reference all font families available in the system. For example: LogicalFontManager current allFamilies. FreeTypeFontSelectorDialogWindow new open. 64 - UrlArgumentList - L.LaffontTo deprecate. 63 - MimeConverter - L.LaffontI'm the base class for converting some data from a MIME type to another. Subclasses should implement #mimeDecode and #mimeEncode. 62 - MIMEType - L.LaffontI guess and represent the content type of a file. For a description of what is MIME, see http://en.wikipedia.org/wiki/Internet_media_type http://en.wikipedia.org/wiki/MIME Examples: MIMEType forFileNameReturnMimeTypesOrDefault: 'index.html'. MIMEType fromMIMEString: 'application/zip'. To deprecate: http://code.google.com/p/pharo/issues/detail?id=4208 61 - InternetConfiguration - L.Laffont, M.DenkerI read several parameters related to the default web browser network preferences, through the InternetConfigPlugin VM module. For example, to get the default path where downloaded files should be placed: InternetConfiguration getDownloadPath. Seems to work only on MacOSX 60 - DirectoryURI - L.LaffontDeprecated http://code.google.com/p/pharo/issues/detail?id=4179 59 - HierarchicalURI - C.BélerSee URI part taken from URI class comment: "A hierarchical URI is either an absolute URI whose scheme-specific part begins with a slash character, or a relative URI, that is, a URI that does not specify a scheme. Some examples of hierarchical URIs are:
http://www.pharo-project.org/home
file:///~/calendar
A hierarchical URI is subject to further parsing according to the syntax
[scheme:][//authority][path][?query][#fragment]
where the characters :, /, ?, and # stand for themselves. The scheme-specific part of a hierarchical URI consists of the characters between the scheme and fragment parts.
The authority part of a hierarchical URI is, if specified, either server-based or registry-based. A server-based authority parses according to the syntax
[user-info@]host[:port]
where the characters @ and : stand for themselves. Nearly all URI schemes currently in use are server-based. An authority part that does not parse in this way is considered to be registry-based.
The path component of a hierarchical URI is itself said to be absolute if it begins with a slash character ('/'); otherwise it is relative. The path of a hierarchical URI that is either absolute or specifies an authority is always absolute."58 - TextPrinterdeprecated 57 - ColorMap - F.OliveroI'm a transformation of pixel values. I apply up to four masks and shits to compute the transformed pixel value. I'm used when applying a BitBlt transfer, whenever pixels from a source to a destination have diferent depths. For further information refer to BitBlt class comments. To see me in action evaluate: BitBlt exampleColorMap 56 - HostFont - C.Cunningham"Uses host fonts from a Win32 system for display. On a Windows system, if you have FontPlugin.dll with your executable, execute HostFont initWin32 Then, you should be able to use fonts from a variety of native Windows fonts of various sized and emphasis." Except, of course, for the bugs. I can't actually choose one due to some issue with IdentityGlyphMap. And, Pharo isn't shipped with the dll (I don't think) - so I picked on up from Squeak 3.8, the last time I used HostFonts (for a month or so). There are currently a lot of additional candidates for what this does. Deprecated http://code.google.com/p/pharo/issues/detail?id=4115 55 - IdentityGlyphMap - L.LaffontSounds like legacy stuff associated with bad code ...... Only referenced in StrikeFont>>characterToGlyphMap and it seems it should use an Array instead ..... See http://code.google.com/p/pharo/issues/detail?id=4115 54 - BMPReadWriter - L.LaffontI read and write BMP files. Example to save and load a screenshot of the world in a .bmp file: BMPReadWriter putForm: (Form fromDisplay: (0@0 corner: 400@400)) onFileNamed: '/tmp/screenshot.bmp'. (ImageMorph withForm: (BMPReadWriter formFromFileNamed: '/tmp/screenshot.bmp')) openInWindow. 53 - AnimatedGIFReadWriter - L.LaffontRead an animated GIF file. Example: open all images of an animated GIF file in a Morphic window gifPath := '/path/to/my_animated.gif'. forms := (AnimatedGIFReadWriter formsFromFileNamed: gifPath) forms. content := UITheme builder newRow: (forms collect: [:aForm| UITheme builder newImage: aForm]). content openInWindowLabeled: 'Content of ', gifPath. 52 - PCXReadWriter - G.PolitoI am an Image ReadWriter supposed to be in charge of PCX file encoding and decoding. Actually, as my instances does not implement understandsImageFormat, they use the default ^false implementation and I cannot be used. I don't have uses in the image also :). But in case I am fixed, the code to open a morph with a pcx image is: PCXReadWriter formFromFileNamed: 'anImage.pcx'. 51 - TestCaseAnnouncement - A.BergelI am the root of the announcement class hierarchy to monitor test execution. One can subscribe to it by simply registering on the announcer of the unit test. As an example on how to use me, open a transcript and doit the following:
BehaviorTest announcer
on: TestCaseAnnouncement
do: [ :ann |
Transcript show: ann testCase printString; cr].
BehaviorTest buildSuite run.
BehaviorTest resetAnnouncer.TestCaseStartedI am emitted before the execution of each unit test. As an example on how to use me, open a transcript and doit the following:
BehaviorTest announcer
on: TestCaseEnded
do: [ :ann |
Transcript show: ann testCase printString; cr].
BehaviorTest buildSuite run.
BehaviorTest resetAnnouncer.TestCaseEndedI am emitted after the execution of each unit test. As an example on how to use me, open a transcript and doit the following:
BehaviorTest announcer
on: TestCaseEnded
do: [ :ann |
Transcript show: ann testCase printString; cr].
BehaviorTest buildSuite run.
BehaviorTest resetAnnouncer.50 - LongTestCase - L.LaffontI'm the base class for TestCases which take long time to run and that may be discarded from default SUnit runs. It seems to me it's not supported by tools. Personnally I think long tests should be better tagged with pragma instead of subclassing. => deprecate. 49 - ClassFactoryWithOrganization - S.Ducasse, A.BergelI'm a class to create classes with a category. I'm only used by Tests. I am similar to ClassFactoryForTestCase (i.e., I can be used in place of a ClassFactoryForTestCase), expect that classes may be created on a specific class category. 48 - ClassFactoryForTestCase - A.BergelI'm useful when classes needs to be created during the execution of the test. This avoid polluting your unit tests with dummy and mock classes.
A typical usage of it is:
TestCase subclass: #YourTest
instanceVariableNames: 'classFactory'
YourTest>>setUp
classFactory := ClassFactoryForTestCase new
YourTest>>tearDown
classFactory deleteClasses.
YourTest>>testIsBehavior
| cls |
cls := classFactory newClass.
self assert: cls isBehavior47 - TAssertable - M.M.PeckI think it is not used yet. I think it is a Trait so that we can make things assertable and not need to subclass from TestCase for example. I may expect that TestCase uses such Trait instead of implementing all those methods, but it is not the case. Even more, TAssertable users size -> 0. So...seems a work half done. Adrian Kuhn introduce it. Check http://forum.world.st/template/NamlServlet.jtp?macro=search_page&node=1294837&query=TAssertable 46 - SUnitUnloader - S.V.CaekenbergheI am SUnitUnloader, a little tool to unload SUnit and a fixed set of Tests from the current image. Usage: SUnitUnloader new unloadAll Caveat: #unloadTestPackages uses a fixed and probably ill maintained list of what packages hold unit tests. 45 - TestCoverage - L.LaffontI wrap a method in order to detect whether it has been called or not. Then I can be used to calculate test coverage for SUnit. 44 - ColorChanged - L.LaffontI'm a Announcement used to indicate a color has changed. Example: (ColorSelectorDialogWindow new title: 'Choose a color'; open; announcer) on: ColorChanged do: [:ann| UIManager inform: 'Selected color: ', ann newColor asString]. 43 - FreeTypeFontSelectorDialogWindow - L.LaffontNote: remove TextStyleFontSelectorDialogWindow I'm a dialog to select a font. Usage example: |fontSelector| fontSelector := FreeTypeFontSelectorDialogWindow new. UITheme builder openModal: fontSelector. fontSelector selectedFont inspect. 42 - ExpanderMorphContracted - G.Chambers"I am an Announcement that occurs when an ExpanderMorph is contracted (rolled-up).
Example where visibility of another UI component depends on the expanded/contracted state of Expander 2
|builder expanders ex1 ex2 text list row|
builder := UITheme builder.
expanders := builder newColumn: {
ex1 := builder newExpander: 'Expander 1'.
ex2 := builder newExpander: 'Expander 2'}.
expanders
width: 100;
hResizing: #rigid.
text := builder
newTextEditorFor: (ValueHolder new contents: 'Some text')
getText: #contents setText: #contents:.
list := (builder
newListFor: (ListModel new list: #('One' 'Two' 'Three' 'Four'); selectionIndex: 3)
list: #list selected: #selectionIndex changeSelected: #selectionIndex:
help: 'This is a list')
minWidth: 120;
visible: false;
disableTableLayout: true.
ex2 announcer
when: ExpanderMorphContracted do: [list hide; disableTableLayout: true];
when: ExpanderMorphExpanded do: [list show; disableTableLayout: false].
row := builder newRow: {
expanders.
(builder newRow: {text. list})
vResizing: #spaceFill}.41 - NonReentrantWeakMessageSend - H.JohansenNonReentrantWeakMessageSend does what it says, while the message is being executed, additional evaluations will be discarded. It's used by when:sendOnce:to: protocol from Polymorph events, but unused in the base image. when:send:to:exclusive: is used one place though. It's useful when objects are mutually registered to each other's events, but the actions may lead to the others action being triggered. Examples are - two lists whose contents update based on the selection in the other - The DiffMorph (Uses ExclusiveWeakMessageSend) ExclusiveWeakMessageSend are used when the decision whether to process an event is shared between multiple objects. IE 2 objects respond to different events, but if received simultaneously, only the first of them should have it's action executed. With Announcement, the corresponding functionality to non-reentrancy would be achieved using: VW - AnnouncementCollection>>suspendWhile: anActionBlock Pharo - Announcer >> suspend: aSubscriber while: anActionBlock (As we neither have a specific AnnouncementCollection class, nor access to Registry itself. Not implemented yet though :P) The shared state required to achieve Exclusivity would probably have to recide outside of the framework. ExclusiveWeakMessageSendSee NonReentrantWeakMessageSend 40 - PasswordDialogWindow - L.LaffontI'm a Dialog whose TextEditors characters are replaced by *. Example: (UITheme builder openModal: (PasswordDialogWindow new title: 'Authentification'; textFont: StandardFonts defaultFont; text: 'Enter your password')) entryText explore 39 - EditableDropListMorph - L.LaffontI'm a DropListMorph which content can be modified. Try: (EditableDropListMorph on: [#(one two three)] list: #value selected: nil changeSelected: nil) openInWindow extent: 400@20. 38 - PathShape - G.Chambers, L.LaffontI represent a model of an open sequence of connected points that can be queried for enclosing bounds and whether a point lies along any segment. I am typically used for drawing with a Canvas. ps := PathShape new addVertex: 0@0; addVertex: 30@30; addVertex: 50@10. self assert: (ps containsPoint: 24@24). self assert: (ps containsPoint: 40@30) not. Transcript show: ps calculatedBounds asString; cr. PolygonI'm a Polygon PathShape (see PathShape). 37 - MCPatcher - HJ.OhI can add or remove or modify definitions. My main purpose is to generate monticello snapshot out of multiple snapshots or definitions by using my most used method #apply:to:. 36 - MCDefinitionIndex - S.DucasseI'm a simple container of MCDefinitions which can be added or removed. 35 - MCPackageCache - S.DucasseI'm a kind of cache for versions and filenames of packages. 34 - MCStWriter - L.LaffontI write Category/Classes/Methods/.... definitions into Monticello source.st file format found in .mcz packages.
See also MCStReader
Example:
String streamContents: [:aStream| |writer|
writer := MCStWriter on: aStream.
writer writeDefinitions: {True asClassDefinition. False asClassDefinition}.
]MCStReaderI read Category/Classes/Methodes/.... definitions from Monticello source.st file format.
See also MCStWriter.
Example:
|source|
source := String streamContents: [:aStream| |writer|
writer := MCStWriter on: aStream.
writer writeDefinitions: {True asClassDefinition. False asClassDefinition}.
].
(MCStReader on: source readStream) definitions explore.33 - StrikeFontSet - HwaJong Oh, L.LaffontI am something acts like a font out of collection of fonts. First font in me is used as representative font to answer many messages. Examples: - display a font: StrikeFontSet allInstances first fontDisplay - calculate pixels width of a string for a font: StrikeFontSet allInstances first widthOfString: 'Pharo' 32 - MCScanner - L.Renggli, L.LaffontI scan / tokenize metadata (package name, version info, ancestry, dependencies, ...) found in .mcz files. For example, try: MCScanner scan: '(name ''MyPackage-ll.6'' message ''Fix bug xxx'' id ''b21dbd73-f1c3-2746-a3cc-92f1d4edea28'')' readStream 31 - PreDebugWindow - G.PolitoI am the window that shows up when the debugger is launched. I show you the first lines of the stack trace that caused my apparition, and buttons to allow you to: - resume the execution - abandon the execution - debug this error - create the method if it is MessageNotUnderstood exception To see me, evaluate: 2/0 30 - StepMessage - L.LaffontI'm a MorphicAlarm to be queued in WorldState list of stepping actions. I hold the stepTime (refresh period) of my receiver / Morph (if nil, the #stepTime value of my receiver is used). See - WordState>>runLocalStepMethodsIn: (where the stepping actions are sent). - WorldState>>startStepping:at:selector:arguments:stepTime: (to queue a new StepMessage) Example: MorphicUIManager currentWorld startStepping: (Morph new openInWorld) at: Time millisecondClockValue selector: #toggleVisible arguments: nil stepTime: 500. 29 - EventSensorConstants - I.StasenkoThis is a constants, used by EventSensor to identify various event types and theirs contents. NOTE: A constant values should be kept in sync with VM-side, which are defined in sq.h header file. 28 - ImmAbstractPlatform - H.JohansenI provide an abstract interface for providing feedback needed by the OS for doing correct multilingual input/output. Precomposition is done for countries (Japan, Korea ) where keyboards have phonetic characters which are combined to create actual ideographic characters, which are then sent as actual key events to the application It is a way to tell the operating system where it should display intermediate characters in certain composition modii for input methods which usually precompose characters before they are actually sent to the application. (At least for the ImmX11 usage) From the link below, it seems to be the case for certain Asian keyboards: http://menehune.opt.wfu.edu/Kokua/Irix_6.5.21_doc_cd/usr/share/Insight/library/SGI_bookshelves/SGI_Developer/books/XLib_PG/sgi_html/ch11.html (Sections "Issues of Internationalized Text Input" and "User Interaction with an Input Method" should be sufficient for a brief overview) On Windows, the plugin is not provided in the shipped VM's, and its current whereabouts are uncertain. On Unix, the only implemented behaviour is setting the position when over-the-spot precomposition of characters is the current mode. In the VM, the mode is chosen to the first available valid mode returned by the X Server, so whether this is actually relevant at all depends on the X Server. ImmWin32See ImmAbstractPlatform ImmX11See ImmAbstractPlatform 27 - DropEvent - F.Olivero, R.MoranI model the event produced when a hand drops a (grabbed) morph into another morph. I know the position of the drop, the dropped morph and the hand that produced me. To handle this event a morph should override one of these methods: #acceptDroppingMorph:event: #justDroppedInto:event: Additionaly, a morph can specify if it wants to accept a dropped morph by overriding #wantsDroppedMorph:event:. Symmetrically, the morph being dropped can specify if it wants to be dropped in another morph by overriding #wantsToBeDroppedInto:. Note that for a successful drop operation both parties need to agree. See HandMorph>>dropMorph:event: for an example of usage. 26 - PickAFileToWriteNotification - Carlo, F.OliveroI provide a way to indicate that an object would like a file to write to. (Note: not referenced, may be removed). You can use me as follows: | file | [file := PickAFileToWriteNotification signal. file inspect] on: PickAFileToWriteNotification do: [:ex | | newFileName stream | newFileName := FillInTheBlankMorph request: 'Name of file to write:' translated initialAnswer: 'xxx'. stream := FileStream fileNamed: newFileName. stream ifNotNil: [ex resume: stream]]. 25 - PolymorphSystemSettings - L.LaffontI provide settings for Morphic appearance (theme, fonts, colors, ...) that can be found and changed in the Settings browser. 24 - DockingBarMorph - L.LaffontI'm a kind of container which adhere to one edge of the screen. See me in action with:
DockingBarMorph new
addMorph: (SimpleButtonMorph new
label: 'Say hello';
target: [UIManager inform: 'Hello'];
actionSelector: #value);
addMorph: (SimpleButtonMorph new
label: 'Say bonjour';
target: [UIManager inform: 'Bonjour'];
actionSelector: #value);
addMorph: (SimpleButtonMorph new
label: 'Close';
target: [DockingBarMorph allInstances last delete];
actionSelector: #value);
adhereToBottom;
openInWorld.23 - PopupChoiceDialogWindowWithMessage - L.LaffontI'm a dialog which ask the user to select a element in a list. See me in action:
UIManager default inform:
(UIManager default
chooseFrom: #(one two three)
values: #('1' '2' '3')
message: 'Select one'
title: 'PopupChoiceDialogWindowWithMessage example').22 - EditableTextMorphAnnouncement - L.LaffontI'm the base class for Annoucements sent by EditableTextMorph objects. See Announcements framework HelpSystem book for help on Announcements. 21 - DictionaryInspector - Carlo, N.BouraqadiI provide a custom inspector for classes of type Dictionary. These customizations are tools to interactively manipulate the Dictionary I'm inspecting and they are accessed in the context menu of the currently selected association. The customizations that I provide are as follows: inspect -> Create and schedule an Inspector on my currently selected association copy name -> copy the name of my currently selected association so that it can be pasted somewhere else references -> Create a browser on all references to the association of the current selection objects pointing to this value -> Open a list inspector on all the objects that point to the value of the selected instance variable, if any. senders of this key -> Create a browser on all senders of the selected key refresh view add key rename key remove basic inspect -> Bring up a non-special inspector 20 - Loader - N.Bouraqadi, S.DucasseI'm an abstract class which collect some infos about package and system (versions, dirty). #currentChangedPackages instance method and #currentMajorVersionNumber class are missing and provided by my wellknown subclass ScriptLoader (see ScriptLoader comment). Stef: This is a class that was extracted from scriptLoader because I want to slowly get in place a loader infrastructure based on Metacello. 19 - NaturalLanguageFormTranslator - G.ChambersProvides support for looking up Forms by name for presentation in the UI. Different forms can be registered for a name for different locales allowing images presented in the UI to be localised. Typically used where images contain language dependent text. E.g. buttonForm := (NaturalLanguageFormTranslator localeID: Locale current localeID) translate: 'submit button' Form translations are added like so: (NaturalLanguageFormTranslator isoLanguage: 'en' isoCountry: 'gb') name: 'submit button' form: aForm 18 - SMxMorphicAlarm - N.Bouraqadi, L.Laffont, H.JohansenI represent a message sent to be scheduled by the SMxWorldState. I'm the exact duplicate of MorphicAlarm in the Simple Morphic world (see MorphicAlarm comment). MorphicAlarmI represent a message to be scheduled by the WorldState.
For example, you can see me in action with the following example which print 'alarm test' on Transcript one second after evaluating the code:
Transcript open.
MorphicUIManager currentWorld
addAlarm: #show:
withArguments: #('alarm test')
for: Transcript
at: (Time millisecondClockValue + 1000).
* Note *
Compared to doing:
[(Delay forMilliseconds: 1000) wait. Transcript show: 'alarm test'] forkAt: Processor activeProcess priority +1.
the alarm system has several distinctions:
- Runs with the step refresh rate resolution.
- Alarms only run for the active world. (Unless a non-standard scheduler is in use)
- Alarms with the same scheduled time are guaranteed to be executed in the order they were added17. MCSnapshotReader - L.LaffontI'm useless and can be safely removed. I'm only referenced in MCMczReader>>extractDefinitionsFrom: and it can be replaced by MCReader. 16. GoferReinitialize - L.RenggliI'm a private and internal class to Gofer. I'm a command used to call the class side initializers on all package code. 15. PSMCPatchMorph - G.PolitoI'm a Monticello tool based on polymorph used to browse diffs. Activate me with the setting named 'Use Polymorph difference tools'. 14. MCSnapshotReader - H.JohansenI am an abstract class defining the interface for reading sources containing class and method definitions. I should define loadDefinitions as a subclassResponsibility, but don't. MCVersionReader could be a subclass of me for reading sources containing additional metadata, but isn't. 13. NullEncoder - I.StasenkoI am a Canvas superclass with completely misleading name and purpose ... which gives an impression that drawing using canvas is a way of 'encoding' objects on display surface. 12. PluggableListMorphByItem - G.ChambersEssentially useless in its current form. Probably intended to eventually deal with actual objects in the list rather than indexing/string-forms 11. ColorMappingCanvas - I.Stasenko, L.LaffontI'm an abstract class which introduce a filter between a drawing request and the final output, handled by #mapColor: For each potential pixel operation like: source -> op -> output it introducing a color mapping stage: source -> op -> mapping -> output Then #mapColor: can be redefined in subclasses to implement more specific behavior. For example: - ShadowDrawingCanvas will replace the rendered color with the color of shadow (if not transparent). - AlphaBlendingCanvas will add or intensify alpha of rendered color. For an easy to understand example see #drawPolygon:color:borderWidth:borderColor: ShadowDrawingCanvassee ColorMappingCanvas comment. AlphaBlendingCanvassee ColorMappingCanvas comment. 10. DummyUIManager - L.LaffontI'm an alternative UIManager used to run an the image without GUI. I redefine methods which requires user input as these requests are irrelevant in a headless environment. 9. HTTPDownloadRequest - L.LaffontI encapsulate an HTTP request which can be queued in an HTTPLoader instance. 8. WikiStyleHelpBuilder - L.LaffontI'm an HelpSystem builder which create an HelpSystem book from a wiki-like formatted string. ! Usage - Create a class-side method on the class you want to put documentation. - Add the pragma <wikiStyleHelp:> with the title of the book as parameter - The method should answer the documentation as a String (using Pier syntax. See http://www.piercms.com/doc/syntax ). ! Example MyClass class>>aMethod <wikiStyleHelp: #'The name of the book I want to write'> ^ ' ! Section 1 Some text for this section !! Subsection 1.1 !!! Subsection 1.1.1 !! Subsection 1.2 ! Section 2' And add WikiStyleHelpBuilder class>>help <wikiStyleHelp: #'Write documentation with wiki like syntax'> ^ self comment 7. CodeAnnotationMorph - A.PlantecI display code annotations that can be embedded in a browser (basic core image browser) to show useful informations about the current method or class. In order to show me in your browser, the "show annotation pane" setting must be set to true (search for 'annotation' in the setting browser). This setting is set to false by default. The informations to show are given by CodeHolder>>annotation. A methods annotation is built according to a list of requests which consists in a list of symbols. These symbols are interpreted by CodeHolder>>#annotationForSelector: ofClass:. See CodeHolder class >>#annotationRequests for more details about this list of requests. By default, the author, the time stamp, the message category, the senders and implementors count and the list of change sets in which the method is referenced are shown. Because the building of an annotation can be very time consuming (especially the implementors count),an annotation is built in background. So, I am also a good example of how a process can be used in order to build some data in background. Instance Variables codeHolder: <CodeHolder> process: <Process> codeHolder - The CodeHolder (a Browser, a MessageList ..) in which I'm embedded process - The process which is building the annotation in background 6. StandardFonts - S.V.Caekenberghe, L.LaffontI am a facade and a global reference to actual fonts to be used system wide in a number of predefined categories. I also provide methods to interactively choose these fonts, to reset all fonts to some default value, to set larger demo fonts, to construct a font menu and to manipulate the current settings as an external specification. The font categories that I know of are: ButtonFont, CodeFont, HaloFont, ListFont, MenuFont and WindowTitleFont Examples: - I open a dialog to choose the font for buttons with: StandardFonts chooseButtonFont. - To change base size for all fonts (when you want big fonts for a screencast or a presentation): StandardFonts setDemoFonts. - Then restore default fonts with: StandardFonts restoreDefaultFonts. 5. PseudoFileStream - N.CellierI try to act as two different things: - a file entry in a ServerDirectory - a stream on the content of a file entry I am a good example of inheritance pushed to absurd where composition would be more powerfull and more simple to explain. Any good soul willing to refactor me is welcome. (Warning, you'll have to revisit the whole ServerDirectory and its subclasses). 4. RecategorizedEvent - S.Ducasse, E.Lorenzano, I.StasenkoAbstractEvent:I'm a generic event raised by the system (SystemChangeNotifier) when anything (both classes or methods) changes in the system. Each one of my children represents a specific kind of event the system can notify. Now I will soon vanish and be replaced by announcements. RecategorizedEvent:I'm an event raised by the system (SystemChangeNotifier) when a class or a method changed its category. The way to create my instances is the following:
(RecategorizedEvent
method: (aClass compiledMethodAt: selector ifAbsent: [nil])
selector: selector
protocol: newCategory
class: aClass
oldProtocol: oldCategory)
(RecategorizedEvent
class: aClass
category: newCategory
oldCategory: oldCategory)
Now I will soon vanish and be replaced by announcements.3. HTTPClient - S.V.Caekenberghe, L.Laffont, F.O.PeñalozaI'm a facade for doing simple HTTP GET/POST operations like downloading / uploading some content.
For example, I get HTML content for http://www.pharo-project.org web page like this:
HTTPClient httpGet: 'http://www.pharo-project.org'.
HTTPClient httpGetDocument: 'http://www.pharo-project.org'.
When successful, a Stream respectively a MIMEDocument is returned, in case of error, a String is returned.
Or, I can make a application/x-www-form-urlencoded post request to http://intranet.acme.com/login and send form data to the server like this:
(args := Dictionary new)
at: 'username' put: #('john@acme.com');
at: 'password' put: #('secretpassword').
result := HTTPClient httpPostDocument: 'http://intranet.acme.com/login' args: args.
Alternatively, I can do a multipart/formdata post request to http://intranet.acme.com/files and send a file like this:
(args := Dictionary new)
at: 'file' put: (Array with: (MIMEDocument contents: 'This is a test' mimeType: 'text/plain' uri: 'file:///test.txt').
result := HTTPClient httpPostDocument: 'http://intranet.acme.com/files' args: args.2. SmalltalkEditingState - A.PlantecSee EditingState comments. SmalltalkEditingState is made to manage data for Smalltalk code editing sessions (such as a selector chooser). Instance Variables: selectorChooser <SelectorChooserMorph> - selectorChooser The basic selector chooser which is popup to fetch available selectors or class names begining with a prefix. The prefix is token from the current caret location (see SelectorChooserMorph comments) EditingStateI store the current state of an editing session. An instance of mine is shared by all TextEditor instances that are created during an editing session managed by a TextMorph (see below for more explanations about editing session). The state data are basically made of an undo/redo manager and of all data needed in order to manage text editing undo and redo (mainly all informations for the current and previous selection intervals). I'm created by a TextEditor at the beginning of an editing session (see TextEditor>>editingStateClass and TextEditor>>editingState). Specializations can be introduced to fit a particular TextEditor subclass need. Editing session: An editing session starts when a TextMorph is created (precisely, when a TextEditor instance is first assigned to a TextMorph editor instance variable). An editing session ends when a TextMorph is deleted. During an editing session, a TextMorph can make use of a lot of TextEditor instances, one at a time. As an example, each time a TextMorph is resized, its editor is released and a new one that fit the TextMorph physical properties is created. Another example, when a TextMorph loses the keyboard focus, then its editor could be fully released; it is created again when the TextMorph retrieves the focus. When an editor is created by a TextMorph, the state of the previous TextEditor, stored in its associated EditingState instance, is got and passed to the newly created editor. Thus the editing session remains stable (see TextEditor >> #stateArray and TextMorph >> #installEditorToReplace:). So TextEditor instances are extremely volatile whereas its associated EditingState instance remains during the whole editing session. Instance Variables: emphasisHere <Array of TextAttribute> pointBlock <CharacterBlock> markBlock <CharacterBlock> startOfTyping <Integer> previousInterval <Interval> previousSelection <Text> undoManager <HistoryIterator> lastParenLocation <Integer> mouseDownInterval <Interval> secondarySelectionToken ** obsolete ** should be removed ** - emphasisHere: The TextAttributes that are used for the newly entered text - pointBlock: The CharacterBlock where a selection begins (where the mouse has first pointed) - markBlock: The CharacterBlock where a selection ends - startOfTyping: The index of the first character which has been entered during the currently undoable/redoable portion of text (see TextEditor>>#openTypeIn and TextEditor>>#doneTyping) - previousInterval: Previous interval used for undo/redo actions - previousSelection: The previously selected text for undo/redo actions - undoManager: The undo/redo manager - lastParenLocation: Keep the position of the open parenthesis which corresponds to the last entered close parenthesis - mouseDownInterval: The position of the first mouse down in the editor 1. MCFileRepositoryInspector - S.Ducasse, G.Polito, L.LaffontI'm a monticello tool composed of three panes to browse repositories and the packages they contain. You get an instance of me when you click on a repository in Monticello browser and press open. My left pane presents the packages, my right one their versions and the bottom one the commit log of the selected package versions. I underline the packages you already loaded, and highlight the ones you don't have updated to the last version. I also highlight the versions you did not load yet. Example: I can browse packages of PharoInbox with: (MCFileRepositoryInspector repository: (MCHttpRepository location: 'http://www.squeaksource.com/PharoInbox' user: '' password: '') workingCopy: nil) show. |
► Sign in to add a comment