Skip to content

Commit

Permalink
Merge pull request #196 from hpi-swa-teaching/more-class-comments
Browse files Browse the repository at this point in the history
Updated more class comments
  • Loading branch information
frcroth authored Aug 7, 2020
2 parents 064306e + 3819527 commit 2287923
Show file tree
Hide file tree
Showing 16 changed files with 41 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ My instance variables are:
name - aString
text - aText
textStructures - anOrderedCollection
timeLastSaved - aDateAndTime
timestampLastSaved - aDateAndTime

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
],
"classvars" : [
],
"commentStamp" : "kh 6/19/2020 00:40",
"commentStamp" : "JEH 8/7/2020 16:59",
"instvars" : [
"textStructures",
"text",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ You can open me with: RichTextEditorModel open.

My instance variables are:
textView - aView
footer - aString
label - aString
selectedStructures - aSet (structures selected in structure list)
bufferedStructures - aSet (structures selected in structure list without selected text)
selectedStructures - aSet (structures selected in structure list for current text selection)
targetDocument - aRichTextDocument (saved document)
bufferDocument - aRichTextDocument (not saved --> back to target document)
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,14 @@
"autocompletion" ],
"classvars" : [
],
"commentStamp" : "ls 7/25/2019 13:49",
"commentStamp" : "JEH 8/7/2020 17:18",
"instvars" : [
"textView",
"footer",
"label",
"selectedStructures",
"bufferedStructures",
"debufferedStructures",
"targetDocument",
"bufferDocument",
"precedingStructures" ],
"bufferDocument" ],
"name" : "RichTextEditorModel",
"pools" : [
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
I am a RichTextHTMLExportStrategy.
I export a document to a file by first converting all applied structures, as long as a matching HTML structure is found and then inserting the appropriate HTML tags when a structure starts or ends.
I export a document to a file by first converting all applied structures, as long as a matching HTML structure is found (lookup by name),
and then inserting the appropriate HTML tags when a structure starts or ends.
To do this, I use the RichTextDocumentReadStream and implement methods that react to its stop conditions.
I also take care of lists, where I convert line feeds and paragraphs to new list items.

My instance variables are:
outputString - stores the current state of the string that is written to the file in the end
eventHandlingDictionary - maps stop conditions to methods
currentStructures - structures that are active at current location in input text
document - document to export
fileStream - stream that the outputString is written to in the end (represents the file to save to)
openingStrings - dictionary that maps structures to HTML opening tags
closingStrings - dictionary that maps structures to HTML closing tags
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
],
"classvars" : [
],
"commentStamp" : "JEH 8/7/2020 16:05",
"commentStamp" : "JEH 8/7/2020 17:24",
"instvars" : [
"outputString",
"eventHandlingDictionary",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
I am a RichTextHTMLTemplate.

I specify structures that can be used to style the text in a HTML-like formatting.
Currently, it does mirror the RichTextMarkdownTemplate, since the two formats contain similar structures.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
],
"classvars" : [
],
"commentStamp" : "",
"commentStamp" : "JEH 8/7/2020 17:13",
"instvars" : [
],
"name" : "RichTextHTMLTemplate",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
I am a class containing help topics on SquidWord. The help provided by me is included automatically in the Squeak system help.
I am a class containing help topics on SquidWord. The help provided by me is automatically included in the Squeak system help.

You can add a new help page by creating a new method on class side returning a HelpTopic and adding the selector of the new method in the #pages method.
It is recommended to edit the text of a help topic using the HelpBrowser.
It is recommended to edit the text of a help topic inside the HelpBrowser (simply alter the text of the page and press Ctrl-S to save).
The respective method for this topic will then be updated automatically.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
],
"classvars" : [
],
"commentStamp" : "kh 6/1/2020 13:43",
"commentStamp" : "JEH 8/7/2020 17:09",
"instvars" : [
],
"name" : "RichTextHelp",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
I am a RichTextMarkdownExportStrategy.
I export a document to a file by using the HTML export option, because exporting to Markdown syntax has some issues and HTML is also valid markdown.
I export a document to a file by using the HTML export option, because exporting to Markdown syntax has some issues and HTML is also valid markdown.

Some issues encountered while trying to export to markdown syntax:
- nested structures (especially of the like that is not possible in markdown, e.g. heading inside of an heading, citation inside an url...)
- bold/italic/etc. are not rendered correctly in markdown, if the enclosed text starts or ends with a space
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
],
"classvars" : [
],
"commentStamp" : "JEH 8/7/2020 16:08",
"commentStamp" : "JEH 8/7/2020 16:57",
"instvars" : [
],
"name" : "RichTextMarkdownExportStrategy",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ I am using a null object (NullTextStructure) so you do not have to check for nil

My instance variables are:
structureIdentifier - aSymbol
attributes - aSet of TextAttributes
attributes - aSet of TextAttributes
preAddHook - action that is performed before the structure is applied on a text
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
],
"classvars" : [
],
"commentStamp" : "kh 6/21/2020 10:08",
"commentStamp" : "JEH 8/7/2020 17:27",
"instvars" : [
"structureIdentifier",
"attributes",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
I am a RichTextStructureEditor. You can use me as a user interface to edit, remove or create TextStructures. For this, I collaborate with the RichTextDocument.
For each TextStructure, you can choose multiple styles (e.g. bold, italic, underlined), add a font or a color and reset them.
You can increase and decrease the priority of a text structure. If multiple text structures are added to a text and properties are in conflict (e.g. color), the property of the text structure with the higher priority (the lowest index) will be displayed.
Additinally, you can use me to set a new template for text structures (see RichTextStructureTemplate and its subclasses for details).
You can open me with: RichTextStructureEditor openWith: RichTextDocument new.

My instance variables are:
Expand All @@ -9,4 +10,5 @@ structureList - anOrderedCollection
styleList - anOrderedCollection
loremIpsum - aText (previewText)
lastStructureSymbol - aSymbol
currentStructureSymbol - aSymbol
currentStructureSymbol - aSymbol
currentTemplateSymbol - aSymbol
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
],
"classvars" : [
],
"commentStamp" : "ls 7/25/2019 13:53",
"commentStamp" : "JEH 8/7/2020 17:25",
"instvars" : [
"document",
"structureList",
Expand Down

0 comments on commit 2287923

Please sign in to comment.