diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5bbba85..65a1f97 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -21,4 +21,6 @@ jobs: with: smalltalk-version: ${{ matrix.smalltalk }} - run: smalltalkci -s ${{ matrix.smalltalk }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} timeout-minutes: 15 diff --git a/.smalltalk.ston b/.smalltalk.ston old mode 100755 new mode 100644 index 0c97a30..2219d9e --- a/.smalltalk.ston +++ b/.smalltalk.ston @@ -13,4 +13,4 @@ SmalltalkCISpec { #packages : [ 'RichTextEditing-Core' ] } } -} +} \ No newline at end of file diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..69b39c7 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,14 @@ +This file lists all people that have actively contributed to the +development of the project in alphabetical order. + +Alina Gries +Konrad Hanff +Jan-Eric Hellenberg +Laura Holz +Tobias Kantusch +Leon Matthes +Patrick Rein +Selina Reinhard +Felix Roth +Ole Schlüter +Leon Schmidt diff --git a/Klassendiagramm_SoSe19.svg b/Klassendiagramm_SoSe19.svg deleted file mode 100644 index 9775b41..0000000 --- a/Klassendiagramm_SoSe19.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..65e3249 --- /dev/null +++ b/LICENSE @@ -0,0 +1,7 @@ +Copyright 2020 hpi-swa RichTextEditor Team (See AUTHORS) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index 29cf679..3a4b4ca 100644 --- a/README.md +++ b/README.md @@ -4,20 +4,9 @@ This is an implementation of a text editor in Squeak, which is capable of writing structured text. This means that text can be divided into logical units. Paragraphs are used to structure the text into sections on a broad level and so-called "text structures" are used to assign certain meanings to particular parts of the text. # Using the editor -## Paragraphs -Pressing *Enter* inserts a Parapraph, pressing *Shift + Enter* insert a normal line break. The paragraph is visible by an increased line height. -Structures can be applied to portions of the text by selecting the particular text and selecting the structures from the list of available structures on the left-hand side. +Once installed, you can launch SquidWord by going to the `Apps` tab in Squeaks menu bar and clicking on `SquidWord`. -## Structures -Structures can be customized with regards to emphasis, color and font. For this purpose, one can use the **Structure Editor** which comes bundled with the Text Editor. In the structure Editor, it is also possible to add or remove completely custom structures and prioritize them (e.g. to determine which color should be displayed if multiple structures are applied to the same text). Custom structures will appear in the structure selection list on the right side of the respective editor. - -## Saving and Loading -When the text is saved via the *Save* menu item or by pressing *Ctrl + s*, the changes regarding the text and structures are written into a **RichTextDocument** object. This object can be inspected by clicking the *Document* button in the editor. It is possible to open the document in another editor by sending the message *openInEditor* to it. - -The *Save as...* menu item lets the user choose a name for the document. The document is then saved in the image (in it's current state, so make sure to save temporary changes to the document prior to that). It can be loaded in any other editor via the *Load* menu item. - -## Import and Export -The document can be exported into a file and imported from a file. At the current moment, text structures can not be imported or exported. +For information on using the editor and its functionalities, refer to the integrated `Help Browser` that can be opened using the `Help` button in the upper right hand corner of SquidWord. # Supported Versions All Squeak versions >= 5.1 are supported. @@ -27,16 +16,12 @@ Copy this command into your local workspace and execute (Ctrl + d) it: ``` Smalltalk Metacello new baseline: 'RichTextEditing'; - repository: 'github://hpi-swa-teaching/RichTextEditing:master/packages'; + repository: 'github://hpi-swa-teaching/RichTextEditing:dev/packages'; load. ``` -# SWT 2020 -## XP Practice -We have used XP as a development method. In particular, we have used Resources, Scopes, Quality, Time to optimize the development process. Furthermore we continued the acceptance tests, but extended them with unit tests. As further practices we have introduced a style guide, which can be found at STYLEGUIDE.md. We also introduced the practice of "small releases" by publishing a github release every two weeks, and we established the practice of "planning game". -# SWT 2019 -## XP Practice -We used acceptance testing so we valued well-understandable tests. That's why we used code duplication in some tests so that the customer can follow the test steps in each test. For each acceptance criterium (you can find them in the userstories) we wrote one or more tests. We named the tests as follows: "testUS" + number of the user story + what is the test testing +# Developer advice +If you are new to the project and starting to develop more features visit the Wiki over at [https://github.com/hpi-swa-teaching/RichTextEditing/wiki](https://github.com/hpi-swa-teaching/RichTextEditing/wiki). ## Outlook -In the future, it may also be possible to reflect over the text. Therefore, one would be able to easily export the text into different formats (e.g. Markdown, HTML, ...). +In the future, it might be possible to integrate morphs, tables etc. into rich text. The Scripting API and exporting/importing functionality is also up for improvement. Additionally, it may be possible to integrate rich text into other tools (i.e. e-mail client). diff --git a/meta/ClassDiagram2020.svg b/meta/ClassDiagram2020.svg new file mode 100644 index 0000000..7a26d1c --- /dev/null +++ b/meta/ClassDiagram2020.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/meta/Presentation2020.pdf b/meta/Presentation2020.pdf new file mode 100644 index 0000000..bfc717a Binary files /dev/null and b/meta/Presentation2020.pdf differ diff --git a/packages/BaselineOfRichTextEditing.package/BaselineOfRichTextEditing.class/instance/baseline..st b/packages/BaselineOfRichTextEditing.package/BaselineOfRichTextEditing.class/instance/baseline..st index 3e001fb..300ed7e 100644 --- a/packages/BaselineOfRichTextEditing.package/BaselineOfRichTextEditing.class/instance/baseline..st +++ b/packages/BaselineOfRichTextEditing.package/BaselineOfRichTextEditing.class/instance/baseline..st @@ -7,9 +7,12 @@ baseline: spec spec baseline: 'MorphicTestingFramework' with: [ spec repository: 'github://hpi-swa-teaching/Morphic-Testing-Framework:master/packages']. + spec baseline: 'Autocompletion' with: [ + spec + repository: 'github://MrModder/Autocompletion:master/packages']. spec package: 'RichTextEditing-Core' with: [spec postLoadDoIt: #initializeCharacterScanner]; - package: 'RichTextEditing-Tests' with: [spec requires: #('RichTextEditing-Core' 'MorphicTestingFramework')] + package: 'RichTextEditing-Tests' with: [spec requires: #('RichTextEditing-Core' 'MorphicTestingFramework' 'Autocompletion')] yourself. spec group: 'default' with: #('RichTextEditing-Core'); diff --git a/packages/BaselineOfRichTextEditing.package/BaselineOfRichTextEditing.class/methodProperties.json b/packages/BaselineOfRichTextEditing.package/BaselineOfRichTextEditing.class/methodProperties.json index 8e0d24b..e4d7cf4 100644 --- a/packages/BaselineOfRichTextEditing.package/BaselineOfRichTextEditing.class/methodProperties.json +++ b/packages/BaselineOfRichTextEditing.package/BaselineOfRichTextEditing.class/methodProperties.json @@ -2,6 +2,6 @@ "class" : { }, "instance" : { - "baseline:" : "lh 7/24/2019 20:53", + "baseline:" : "frc 7/3/2020 21:32", "initializeCharacterScanner" : "LM 5/26/2019 22:58", "projectClass" : "frc 7/3/2020 10:18" } } diff --git a/packages/RichTextEditing-Core.package/DocumentReadStream.class/instance/currentCharacter.st b/packages/RichTextEditing-Core.package/DocumentReadStream.class/instance/currentCharacter.st deleted file mode 100644 index 656049c..0000000 --- a/packages/RichTextEditing-Core.package/DocumentReadStream.class/instance/currentCharacter.st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -currentCharacter - - ^ self text at: self position \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/DocumentReadStream.class/instance/paragraph.st b/packages/RichTextEditing-Core.package/DocumentReadStream.class/instance/paragraph.st deleted file mode 100644 index 16fd94f..0000000 --- a/packages/RichTextEditing-Core.package/DocumentReadStream.class/instance/paragraph.st +++ /dev/null @@ -1,6 +0,0 @@ -stop conditions -paragraph - - ^ self currentCharacter = self paragraphCharacter - ifTrue: [#paragraph] - ifFalse: [nil] \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/DocumentReadStream.class/instance/readLimit..st b/packages/RichTextEditing-Core.package/DocumentReadStream.class/instance/readLimit..st deleted file mode 100644 index 1c1eef1..0000000 --- a/packages/RichTextEditing-Core.package/DocumentReadStream.class/instance/readLimit..st +++ /dev/null @@ -1,4 +0,0 @@ -stop conditions -readLimit: aNumber - - readLimit := aNumber \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/DocumentReadStream.class/instance/structureDifferenceBetween.and..st b/packages/RichTextEditing-Core.package/DocumentReadStream.class/instance/structureDifferenceBetween.and..st deleted file mode 100644 index 8aac959..0000000 --- a/packages/RichTextEditing-Core.package/DocumentReadStream.class/instance/structureDifferenceBetween.and..st +++ /dev/null @@ -1,4 +0,0 @@ -stop conditions -structureDifferenceBetween: firstPosition and: secondPosition - - ^ (self text attributesAt: firstPosition) difference: (self text attributesAt: secondPosition) \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/DocumentReadStream.class/instance/text..st b/packages/RichTextEditing-Core.package/DocumentReadStream.class/instance/text..st deleted file mode 100644 index bcad994..0000000 --- a/packages/RichTextEditing-Core.package/DocumentReadStream.class/instance/text..st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -text: aText - - collection := aText \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/DocumentReadStream.class/methodProperties.json b/packages/RichTextEditing-Core.package/DocumentReadStream.class/methodProperties.json deleted file mode 100644 index d43c77e..0000000 --- a/packages/RichTextEditing-Core.package/DocumentReadStream.class/methodProperties.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "class" : { - "on:" : "kh 7/3/2020 19:29" }, - "instance" : { - "beginningOfStructure" : "OS 7/12/2020 18:48", - "currentCharacter" : "OS 7/12/2020 18:42", - "endOfDocument" : "kh 7/3/2020 20:05", - "endOfStructure" : "OS 7/12/2020 18:23", - "lineBreak" : "OS 7/12/2020 18:41", - "next" : "OS 7/12/2020 18:13", - "on:" : "kh 7/3/2020 19:30", - "paragraph" : "OS 7/12/2020 18:42", - "paragraphCharacter" : "frc 7/13/2020 13:29", - "readLimit" : "kh 7/3/2020 19:56", - "readLimit:" : "kh 7/3/2020 19:56", - "stopConditions" : "OS 7/4/2020 23:01", - "structureDifferenceBetween:and:" : "OS 7/12/2020 18:21", - "text" : "OS 7/12/2020 18:12", - "text:" : "OS 7/12/2020 18:12" } } diff --git a/packages/RichTextEditing-Core.package/FontChooserTool.extension/instance/selectedPointSizeIndex.st b/packages/RichTextEditing-Core.package/FontChooserTool.extension/instance/selectedPointSizeIndex.st index b81affc..ca3981c 100644 --- a/packages/RichTextEditing-Core.package/FontChooserTool.extension/instance/selectedPointSizeIndex.st +++ b/packages/RichTextEditing-Core.package/FontChooserTool.extension/instance/selectedPointSizeIndex.st @@ -1,3 +1,4 @@ *RichTextEditing-Core selectedPointSizeIndex - ^ self pointSizeList indexOf: (self pointSize reduce asString padded: #left to: 3 with: $ ) \ No newline at end of file + + ^ self pointSizeList indexOf: (self pointSize reduce asString padded: #left to: 3 with: $ ) \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/FontChooserTool.extension/methodProperties.json b/packages/RichTextEditing-Core.package/FontChooserTool.extension/methodProperties.json index ce37707..49ade0e 100644 --- a/packages/RichTextEditing-Core.package/FontChooserTool.extension/methodProperties.json +++ b/packages/RichTextEditing-Core.package/FontChooserTool.extension/methodProperties.json @@ -2,4 +2,4 @@ "class" : { }, "instance" : { - "selectedPointSizeIndex" : "lh 6/26/2019 18:30" } } + "selectedPointSizeIndex" : "frc 7/29/2020 09:11" } } diff --git a/packages/RichTextEditing-Core.package/RichTextDefaultTemplate.class/class/clearCachedDictionaries.st b/packages/RichTextEditing-Core.package/RichTextDefaultTemplate.class/class/clearCachedDictionaries.st new file mode 100644 index 0000000..0039442 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextDefaultTemplate.class/class/clearCachedDictionaries.st @@ -0,0 +1,4 @@ +resetting +clearCachedDictionaries + + textStructures := nil \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextDefaultTemplate.class/class/initialBoldStructure.st b/packages/RichTextEditing-Core.package/RichTextDefaultTemplate.class/class/initialBoldStructure.st index 9fbf94b..57b5140 100644 --- a/packages/RichTextEditing-Core.package/RichTextDefaultTemplate.class/class/initialBoldStructure.st +++ b/packages/RichTextEditing-Core.package/RichTextDefaultTemplate.class/class/initialBoldStructure.st @@ -1,6 +1,6 @@ initial structures initialBoldStructure - ^ TextStructure + ^ RichTextStructure new: #bold - from: {TextStructure bold} \ No newline at end of file + from: {RichTextStructure bold} \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextDefaultTemplate.class/class/initialFootnoteStructure.st b/packages/RichTextEditing-Core.package/RichTextDefaultTemplate.class/class/initialFootnoteStructure.st index 6ee23a8..cc86026 100644 --- a/packages/RichTextEditing-Core.package/RichTextDefaultTemplate.class/class/initialFootnoteStructure.st +++ b/packages/RichTextEditing-Core.package/RichTextDefaultTemplate.class/class/initialFootnoteStructure.st @@ -1,6 +1,6 @@ initial structures initialFootnoteStructure - ^ TextStructure + ^ RichTextStructure new: #footnote - from: {TextStructure fromFont: (StrikeFont createDejaVuDark: 9)} \ No newline at end of file + from: {RichTextStructure fromFont: (StrikeFont createDejaVuDark: 9)} \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextDefaultTemplate.class/class/initialHeading1Structure.st b/packages/RichTextEditing-Core.package/RichTextDefaultTemplate.class/class/initialHeading1Structure.st index b8b2bbb..91abdf1 100644 --- a/packages/RichTextEditing-Core.package/RichTextDefaultTemplate.class/class/initialHeading1Structure.st +++ b/packages/RichTextEditing-Core.package/RichTextDefaultTemplate.class/class/initialHeading1Structure.st @@ -1,6 +1,7 @@ initial structures initialHeading1Structure - ^ TextStructure + ^ RichTextStructure new: #heading1 - from: {TextStructure fromFont: (StrikeFont createDejaVuDark: 20). TextStructure bold} \ No newline at end of file + from: {RichTextStructure fromFont: (StrikeFont createDejaVuDark: 20). + RichTextStructure bold} \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextDefaultTemplate.class/class/initialHeading2Structure.st b/packages/RichTextEditing-Core.package/RichTextDefaultTemplate.class/class/initialHeading2Structure.st index 0cd5f1d..6e9ab13 100644 --- a/packages/RichTextEditing-Core.package/RichTextDefaultTemplate.class/class/initialHeading2Structure.st +++ b/packages/RichTextEditing-Core.package/RichTextDefaultTemplate.class/class/initialHeading2Structure.st @@ -1,6 +1,7 @@ initial structures initialHeading2Structure - ^ TextStructure + ^ RichTextStructure new: #heading2 - from: {TextStructure fromFont: (StrikeFont createDejaVuDark: 17). TextStructure bold} \ No newline at end of file + from: {RichTextStructure fromFont: (StrikeFont createDejaVuDark: 17). + RichTextStructure bold} \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextDefaultTemplate.class/class/initialHeading3Structure.st b/packages/RichTextEditing-Core.package/RichTextDefaultTemplate.class/class/initialHeading3Structure.st index 7884cdb..6b05c78 100644 --- a/packages/RichTextEditing-Core.package/RichTextDefaultTemplate.class/class/initialHeading3Structure.st +++ b/packages/RichTextEditing-Core.package/RichTextDefaultTemplate.class/class/initialHeading3Structure.st @@ -1,6 +1,7 @@ initial structures initialHeading3Structure - ^ TextStructure + ^ RichTextStructure new: #heading3 - from: {TextStructure fromFont: (StrikeFont createDejaVuDark: 14). TextStructure bold} \ No newline at end of file + from: {RichTextStructure fromFont: (StrikeFont createDejaVuDark: 14). + RichTextStructure bold} \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextDefaultTemplate.class/class/initialItalicStructure.st b/packages/RichTextEditing-Core.package/RichTextDefaultTemplate.class/class/initialItalicStructure.st index d774a22..40debce 100644 --- a/packages/RichTextEditing-Core.package/RichTextDefaultTemplate.class/class/initialItalicStructure.st +++ b/packages/RichTextEditing-Core.package/RichTextDefaultTemplate.class/class/initialItalicStructure.st @@ -1,6 +1,6 @@ initial structures initialItalicStructure - ^ TextStructure + ^ RichTextStructure new: #italic - from: {TextStructure italic} \ No newline at end of file + from: {RichTextStructure italic} \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextDefaultTemplate.class/class/initialListStructure.st b/packages/RichTextEditing-Core.package/RichTextDefaultTemplate.class/class/initialListStructure.st index d69de8b..58e0066 100644 --- a/packages/RichTextEditing-Core.package/RichTextDefaultTemplate.class/class/initialListStructure.st +++ b/packages/RichTextEditing-Core.package/RichTextDefaultTemplate.class/class/initialListStructure.st @@ -1,6 +1,6 @@ initial structures initialListStructure - ^ TextStructure + ^ RichTextStructure new: #list - from: {TextStructure indented} \ No newline at end of file + from: {RichTextStructure indented} \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextDefaultTemplate.class/class/initialURLStructure.st b/packages/RichTextEditing-Core.package/RichTextDefaultTemplate.class/class/initialURLStructure.st index 99ec8ff..1da80e9 100644 --- a/packages/RichTextEditing-Core.package/RichTextDefaultTemplate.class/class/initialURLStructure.st +++ b/packages/RichTextEditing-Core.package/RichTextDefaultTemplate.class/class/initialURLStructure.st @@ -1,6 +1,8 @@ initial structures initialURLStructure - ^ TextStructure + ^ RichTextStructure new: #url - from: {TextStructure autohyperlink. TextStructure underlined. TextStructure notExtendable} \ No newline at end of file + from: {RichTextStructure autohyperlink. + RichTextStructure underlined. + RichTextStructure notExtendable} \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextDefaultTemplate.class/class/initialUnderlinedStructure.st b/packages/RichTextEditing-Core.package/RichTextDefaultTemplate.class/class/initialUnderlinedStructure.st index 789b1be..899250b 100644 --- a/packages/RichTextEditing-Core.package/RichTextDefaultTemplate.class/class/initialUnderlinedStructure.st +++ b/packages/RichTextEditing-Core.package/RichTextDefaultTemplate.class/class/initialUnderlinedStructure.st @@ -1,6 +1,6 @@ initial structures initialUnderlinedStructure - ^ TextStructure + ^ RichTextStructure new: #underlined - from: {TextStructure underlined} \ No newline at end of file + from: {RichTextStructure underlined} \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextDefaultTemplate.class/class/textStructures.st b/packages/RichTextEditing-Core.package/RichTextDefaultTemplate.class/class/textStructures.st new file mode 100644 index 0000000..49a7a05 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextDefaultTemplate.class/class/textStructures.st @@ -0,0 +1,5 @@ +text structures +textStructures + + textStructures ifNil: [textStructures := self initialTextStructures]. + ^ textStructures \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextDefaultTemplate.class/methodProperties.json b/packages/RichTextEditing-Core.package/RichTextDefaultTemplate.class/methodProperties.json index 55b5a04..1c934bf 100644 --- a/packages/RichTextEditing-Core.package/RichTextDefaultTemplate.class/methodProperties.json +++ b/packages/RichTextEditing-Core.package/RichTextDefaultTemplate.class/methodProperties.json @@ -1,15 +1,17 @@ { "class" : { + "clearCachedDictionaries" : "JEH 7/25/2020 18:50", "identifier" : "JEH 7/4/2020 11:17", - "initialBoldStructure" : "JEH 7/4/2020 11:15", - "initialFootnoteStructure" : "JEH 7/4/2020 11:15", - "initialHeading1Structure" : "JEH 7/4/2020 11:15", - "initialHeading2Structure" : "JEH 7/4/2020 11:15", - "initialHeading3Structure" : "JEH 7/4/2020 11:15", - "initialItalicStructure" : "JEH 7/4/2020 11:16", - "initialListStructure" : "JEH 7/4/2020 11:16", + "initialBoldStructure" : "tok 8/7/2020 15:50", + "initialFootnoteStructure" : "tok 8/7/2020 15:50", + "initialHeading1Structure" : "tok 8/7/2020 20:57", + "initialHeading2Structure" : "tok 8/7/2020 20:57", + "initialHeading3Structure" : "tok 8/7/2020 20:57", + "initialItalicStructure" : "tok 8/7/2020 15:51", + "initialListStructure" : "tok 8/7/2020 15:51", "initialTextStructures" : "JEH 7/4/2020 11:16", - "initialURLStructure" : "JEH 7/4/2020 11:16", - "initialUnderlinedStructure" : "JEH 7/4/2020 11:16" }, + "initialURLStructure" : "tok 8/7/2020 20:57", + "initialUnderlinedStructure" : "tok 8/7/2020 15:51", + "textStructures" : "frc 7/15/2020 18:31" }, "instance" : { } } diff --git a/packages/RichTextEditing-Core.package/RichTextDocument.class/README.md b/packages/RichTextEditing-Core.package/RichTextDocument.class/README.md index c8f0f8e..8703378 100644 --- a/packages/RichTextEditing-Core.package/RichTextDocument.class/README.md +++ b/packages/RichTextEditing-Core.package/RichTextDocument.class/README.md @@ -8,5 +8,5 @@ My instance variables are: name - aString text - aText textStructures - anOrderedCollection -timeLastSaved - aDateAndTime +timestampLastSaved - aDateAndTime diff --git a/packages/RichTextEditing-Core.package/RichTextDocument.class/class/hasStructure.for.from.to..st b/packages/RichTextEditing-Core.package/RichTextDocument.class/class/hasStructure.for.from.to..st new file mode 100644 index 0000000..b202d3c --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextDocument.class/class/hasStructure.for.from.to..st @@ -0,0 +1,10 @@ +utilities +hasStructure: aSymbol for: aText from: start to: end + + aText isEmpty + ifTrue: [^ false]. + + ^ (aText runs copyFrom: start to: end) allSatisfy: [:attributes | + attributes anySatisfy: [:attribute | + attribute isTextStructure ifTrue: [ + attribute structureIdentifier = aSymbol] ifFalse: [false]]] \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/^equals.st b/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/^equals.st new file mode 100644 index 0000000..37dc066 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/^equals.st @@ -0,0 +1,7 @@ +comparing += aRichTextDocument + + ^ (self textStructures = aRichTextDocument textStructures) + and: [self text = aRichTextDocument text] + and: [self name = aRichTextDocument name] + and: [self timeLastSaved = aRichTextDocument timeLastSaved] \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/asByteArray.st b/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/asByteArray.st new file mode 100644 index 0000000..6f6b52d --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/asByteArray.st @@ -0,0 +1,4 @@ +converting +asByteArray + + ^ self asString asByteArray \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/asString.st b/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/asString.st new file mode 100644 index 0000000..b847f90 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/asString.st @@ -0,0 +1,4 @@ +converting +asString + + ^ self text string \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/charcountExcept..st b/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/charcountExcept..st index f000bbb..9e8dec1 100644 --- a/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/charcountExcept..st +++ b/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/charcountExcept..st @@ -2,6 +2,6 @@ count charcountExcept: aListOfBytecodes | byteString | - byteString := self text string asByteArray. + byteString := self asByteArray. ^ byteString count: [:each | (aListOfBytecodes includes: each) not] diff --git a/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/clearTextRuns.st b/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/clearTextRuns.st deleted file mode 100644 index d2921ba..0000000 --- a/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/clearTextRuns.st +++ /dev/null @@ -1,5 +0,0 @@ -text structures -clearTextRuns - - self text runs: (RunArray new add: {} withOccurrences: self text size). - self textChanged \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/copy..st b/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/copy..st index 3ef0c7b..873c848 100644 --- a/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/copy..st +++ b/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/copy..st @@ -3,7 +3,7 @@ copy: aRichTextDocument self name: aRichTextDocument name copy; - timeLastSaved: aRichTextDocument timeLastSaved; + timestampLastSaved: aRichTextDocument timestampLastSaved; text: aRichTextDocument text copy; textStructures: aRichTextDocument textStructures copy; changed \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/dateLastSaved.st b/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/dateLastSaved.st new file mode 100644 index 0000000..d3e520b --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/dateLastSaved.st @@ -0,0 +1,4 @@ +accessing +dateLastSaved + + ^ self timestampLastSaved first \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/hasStructure.forText.from.to..st b/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/hasStructure.forText.from.to..st deleted file mode 100644 index 93e9134..0000000 --- a/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/hasStructure.forText.from.to..st +++ /dev/null @@ -1,10 +0,0 @@ -text structures -hasStructure: aSymbol forText: aText from: start to: end - - aText isEmpty - ifTrue: [^ false]. - - ^ (aText runs copyFrom: start to: end) allSatisfy: - [:attributes | attributes anySatisfy: - [:attribute | attribute isTextStructure ifTrue: [ - attribute structureIdentifier = aSymbol] ifFalse: [false]]] \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/hash.st b/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/hash.st new file mode 100644 index 0000000..49abd13 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/hash.st @@ -0,0 +1,7 @@ +comparing +hash + + ^ (((self textStructures hash) + bitXor: (self text hash)) + bitXor: (self name hash)) + bitXor: (self timeLastSaved hash) \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/initializeStructure..st b/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/initializeStructure..st index f02662c..73558f1 100644 --- a/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/initializeStructure..st +++ b/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/initializeStructure..st @@ -1,4 +1,4 @@ text structures initializeStructure: aSymbol - self textStructures add: (TextStructure new: aSymbol from: self class commonStructures) \ No newline at end of file + self textStructures add: (RichTextStructure new: aSymbol from: self class commonStructures) \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/isUnsavedDocument.st b/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/isUnsavedDocument.st index 8dd336c..001007d 100644 --- a/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/isUnsavedDocument.st +++ b/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/isUnsavedDocument.st @@ -1,4 +1,4 @@ accessing isUnsavedDocument - ^ self timeLastSaved = nil \ No newline at end of file + ^ self timestampLastSaved isNil \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/openInEditor.st b/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/openInEditor.st index 48ebb36..4f6d4bb 100644 --- a/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/openInEditor.st +++ b/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/openInEditor.st @@ -1,4 +1,4 @@ initialize-release openInEditor - ^ self class editorClass openWith: self \ No newline at end of file + ^ self class editorClass open: self \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/removeStructure..st b/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/removeStructure..st index c8c61b9..619e4d2 100644 --- a/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/removeStructure..st +++ b/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/removeStructure..st @@ -4,4 +4,5 @@ removeStructure: aSymbol self textStructures remove: (self textStructureAt: aSymbol). self textChanged; - structuresChanged \ No newline at end of file + structuresChanged; + yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/setNewTemplate..st b/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/setNewTemplate..st index 3dccea7..574cbd9 100644 --- a/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/setNewTemplate..st +++ b/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/setNewTemplate..st @@ -1,5 +1,4 @@ text structures setNewTemplate: aRichTextTemplateClass - self setTemplateStructures: aRichTextTemplateClass. - self clearTextRuns \ No newline at end of file + aRichTextTemplateClass applyOn: self \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/setTemplateStructures..st b/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/setTemplateStructures..st deleted file mode 100644 index 2d98c91..0000000 --- a/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/setTemplateStructures..st +++ /dev/null @@ -1,5 +0,0 @@ -text structures -setTemplateStructures: aRichTextTemplateClass - - self textStructures: aRichTextTemplateClass initialTextStructures. - self structuresChanged \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/setTemplateStructures.st b/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/setTemplateStructures.st new file mode 100644 index 0000000..e8eb4b0 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/setTemplateStructures.st @@ -0,0 +1,4 @@ +text structures +setTemplateStructures + + self structuresChanged \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/sortRunsByPriority.st b/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/sortRunsByPriority.st index 443d5fc..c710853 100644 --- a/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/sortRunsByPriority.st +++ b/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/sortRunsByPriority.st @@ -6,5 +6,6 @@ sortRunsByPriority structureCopy := attributes copy select: [:attribute | attribute isTextStructure]. noStructureCopy := attributes copy reject: [:attribute | attribute isTextStructure]. structureCopy := structureCopy sorted: [:a :b | - (self textStructureSymbols indexOf: a structureIdentifier) > (self textStructureSymbols indexOf: b structureIdentifier)]. + (self textStructureSymbols indexOf: a structureIdentifier) > + (self textStructureSymbols indexOf: b structureIdentifier)]. attributes := noStructureCopy, structureCopy]) \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/textRuns..st b/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/textRuns..st new file mode 100644 index 0000000..543869c --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/textRuns..st @@ -0,0 +1,4 @@ +accessing +textRuns: aRunArray + + self text runs: aRunArray \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/textStructureAt..st b/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/textStructureAt..st index bc2dbce..b7eab67 100644 --- a/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/textStructureAt..st +++ b/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/textStructureAt..st @@ -2,4 +2,4 @@ text structures textStructureAt: aSymbol ^ self textStructures detect: [:each | each structureIdentifier = aSymbol] - ifNone: [^ NullTextStructure new] \ No newline at end of file + ifNone: [^ RichTextNullStructure new] \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/textStructureSymbols.st b/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/textStructureSymbols.st index 11183ea..5b41bb0 100644 --- a/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/textStructureSymbols.st +++ b/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/textStructureSymbols.st @@ -1,5 +1,4 @@ text structures textStructureSymbols - ^ self textStructures collect: [:each | - each structureIdentifier] \ No newline at end of file + ^ self textStructures collect: [:each | each structureIdentifier] \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/timeLastSaved..st b/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/timeLastSaved..st deleted file mode 100644 index f0da91e..0000000 --- a/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/timeLastSaved..st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -timeLastSaved: aDateAndTime - - timeLastSaved := aDateAndTime \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/timeLastSaved.st b/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/timeLastSaved.st index dbe7461..ab8f2ab 100644 --- a/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/timeLastSaved.st +++ b/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/timeLastSaved.st @@ -1,4 +1,5 @@ accessing timeLastSaved - ^ timeLastSaved \ No newline at end of file + self timestampLastSaved ifNil: [^ nil]. + ^ self timestampLastSaved second \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/timestampLastSaved..st b/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/timestampLastSaved..st new file mode 100644 index 0000000..5286e4e --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/timestampLastSaved..st @@ -0,0 +1,4 @@ +accessing +timestampLastSaved: aDateAndTime + + timestampLastSaved := aDateAndTime \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/timestampLastSaved.st b/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/timestampLastSaved.st new file mode 100644 index 0000000..5bdd14f --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/timestampLastSaved.st @@ -0,0 +1,4 @@ +accessing +timestampLastSaved + + ^ timestampLastSaved \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/wordcount.st b/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/wordcount.st index 3a4d194..8f54a15 100644 --- a/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/wordcount.st +++ b/packages/RichTextEditing-Core.package/RichTextDocument.class/instance/wordcount.st @@ -1,7 +1,10 @@ count wordcount - | prev bool byteString| - byteString := self text string asByteArray. + | prev bool byteString | + byteString := self asByteArray. prev := self emptyChars first. - ^ (byteString count: [:each | bool := ((self emptyChars includes: each) not and: (self emptyChars includes: prev)). prev := each. bool ]) \ No newline at end of file + ^ (byteString count: [:each | + bool := ((self emptyChars includes: each) not and: [ + self emptyChars includes: prev]). + prev := each. bool]) diff --git a/packages/RichTextEditing-Core.package/RichTextDocument.class/methodProperties.json b/packages/RichTextEditing-Core.package/RichTextDocument.class/methodProperties.json index a2bf616..80b328d 100644 --- a/packages/RichTextEditing-Core.package/RichTextDocument.class/methodProperties.json +++ b/packages/RichTextEditing-Core.package/RichTextDocument.class/methodProperties.json @@ -3,39 +3,45 @@ "commonStructures" : "kh 6/21/2020 17:03", "editorClass" : "ls 6/26/2019 17:33", "fromText:withStructures:" : "ls 6/26/2019 17:31", + "hasStructure:for:from:to:" : "tok 8/7/2020 20:50", "initialTextStructures" : "JEH 7/4/2020 11:19" }, "instance" : { + "=" : "frc 8/6/2020 20:01", "addAttribute:from:to:" : "kh 6/19/2020 12:35", + "asByteArray" : "frc 8/7/2020 10:49", + "asString" : "frc 7/16/2020 13:46", "charcount" : "frc 5/25/2020 16:02", - "charcountExcept:" : "frc 6/13/2020 11:15", - "clearTextRuns" : "JEH 7/4/2020 11:48", - "copy:" : "MB 7/3/2019 18:58", + "charcountExcept:" : "frc 8/7/2020 12:41", + "copy:" : "tok 7/20/2020 14:10", "createNewStructure:" : "ls 7/24/2019 15:24", + "dateLastSaved" : "tok 7/20/2020 14:10", "emptyChars" : "frc 6/1/2020 13:43", - "hasStructure:forText:from:to:" : "AG 7/25/2019 13:20", + "hash" : "tok 8/7/2020 20:29", "initialize" : "ls 7/24/2019 15:10", - "initializeStructure:" : "kh 6/21/2020 17:03", + "initializeStructure:" : "tok 8/7/2020 15:51", "initializeStructures" : "ls 7/24/2019 15:12", - "isUnsavedDocument" : "OS 6/14/2020 18:19", + "isUnsavedDocument" : "tok 7/20/2020 14:10", "name" : "ls 6/26/2019 17:28", "name:" : "MB 7/3/2019 19:29", "openEditor" : "lh 7/24/2019 21:27", - "openInEditor" : "ls 7/24/2019 20:14", - "removeStructure:" : "kh 6/21/2020 10:03", + "openInEditor" : "kh 7/27/2020 12:26", + "removeStructure:" : "frc 8/7/2020 11:43", "removeTextAttribute:from:to:" : "MB 7/24/2019 20:40", - "setNewTemplate:" : "JEH 7/4/2020 12:11", - "setTemplateStructures:" : "JEH 7/4/2020 12:11", - "sortRunsByPriority" : "JEH 5/20/2020 10:28", + "setNewTemplate:" : "frc 8/7/2020 10:21", + "setTemplateStructures" : "frc 7/15/2020 15:49", + "sortRunsByPriority" : "frc 8/7/2020 12:04", "structuresChanged" : "ls 7/24/2019 14:46", "text" : "ls 6/26/2019 17:28", "text:" : "MB 7/3/2019 19:29", "textChanged" : "ls 7/24/2019 14:41", "textRuns" : "lh 7/24/2019 17:14", - "textStructureAt:" : "kh 6/19/2020 15:00", - "textStructureSymbols" : "ls 7/24/2019 14:25", + "textRuns:" : "tok 8/7/2020 20:30", + "textStructureAt:" : "tok 8/7/2020 15:53", + "textStructureSymbols" : "tok 8/7/2020 20:30", "textStructures" : "ls 6/26/2019 17:28", "textStructures:" : "MB 7/3/2019 19:29", "textStructuresDo:" : "ls 7/24/2019 21:29", - "timeLastSaved" : "OS 6/14/2020 11:16", - "timeLastSaved:" : "OS 6/15/2020 12:22", - "wordcount" : "frc 6/1/2020 13:46" } } + "timeLastSaved" : "frc 8/6/2020 20:07", + "timestampLastSaved" : "tok 7/20/2020 14:10", + "timestampLastSaved:" : "tok 7/20/2020 14:10", + "wordcount" : "tok 8/7/2020 20:31" } } diff --git a/packages/RichTextEditing-Core.package/RichTextDocument.class/properties.json b/packages/RichTextEditing-Core.package/RichTextDocument.class/properties.json index 7c729be..d1679e3 100644 --- a/packages/RichTextEditing-Core.package/RichTextDocument.class/properties.json +++ b/packages/RichTextEditing-Core.package/RichTextDocument.class/properties.json @@ -4,12 +4,12 @@ ], "classvars" : [ ], - "commentStamp" : "kh 6/19/2020 00:40", + "commentStamp" : "JEH 8/7/2020 16:59", "instvars" : [ "textStructures", "text", "name", - "timeLastSaved" ], + "timestampLastSaved" ], "name" : "RichTextDocument", "pools" : [ ], diff --git a/packages/RichTextEditing-Core.package/RichTextDocumentReadStream.class/README.md b/packages/RichTextEditing-Core.package/RichTextDocumentReadStream.class/README.md new file mode 100644 index 0000000..4f3edbc --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextDocumentReadStream.class/README.md @@ -0,0 +1,8 @@ +I am a stream on a RichTextDocument for accessing sections of text. The end of a section is determined by the following stop conditions: + - end of document + - end of one or more structures + - end of paragraph + - new line + - begin of one or more structures + +Calling next returns such a section as an array containing the text and an array of stop conditions that caused the end of a section. The stop condition array consists of tupels containing a stop condition identifier and optional additional information (e.g. {{#endOfStructure. {#italic}}. {#paragraph}}). \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/DocumentReadStream.class/class/on..st b/packages/RichTextEditing-Core.package/RichTextDocumentReadStream.class/class/on..st similarity index 100% rename from packages/RichTextEditing-Core.package/DocumentReadStream.class/class/on..st rename to packages/RichTextEditing-Core.package/RichTextDocumentReadStream.class/class/on..st diff --git a/packages/RichTextEditing-Core.package/DocumentReadStream.class/instance/beginningOfStructure.st b/packages/RichTextEditing-Core.package/RichTextDocumentReadStream.class/instance/beginOfStructure.st similarity index 69% rename from packages/RichTextEditing-Core.package/DocumentReadStream.class/instance/beginningOfStructure.st rename to packages/RichTextEditing-Core.package/RichTextDocumentReadStream.class/instance/beginOfStructure.st index 8e49a3d..51ecd47 100644 --- a/packages/RichTextEditing-Core.package/DocumentReadStream.class/instance/beginningOfStructure.st +++ b/packages/RichTextEditing-Core.package/RichTextDocumentReadStream.class/instance/beginOfStructure.st @@ -1,9 +1,9 @@ stop conditions -beginningOfStructure - | diff | +beginOfStructure + | diff | self position + 1 > self readLimit ifTrue: [^ nil]. diff := self structureDifferenceBetween: self position + 1 and: self position. ^ diff isEmpty ifTrue: [nil] - ifFalse: [{#beginningOfStructure. diff}] \ No newline at end of file + ifFalse: [{#beginOfStructure. diff asSet asOrderedCollection}] \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextDocumentReadStream.class/instance/currentCharacter.st b/packages/RichTextEditing-Core.package/RichTextDocumentReadStream.class/instance/currentCharacter.st new file mode 100644 index 0000000..ef736ee --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextDocumentReadStream.class/instance/currentCharacter.st @@ -0,0 +1,6 @@ +accessing +currentCharacter + + ^ (self position = 0) + ifTrue: [''] + ifFalse: [self text at: self position] \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/DocumentReadStream.class/instance/endOfDocument.st b/packages/RichTextEditing-Core.package/RichTextDocumentReadStream.class/instance/endOfDocument.st similarity index 74% rename from packages/RichTextEditing-Core.package/DocumentReadStream.class/instance/endOfDocument.st rename to packages/RichTextEditing-Core.package/RichTextDocumentReadStream.class/instance/endOfDocument.st index 23c6326..d2cbc12 100644 --- a/packages/RichTextEditing-Core.package/DocumentReadStream.class/instance/endOfDocument.st +++ b/packages/RichTextEditing-Core.package/RichTextDocumentReadStream.class/instance/endOfDocument.st @@ -2,5 +2,5 @@ stop conditions endOfDocument ^ (self position >= self readLimit) - ifTrue: [#endOfDocument] + ifTrue: [{#endOfDocument}] ifFalse: [nil] \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/DocumentReadStream.class/instance/endOfStructure.st b/packages/RichTextEditing-Core.package/RichTextDocumentReadStream.class/instance/endOfStructure.st similarity index 76% rename from packages/RichTextEditing-Core.package/DocumentReadStream.class/instance/endOfStructure.st rename to packages/RichTextEditing-Core.package/RichTextDocumentReadStream.class/instance/endOfStructure.st index 979c947..c2cf965 100644 --- a/packages/RichTextEditing-Core.package/DocumentReadStream.class/instance/endOfStructure.st +++ b/packages/RichTextEditing-Core.package/RichTextDocumentReadStream.class/instance/endOfStructure.st @@ -1,9 +1,9 @@ stop conditions endOfStructure + | diff | - self position + 1 > self readLimit ifTrue: [^ nil]. diff := self structureDifferenceBetween: self position and: self position + 1. ^ diff isEmpty ifTrue: [nil] - ifFalse: [{#endOfStructure. diff}] \ No newline at end of file + ifFalse: [{#endOfStructure. diff asSet asOrderedCollection}] \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/DocumentReadStream.class/instance/lineBreak.st b/packages/RichTextEditing-Core.package/RichTextDocumentReadStream.class/instance/lineBreak.st similarity index 77% rename from packages/RichTextEditing-Core.package/DocumentReadStream.class/instance/lineBreak.st rename to packages/RichTextEditing-Core.package/RichTextDocumentReadStream.class/instance/lineBreak.st index f850ed7..b4c7de3 100644 --- a/packages/RichTextEditing-Core.package/DocumentReadStream.class/instance/lineBreak.st +++ b/packages/RichTextEditing-Core.package/RichTextDocumentReadStream.class/instance/lineBreak.st @@ -2,5 +2,5 @@ stop conditions lineBreak ^ self currentCharacter = Character lf - ifTrue: [#lineFeed] + ifTrue: [{#lineFeed}] ifFalse: [nil] \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/DocumentReadStream.class/instance/next.st b/packages/RichTextEditing-Core.package/RichTextDocumentReadStream.class/instance/next.st similarity index 100% rename from packages/RichTextEditing-Core.package/DocumentReadStream.class/instance/next.st rename to packages/RichTextEditing-Core.package/RichTextDocumentReadStream.class/instance/next.st diff --git a/packages/RichTextEditing-Core.package/DocumentReadStream.class/instance/on..st b/packages/RichTextEditing-Core.package/RichTextDocumentReadStream.class/instance/on..st similarity index 100% rename from packages/RichTextEditing-Core.package/DocumentReadStream.class/instance/on..st rename to packages/RichTextEditing-Core.package/RichTextDocumentReadStream.class/instance/on..st diff --git a/packages/RichTextEditing-Core.package/RichTextDocumentReadStream.class/instance/paragraph.st b/packages/RichTextEditing-Core.package/RichTextDocumentReadStream.class/instance/paragraph.st new file mode 100644 index 0000000..a630fd2 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextDocumentReadStream.class/instance/paragraph.st @@ -0,0 +1,6 @@ +stop conditions +paragraph + + ^ self currentCharacter = RichTextEditor paragraphCharacter + ifTrue: [{#paragraph}] + ifFalse: [nil] \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/DocumentReadStream.class/instance/readLimit.st b/packages/RichTextEditing-Core.package/RichTextDocumentReadStream.class/instance/readLimit.st similarity index 100% rename from packages/RichTextEditing-Core.package/DocumentReadStream.class/instance/readLimit.st rename to packages/RichTextEditing-Core.package/RichTextDocumentReadStream.class/instance/readLimit.st diff --git a/packages/RichTextEditing-Core.package/RichTextDocumentReadStream.class/instance/reset.st b/packages/RichTextEditing-Core.package/RichTextDocumentReadStream.class/instance/reset.st new file mode 100644 index 0000000..811371a --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextDocumentReadStream.class/instance/reset.st @@ -0,0 +1,5 @@ +initialize +reset + + "Set position to -1 so that first call to next will target beginning of text" + position := -1 \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/DocumentReadStream.class/instance/stopConditions.st b/packages/RichTextEditing-Core.package/RichTextDocumentReadStream.class/instance/stopConditions.st similarity index 83% rename from packages/RichTextEditing-Core.package/DocumentReadStream.class/instance/stopConditions.st rename to packages/RichTextEditing-Core.package/RichTextDocumentReadStream.class/instance/stopConditions.st index 66fa6e3..3a0626e 100644 --- a/packages/RichTextEditing-Core.package/DocumentReadStream.class/instance/stopConditions.st +++ b/packages/RichTextEditing-Core.package/RichTextDocumentReadStream.class/instance/stopConditions.st @@ -5,5 +5,5 @@ stopConditions self endOfStructure. self paragraph. self lineBreak. - self beginningOfStructure + self beginOfStructure } reject: [:each | each isNil] \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextDocumentReadStream.class/instance/structureDifferenceBetween.and..st b/packages/RichTextEditing-Core.package/RichTextDocumentReadStream.class/instance/structureDifferenceBetween.and..st new file mode 100644 index 0000000..ac7a36b --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextDocumentReadStream.class/instance/structureDifferenceBetween.and..st @@ -0,0 +1,4 @@ +stop conditions +structureDifferenceBetween: firstPosition and: secondPosition + + ^ (self textAttributesAt: firstPosition) difference: (self textAttributesAt: secondPosition) \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/DocumentReadStream.class/instance/text.st b/packages/RichTextEditing-Core.package/RichTextDocumentReadStream.class/instance/text.st similarity index 100% rename from packages/RichTextEditing-Core.package/DocumentReadStream.class/instance/text.st rename to packages/RichTextEditing-Core.package/RichTextDocumentReadStream.class/instance/text.st diff --git a/packages/RichTextEditing-Core.package/RichTextDocumentReadStream.class/instance/textAttributesAt..st b/packages/RichTextEditing-Core.package/RichTextDocumentReadStream.class/instance/textAttributesAt..st new file mode 100644 index 0000000..8f313c6 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextDocumentReadStream.class/instance/textAttributesAt..st @@ -0,0 +1,6 @@ +accessing +textAttributesAt: aPosition + + ^ (aPosition = 0) + ifTrue: [{}] + ifFalse: [self text attributesAt: aPosition] \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextDocumentReadStream.class/methodProperties.json b/packages/RichTextEditing-Core.package/RichTextDocumentReadStream.class/methodProperties.json new file mode 100644 index 0000000..753c565 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextDocumentReadStream.class/methodProperties.json @@ -0,0 +1,18 @@ +{ + "class" : { + "on:" : "kh 7/3/2020 19:29" }, + "instance" : { + "beginOfStructure" : "tok 8/7/2020 20:32", + "currentCharacter" : "JEH 7/25/2020 12:51", + "endOfDocument" : "JEH 7/26/2020 17:14", + "endOfStructure" : "frc 8/1/2020 13:17", + "lineBreak" : "JEH 7/25/2020 12:54", + "next" : "JEH 7/25/2020 12:39", + "on:" : "frc 8/1/2020 10:51", + "paragraph" : "OS 8/7/2020 09:49", + "readLimit" : "kh 7/3/2020 19:56", + "reset" : "JEH 7/25/2020 12:47", + "stopConditions" : "OS 8/7/2020 09:58", + "structureDifferenceBetween:and:" : "JEH 7/25/2020 12:40", + "text" : "OS 7/12/2020 18:12", + "textAttributesAt:" : "JEH 7/25/2020 12:40" } } diff --git a/packages/RichTextEditing-Core.package/DocumentReadStream.class/properties.json b/packages/RichTextEditing-Core.package/RichTextDocumentReadStream.class/properties.json similarity index 69% rename from packages/RichTextEditing-Core.package/DocumentReadStream.class/properties.json rename to packages/RichTextEditing-Core.package/RichTextDocumentReadStream.class/properties.json index 219d5a6..04fdc70 100644 --- a/packages/RichTextEditing-Core.package/DocumentReadStream.class/properties.json +++ b/packages/RichTextEditing-Core.package/RichTextDocumentReadStream.class/properties.json @@ -4,10 +4,10 @@ ], "classvars" : [ ], - "commentStamp" : "", + "commentStamp" : "OS 8/6/2020 19:24", "instvars" : [ ], - "name" : "DocumentReadStream", + "name" : "RichTextDocumentReadStream", "pools" : [ ], "super" : "ReadStream", diff --git a/packages/RichTextEditing-Core.package/RichTextEditor.class/class/initializeShiftCmdKeyShortcuts.st b/packages/RichTextEditing-Core.package/RichTextEditor.class/class/initializeShiftCmdKeyShortcuts.st index 562f86e..205d9c3 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditor.class/class/initializeShiftCmdKeyShortcuts.st +++ b/packages/RichTextEditing-Core.package/RichTextEditor.class/class/initializeShiftCmdKeyShortcuts.st @@ -2,7 +2,7 @@ instance creation initializeShiftCmdKeyShortcuts super initializeShiftCmdKeyShortcuts. - self structureKeymap do: - [:char | shiftCmdActions at: char asciiValue + 1 put: #toggleStructureSelectionAt: ] + self structureKeymap do: [:char | + shiftCmdActions at: char asciiValue + 1 put: #toggleStructureSelectionAt:] diff --git a/packages/RichTextEditing-Core.package/RichTextEditor.class/instance/isCtrlA..st b/packages/RichTextEditing-Core.package/RichTextEditor.class/class/isCtrlA..st similarity index 76% rename from packages/RichTextEditing-Core.package/RichTextEditor.class/instance/isCtrlA..st rename to packages/RichTextEditing-Core.package/RichTextEditor.class/class/isCtrlA..st index d418806..2e8bb0c 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditor.class/instance/isCtrlA..st +++ b/packages/RichTextEditing-Core.package/RichTextEditor.class/class/isCtrlA..st @@ -1,5 +1,4 @@ -input events +utilities isCtrlA: aKeyboardEvent - ^ aKeyboardEvent buttons = 64 and: [aKeyboardEvent keyValue = $a asciiValue] - \ No newline at end of file + ^ aKeyboardEvent buttons = 64 and: [aKeyboardEvent keyValue = $a asciiValue] \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditor.class/class/makeTextURLFrom..st b/packages/RichTextEditing-Core.package/RichTextEditor.class/class/makeTextURLFrom..st new file mode 100644 index 0000000..81b12d5 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextEditor.class/class/makeTextURLFrom..st @@ -0,0 +1,7 @@ +utilities +makeTextURLFrom: aString + + ^ aString asText + addAttribute: (RichTextStructure hyperlinkTo: aString); + addAttribute: (TextEmphasis underlined); + yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/DocumentReadStream.class/instance/paragraphCharacter.st b/packages/RichTextEditing-Core.package/RichTextEditor.class/class/paragraphCharacter.st similarity index 55% rename from packages/RichTextEditing-Core.package/DocumentReadStream.class/instance/paragraphCharacter.st rename to packages/RichTextEditing-Core.package/RichTextEditor.class/class/paragraphCharacter.st index e2f7de3..7ab6395 100644 --- a/packages/RichTextEditing-Core.package/DocumentReadStream.class/instance/paragraphCharacter.st +++ b/packages/RichTextEditing-Core.package/RichTextEditor.class/class/paragraphCharacter.st @@ -1,4 +1,4 @@ constants paragraphCharacter - ^ Character value: 182 \ No newline at end of file + ^ Character value: 182 diff --git a/packages/RichTextEditing-Core.package/RichTextEditor.class/class/structureKeymap..st b/packages/RichTextEditing-Core.package/RichTextEditor.class/class/structureKeymap..st new file mode 100644 index 0000000..5b85078 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextEditor.class/class/structureKeymap..st @@ -0,0 +1,4 @@ +accessing +structureKeymap: aString + + structureKeymap := aString \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditor.class/class/structureKeymap.st b/packages/RichTextEditing-Core.package/RichTextEditor.class/class/structureKeymap.st index 98f1466..b20b7ba 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditor.class/class/structureKeymap.st +++ b/packages/RichTextEditing-Core.package/RichTextEditor.class/class/structureKeymap.st @@ -1,4 +1,8 @@ -instance creation +accessing structureKeymap - "adjust this to your keyboard layout" - ^ '!@#$%^&*()' + + + ^ structureKeymap ifNil: ['!@#$%^&*()'] diff --git a/packages/RichTextEditing-Core.package/RichTextEditor.class/instance/URLRegex.st b/packages/RichTextEditing-Core.package/RichTextEditor.class/instance/URLRegex.st index 8e2ee82..21f57e6 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditor.class/instance/URLRegex.st +++ b/packages/RichTextEditing-Core.package/RichTextEditor.class/instance/URLRegex.st @@ -1,4 +1,5 @@ constants URLRegex - ^ RxMatcher forString: '^https?\:\/\/([0-9a-zA-Z\-]+\.)*[0-9a-zA-Z]+(\/[0-9a-zA-Z\-\.\?\&\=\%]+)*$' \ No newline at end of file + ^ RxMatcher forString: + '^https?\:\/\/([0-9a-zA-Z\-]+\.)*[0-9a-zA-Z]+(\/[0-9a-zA-Z\-\.\?\&\=\%]+)*$' \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditor.class/instance/crWithIndent..st b/packages/RichTextEditing-Core.package/RichTextEditor.class/instance/crWithIndent..st index 897798c..198d61e 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditor.class/instance/crWithIndent..st +++ b/packages/RichTextEditing-Core.package/RichTextEditor.class/instance/crWithIndent..st @@ -1,5 +1,5 @@ input events crWithIndent: aKeyboardEvent - self addString: self getParagraphCharacter asString. + self addString: RichTextEditor paragraphCharacter asString. ^ false \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditor.class/instance/getParagraphCharacter.st b/packages/RichTextEditing-Core.package/RichTextEditor.class/instance/getParagraphCharacter.st deleted file mode 100644 index b895618..0000000 --- a/packages/RichTextEditing-Core.package/RichTextEditor.class/instance/getParagraphCharacter.st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -getParagraphCharacter - - ^ Character value: 182 \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditor.class/instance/initialize.st b/packages/RichTextEditing-Core.package/RichTextEditor.class/instance/initialize.st new file mode 100644 index 0000000..97d5356 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextEditor.class/instance/initialize.st @@ -0,0 +1,7 @@ +initialize-release +initialize + + super initialize. + + "Neccesary to have changes in the template default structures take action" + RichTextStructureTemplate clearAllTemplatesCachedDictionaries \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditor.class/instance/isStructureShortcut..st b/packages/RichTextEditing-Core.package/RichTextEditor.class/instance/isStructureShortcut..st index 81f2059..76241f6 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditor.class/instance/isStructureShortcut..st +++ b/packages/RichTextEditing-Core.package/RichTextEditor.class/instance/isStructureShortcut..st @@ -1,6 +1,6 @@ input events isStructureShortcut: aKeyboardEvent - ^aKeyboardEvent controlKeyPressed and: [ - aKeyboardEvent shiftPressed] and: [ - self class structureKeymap includes: aKeyboardEvent keyCharacter] \ No newline at end of file + ^ aKeyboardEvent controlKeyPressed and: [ + aKeyboardEvent shiftPressed] and: [ + self class structureKeymap includes: aKeyboardEvent keyCharacter] \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditor.class/instance/keyStroke..st b/packages/RichTextEditing-Core.package/RichTextEditor.class/instance/keyStroke..st index 7d02140..23b65ea 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditor.class/instance/keyStroke..st +++ b/packages/RichTextEditing-Core.package/RichTextEditor.class/instance/keyStroke..st @@ -3,12 +3,9 @@ keyStroke: aKeyboardEvent | returnValue | returnValue := super keyStroke: aKeyboardEvent. - (self isNewCharacter: aKeyboardEvent) - ifTrue: [self model applyCurrentStructures]. - (self isStructureShortcut: aKeyboardEvent) ifFalse: - [self model unbufferStructures]. - (self isCtrlA: aKeyboardEvent) - ifTrue: [self selectAll]. - self model precedingStructuresChanged. + (self isNewCharacter: aKeyboardEvent) ifTrue: [self model applyCurrentStructures]. + (self class isCtrlA: aKeyboardEvent) ifTrue: [self selectAll]. + (self isStructureShortcut: aKeyboardEvent) + ifFalse: [self model precedingStructuresChanged]. self model updateFooter. ^ returnValue \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditor.class/instance/makeTextURLFrom..st b/packages/RichTextEditing-Core.package/RichTextEditor.class/instance/makeTextURLFrom..st deleted file mode 100644 index 4b6a543..0000000 --- a/packages/RichTextEditing-Core.package/RichTextEditor.class/instance/makeTextURLFrom..st +++ /dev/null @@ -1,6 +0,0 @@ -pasting -makeTextURLFrom: aString - - ^ aString asText - addAttribute: (TextStructure hyperlinkTo: aString); - addAttribute: (TextEmphasis underlined) \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditor.class/instance/mouseDown..st b/packages/RichTextEditing-Core.package/RichTextEditor.class/instance/mouseDown..st index cb6a69a..81192db 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditor.class/instance/mouseDown..st +++ b/packages/RichTextEditing-Core.package/RichTextEditor.class/instance/mouseDown..st @@ -4,6 +4,5 @@ mouseDown: anEvent | returnValue | returnValue := super mouseDown: anEvent. self model precedingStructuresChanged. - self model ifNotNil: #unbufferStructures. self model updateFooter. ^ returnValue \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditor.class/instance/openStructureTypeIn.st b/packages/RichTextEditing-Core.package/RichTextEditor.class/instance/openStructureTypeIn.st new file mode 100644 index 0000000..c02f271 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextEditor.class/instance/openStructureTypeIn.st @@ -0,0 +1,6 @@ +undo/redo +openStructureTypeIn + + "Close previous typeIn to store edited text and allow undo/redo of only the structure" + self closeTypeIn. + self openTypeIn \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditor.class/instance/pasteURL.st b/packages/RichTextEditing-Core.package/RichTextEditor.class/instance/pasteURL.st index cba3595..53bb379 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditor.class/instance/pasteURL.st +++ b/packages/RichTextEditing-Core.package/RichTextEditor.class/instance/pasteURL.st @@ -2,5 +2,5 @@ pasting pasteURL self - replaceSelectionWith: (self makeTextURLFrom: self clipboardText asString); + replaceSelectionWith: (self class makeTextURLFrom: self clipboardText asString); selectAt: self pointIndex \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditor.class/instance/setEmphasisHere.st b/packages/RichTextEditing-Core.package/RichTextEditor.class/instance/setEmphasisHere.st index 8f659b4..d45a3b7 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditor.class/instance/setEmphasisHere.st +++ b/packages/RichTextEditing-Core.package/RichTextEditor.class/instance/setEmphasisHere.st @@ -1,5 +1,6 @@ -as yet unclassified +editing keys setEmphasisHere + "This must be empty so that our super class TextEditor does not add any emphasising to text. Only the RichTextEditorModel is responsible for emphasising." emphasisHere := {} \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditor.class/methodProperties.json b/packages/RichTextEditing-Core.package/RichTextEditor.class/methodProperties.json index da658ae..673ec67 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditor.class/methodProperties.json +++ b/packages/RichTextEditing-Core.package/RichTextEditor.class/methodProperties.json @@ -2,28 +2,31 @@ "class" : { "initialize" : "AG 7/25/2019 13:10", "initializeCmdKeyShortcuts" : "OS 5/6/2020 20:40", - "initializeShiftCmdKeyShortcuts" : "tok 5/18/2020 10:19", + "initializeShiftCmdKeyShortcuts" : "tok 8/7/2020 20:51", "initializeShiftedYellowButtonMenu" : "AG 5/29/2019 18:39", "initializeYellowButtonMenu" : "AG 5/29/2019 18:39", - "structureKeymap" : "tok 5/18/2020 10:18" }, + "isCtrlA:" : "frc 8/7/2020 11:26", + "makeTextURLFrom:" : "tok 8/7/2020 15:51", + "paragraphCharacter" : "OS 8/7/2020 09:47", + "structureKeymap" : "tok 8/7/2020 11:13", + "structureKeymap:" : "frc 8/6/2020 19:39" }, "instance" : { - "URLRegex" : "kh 6/15/2020 10:42", + "URLRegex" : "tok 8/7/2020 20:32", "clipboardContainsURL" : "kh 6/15/2020 13:32", - "crWithIndent:" : "lh 7/24/2019 22:30", - "getParagraphCharacter" : "LM 5/26/2019 22:52", - "isCtrlA:" : "lh 7/24/2019 16:59", + "crWithIndent:" : "OS 8/7/2020 09:49", + "initialize" : "JEH 8/3/2020 15:01", "isNewCharacter:" : "tok 6/13/2020 12:03", "isSpecialCharacter:" : "OS 6/12/2020 12:03", - "isStructureShortcut:" : "OS 6/12/2020 12:09", + "isStructureShortcut:" : "tok 8/7/2020 20:33", "isValidCharacter:" : "tok 6/13/2020 12:04", - "keyStroke:" : "OS 6/12/2020 12:09", - "makeTextURLFrom:" : "frc 7/3/2020 09:13", - "mouseDown:" : "frc 7/3/2020 19:37", + "keyStroke:" : "tok 8/7/2020 20:33", + "mouseDown:" : "OS 8/6/2020 16:26", + "openStructureTypeIn" : "tok 8/3/2020 14:33", "paste" : "kh 6/15/2020 13:32", - "pasteURL" : "frc 7/3/2020 09:13", - "setEmphasisHere" : "6/1/2020 14:03:21", + "pasteURL" : "frc 8/7/2020 11:25", + "setEmphasisHere" : "OS 8/7/2020 09:38", "specialCharacters" : "tok 6/13/2020 12:14", "storeSelectionInParagraph" : "lh 7/24/2019 21:51", "textSize" : "lh 6/26/2019 22:16", - "toggleStructureSelectionAt:" : "tok 5/18/2020 13:40", + "toggleStructureSelectionAt:" : "tok 8/7/2020 11:14", "wouldPasteURL" : "kh 6/15/2020 10:42" } } diff --git a/packages/RichTextEditing-Core.package/RichTextEditor.class/properties.json b/packages/RichTextEditing-Core.package/RichTextEditor.class/properties.json index 3ace270..ce4b870 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditor.class/properties.json +++ b/packages/RichTextEditing-Core.package/RichTextEditor.class/properties.json @@ -1,7 +1,7 @@ { "category" : "RichTextEditing-Core", "classinstvars" : [ - ], + "structureKeymap" ], "classvars" : [ ], "commentStamp" : "ls 7/25/2019 13:49", diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/README.md b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/README.md index 94a8272..c73b6dc 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/README.md +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/README.md @@ -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) diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/class/fileExporters.st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/class/fileExporters.st index 9e11abe..5d0c781 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/class/fileExporters.st +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/class/fileExporters.st @@ -1,5 +1,4 @@ constants fileExporters - ^ Dictionary newFrom: { - RichTextPlainTextExportStrategy label -> RichTextPlainTextExportStrategy} \ No newline at end of file + ^ RichTextExportStrategy availableExportStrategies \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/class/open..st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/class/open..st new file mode 100644 index 0000000..f9b3d17 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/class/open..st @@ -0,0 +1,9 @@ +instance creation +open: aRichTextDocument + + | instance | + instance := self new. + ToolBuilder default open: instance. + instance setDocument: aRichTextDocument. + + ^ instance \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/class/yellowButtonMenuItems.st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/class/yellowButtonMenuItems.st index 74031b8..4124b51 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/class/yellowButtonMenuItems.st +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/class/yellowButtonMenuItems.st @@ -17,6 +17,6 @@ yellowButtonMenuItems {'paste...' translated. #pasteRecent}. #-. {'save (s)' translated. #saveText}. - {'save as' translated. #saveDocumentInSaverWithNamePrompt}. + {'save as' translated. #saveDocumentWithNamePrompt}. {'cancel (l)' translated. #cancel}. } \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/addAttribute..st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/addAttribute..st deleted file mode 100644 index f6e32d7..0000000 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/addAttribute..st +++ /dev/null @@ -1,5 +0,0 @@ -text structure -addAttribute: aTextAttribute - - self setTextFromView. - self bufferDocument addAttribute: aTextAttribute from: self selectionStart to: self selectionStop \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/addExtendableStructures.st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/addExtendableStructures.st index daa83f6..a4233b8 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/addExtendableStructures.st +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/addExtendableStructures.st @@ -1,6 +1,6 @@ text structure addExtendableStructures - (self currentStructures + (self selectedStructures collect: [:each | self textStructureAt: each] - thenSelect: [:each | each mayBeExtended]) do: [:each | self addAttribute: each] \ No newline at end of file + thenSelect: [:each | each mayBeExtended]) do: [:each | self addTextAttribute: each] \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/addTextAttribute..st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/addTextAttribute..st new file mode 100644 index 0000000..7da4c65 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/addTextAttribute..st @@ -0,0 +1,8 @@ +text structure +addTextAttribute: aTextAttribute + + self setTextFromView. + self bufferDocument + addAttribute: aTextAttribute + from: self selectionStart + to: self selectionStop \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/bufferDocument..st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/bufferDocument..st index a987c1c..8442770 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/bufferDocument..st +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/bufferDocument..st @@ -2,5 +2,6 @@ accessing bufferDocument: aRichTextDocument bufferDocument := aRichTextDocument. - self textChanged; + self + textChanged; noUnacceptedEdits \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/bufferedStructures..st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/bufferedStructures..st deleted file mode 100644 index 94e6371..0000000 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/bufferedStructures..st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -bufferedStructures: aSet - - bufferedStructures := aSet \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/bufferedStructures.st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/bufferedStructures.st deleted file mode 100644 index 33b0690..0000000 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/bufferedStructures.st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -bufferedStructures - - ^ bufferedStructures \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/buildDocumentMenuWith..st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/buildDocumentMenuWith..st index 0c6ac41..e5cb62a 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/buildDocumentMenuWith..st +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/buildDocumentMenuWith..st @@ -3,7 +3,6 @@ buildDocumentMenuWith: aBuilder ^ aBuilder pluggableButtonSpec new model: self; - frame: (0 @ 0 corner: 0.125 @ 0.075); label: 'Document'; action: #openDocumentMenu; yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/buildEditMenuWith..st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/buildEditMenuWith..st index 53cbbcc..50eb7d4 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/buildEditMenuWith..st +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/buildEditMenuWith..st @@ -3,7 +3,6 @@ buildEditMenuWith: aBuilder ^ aBuilder pluggableButtonSpec new model: self; - frame: (0.125 @ 0 corner: 0.25 @ 0.075); label: 'Edit'; action: #openEditMenu; yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/buildFooterWith..st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/buildFooterWith..st index aea985c..345591d 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/buildFooterWith..st +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/buildFooterWith..st @@ -4,7 +4,7 @@ buildFooterWith: aBuilder ^ aBuilder pluggableTextSpec new name: 'footer'; model: self; - frame: (0 @ 0.9 corner: 1 @ 1); + frame: self footerFrame; readOnly: true; minimumHeight: 20; indicateUnacceptedChanges: false; diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/buildHelpButtonWith..st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/buildHelpButtonWith..st index a4d17c7..8110242 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/buildHelpButtonWith..st +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/buildHelpButtonWith..st @@ -3,7 +3,6 @@ buildHelpButtonWith: aBuilder ^ aBuilder pluggableButtonSpec new model: self; - frame: (0.875@ 0 corner: 1 @ 0.075); label: 'Help'; action: #help; yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/buildMainSectionPanelWith..st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/buildMainSectionPanelWith..st new file mode 100644 index 0000000..dddcb08 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/buildMainSectionPanelWith..st @@ -0,0 +1,11 @@ +toolbuilder +buildMainSectionPanelWith: aBuilder + + ^ aBuilder pluggablePanelSpec new + model: self; + wantsResizeHandles: true; + children: { + self buildStructureSectionPanelWith: aBuilder. + self buildTextFieldWith: aBuilder}; + frame: self mainSectionFrame; + yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/buildManageStructuresButtonWith..st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/buildManageStructuresButtonWith..st index f267e6f..dbefd33 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/buildManageStructuresButtonWith..st +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/buildManageStructuresButtonWith..st @@ -3,7 +3,7 @@ buildManageStructuresButtonWith: aBuilder ^ aBuilder pluggableButtonSpec new model: self; - frame: (0 @ 0.8 corner: 0.3 @ 0.9); + frame: self manageStructuresButtonFrame; label: 'Manage Structures'; action: #openStructureEditor; yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/buildMenuBarPanelWith..st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/buildMenuBarPanelWith..st new file mode 100644 index 0000000..c3d7823 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/buildMenuBarPanelWith..st @@ -0,0 +1,12 @@ +toolbuilder +buildMenuBarPanelWith: aBuilder + + ^ aBuilder pluggablePanelSpec new + model: self; + layout: #horizontal; + children: { + self buildDocumentMenuWith: aBuilder. + self buildEditMenuWith: aBuilder. + self buildHelpButtonWith: aBuilder}; + frame: self menuBarFrame; + yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/buildStructureListWith..st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/buildStructureListWith..st index cc25f96..41e6954 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/buildStructureListWith..st +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/buildStructureListWith..st @@ -4,7 +4,7 @@ buildStructureListWith: aBuilder ^ aBuilder pluggableMultiSelectionListSpec new name: 'structureList'; model: self; - frame: (0 @ 0.075 corner: 0.3 @ 0.8); + frame: self structureListFrame; list: #textStructureSymbols; getSelectionList: #getStructureSelectionAt:; setSelectionList: #structureSelectionAt:put:; diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/buildStructureSectionPanelWith..st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/buildStructureSectionPanelWith..st new file mode 100644 index 0000000..e0162de --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/buildStructureSectionPanelWith..st @@ -0,0 +1,10 @@ +toolbuilder +buildStructureSectionPanelWith: aBuilder + + ^ aBuilder pluggablePanelSpec new + model: self; + frame: self structureSectionFrame; + children: { + self buildStructureListWith: aBuilder. + self buildManageStructuresButtonWith: aBuilder}; + yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/buildTextFieldWith..st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/buildTextFieldWith..st index 4198b33..1536273 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/buildTextFieldWith..st +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/buildTextFieldWith..st @@ -4,7 +4,7 @@ buildTextFieldWith: aBuilder ^ aBuilder pluggableTextSpec new name: 'textView'; model: self; - frame: (0.3 @ 0.075 corner: 1 @ 0.9); + frame: self textFieldFrame; readOnly: false; getText: #text; setText: #saveText:; diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/buildWith..st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/buildWith..st index ad09f1b..03af15e 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/buildWith..st +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/buildWith..st @@ -7,18 +7,10 @@ buildWith: aBuilder model: self; label: #label; children: { - self buildTextFieldWith: aBuilder. - self buildStructureListWith: aBuilder. - self buildManageStructuresButtonWith: aBuilder. - self buildEditMenuWith: aBuilder. - self buildDocumentMenuWith: aBuilder. - self buildHelpButtonWith: aBuilder. + self buildMenuBarPanelWith: aBuilder. + self buildMainSectionPanelWith: aBuilder. self buildFooterWith: aBuilder}. result := aBuilder build: windowSpec. - self textView: (aBuilder widgetAt: 'textView'). - self footer: (aBuilder widgetAt: 'footer'). - self updateFooter. - self editor model: self. + self postBuildWith: aBuilder. - ^ result - \ No newline at end of file + ^ result \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/buttonHeight.st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/buttonHeight.st new file mode 100644 index 0000000..afeebde --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/buttonHeight.st @@ -0,0 +1,4 @@ +toolbuilder +buttonHeight + + ^ Preferences standardButtonFont height * 3 \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/changeAttributesFor.with..st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/changeAttributesFor.with..st new file mode 100644 index 0000000..92fc1b3 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/changeAttributesFor.with..st @@ -0,0 +1,8 @@ +text structure +changeAttributesFor: aBoolean with: targetStructure + + self editor openStructureTypeIn. + aBoolean + ifTrue: [self addTextAttribute: targetStructure] + ifFalse: [self removeTextAttribute: targetStructure]. + self editor closeTypeIn \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/changeBuffersFor.with..st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/changeBuffersFor.with..st new file mode 100644 index 0000000..68689da --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/changeBuffersFor.with..st @@ -0,0 +1,6 @@ +text structure +changeBuffersFor: aBoolean with: targetSymbol + + aBoolean + ifTrue: [self selectedStructures add: targetSymbol] + ifFalse: [self selectedStructures remove: targetSymbol ifAbsent: []] diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/currentStructures.st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/currentStructures.st deleted file mode 100644 index 1d5dfaf..0000000 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/currentStructures.st +++ /dev/null @@ -1,4 +0,0 @@ -as yet unclassified -currentStructures - - ^ (self precedingStructures union: self bufferedStructures) difference: self debufferedStructures \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/debufferedStructures..st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/debufferedStructures..st deleted file mode 100644 index 73209a1..0000000 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/debufferedStructures..st +++ /dev/null @@ -1,4 +0,0 @@ -as yet unclassified -debufferedStructures: aSet - - debufferedStructures := aSet \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/debufferedStructures.st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/debufferedStructures.st deleted file mode 100644 index a8bacac..0000000 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/debufferedStructures.st +++ /dev/null @@ -1,4 +0,0 @@ -as yet unclassified -debufferedStructures - - ^ debufferedStructures \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/documentTimeText.st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/documentTimeText.st index 82bd266..67dba9f 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/documentTimeText.st +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/documentTimeText.st @@ -3,4 +3,5 @@ documentTimeText self bufferDocument isUnsavedDocument ifTrue: [^ 'unsaved document'] - ifFalse: [^ 'last saved ', (self bufferDocument timeLastSaved at: 1), ' ', (self bufferDocument timeLastSaved at: 2)]. \ No newline at end of file + ifFalse: [^ 'last saved ', (self bufferDocument dateLastSaved), ' ', + (self bufferDocument timeLastSaved)] \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/footerFrame.st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/footerFrame.st new file mode 100644 index 0000000..c44727c --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/footerFrame.st @@ -0,0 +1,9 @@ +toolbuilder +footerFrame + + ^ LayoutFrame new + leftFraction: 0; + rightFraction: 1; + topFraction: 1 offset: self footerHeight negated; + bottomFraction: 1; + yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/footerHeight.st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/footerHeight.st new file mode 100644 index 0000000..f657d46 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/footerHeight.st @@ -0,0 +1,4 @@ +toolbuilder +footerHeight + + ^ Preferences standardMenuFont height * 1.5 \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/getStructureSelectionAt..st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/getStructureSelectionAt..st index 41eb081..c606570 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/getStructureSelectionAt..st +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/getStructureSelectionAt..st @@ -1,8 +1,4 @@ text structure getStructureSelectionAt: anIndex - | structures | - - self isIntervalNotEmpty ifTrue:[structures := self selectedStructures] - ifFalse: [structures := self currentStructures]. - ^ structures includes: (self textStructureSymbols at: anIndex ifAbsent: false) \ No newline at end of file + ^ selectedStructures includes: (self textStructureSymbols at: anIndex ifAbsent: [false]) diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/hasStructure.between.to..st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/hasStructure.between.to..st index 6c698b5..e04e741 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/hasStructure.between.to..st +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/hasStructure.between.to..st @@ -1,10 +1,10 @@ -as yet unclassified +text structure hasStructure: aSymbol between: start to: end self setTextFromView. - ^ self bufferDocument + ^ self bufferDocument class hasStructure: aSymbol - forText: self text + for: self text from: start to: end \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/help.st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/help.st index a50f2ef..189ff49 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/help.st +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/help.st @@ -1,4 +1,4 @@ user interface help - HelpBrowser openOn: SquidWordHelp \ No newline at end of file + HelpBrowser openOn: RichTextHelp \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/importFileFrom..st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/importFileFrom..st index 4314f66..77b2ab6 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/importFileFrom..st +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/importFileFrom..st @@ -1,10 +1,11 @@ import-export -importFileFrom: filePath +importFileFrom: aFilePath - | filestream text document | - filestream := StandardFileStream readOnlyFileNamed: filePath. - text := Text fromString: filestream contents. - document := self documentClass fromText: text withStructures: (self documentClass initialTextStructures). + | fileStream text document | + fileStream := StandardFileStream readOnlyFileNamed: aFilePath. + text := Text fromString: fileStream contents. + document := self documentClass fromText: text + withStructures: (self documentClass initialTextStructures). self setDocument: document. - filestream close + fileStream close \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/importObjectFileFrom..st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/importObjectFileFrom..st new file mode 100644 index 0000000..e7767a5 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/importObjectFileFrom..st @@ -0,0 +1,7 @@ +import-export +importObjectFileFrom: aFilePath + + | stream | + stream := ReferenceStream fileNamed: aFilePath. + self setDocument: stream next. + stream close \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/importObjectFileWithDialog.st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/importObjectFileWithDialog.st new file mode 100644 index 0000000..52f080b --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/importObjectFileWithDialog.st @@ -0,0 +1,6 @@ +import-export +importObjectFileWithDialog + + | filePath | + filePath := self selectFilePath. + filePath ifNotNil: [self importObjectFileFrom: filePath] \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/initialize.st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/initialize.st index 6e1968b..165e53a 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/initialize.st +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/initialize.st @@ -5,7 +5,4 @@ initialize self initializeDocuments; label: self class initialLabel; - selectedStructures: Set new; - bufferedStructures: Set new; - debufferedStructures: Set new; - precedingStructures: Set new \ No newline at end of file + selectedStructures: Set new \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/initializeCompletionController.st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/initializeCompletionController.st new file mode 100644 index 0000000..5ca1de0 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/initializeCompletionController.st @@ -0,0 +1,6 @@ +initialize-release +initializeCompletionController + + ^ self wantsAutocompletion + ifTrue: [self addDependent: self createCompletionController] + ifFalse: [nil] \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/isCursorBetweenText.st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/isCursorBetweenText.st index c7f3684..aeb6413 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/isCursorBetweenText.st +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/isCursorBetweenText.st @@ -1,4 +1,4 @@ testing isCursorBetweenText - ^ self isIntervalEmpty and: [self isTextEmpty not] \ No newline at end of file + ^ self isSelectionEmpty and: [self isTextEmpty not] \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/isIntervalNotEmpty.st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/isIntervalNotEmpty.st deleted file mode 100644 index 4ba398d..0000000 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/isIntervalNotEmpty.st +++ /dev/null @@ -1,4 +0,0 @@ -testing -isIntervalNotEmpty - - ^ self isIntervalEmpty not \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/isIntervalEmpty.st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/isSelectionEmpty.st similarity index 80% rename from packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/isIntervalEmpty.st rename to packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/isSelectionEmpty.st index 849ead9..1321400 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/isIntervalEmpty.st +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/isSelectionEmpty.st @@ -1,4 +1,4 @@ testing -isIntervalEmpty +isSelectionEmpty ^ (self selectionInterval first > self selectionInterval last) \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/loadDocumentFromSaver.st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/loadDocumentFromSaver.st index 0c7d5f0..af2bfbb 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/loadDocumentFromSaver.st +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/loadDocumentFromSaver.st @@ -3,9 +3,8 @@ loadDocumentFromSaver | chosen document | chosen := self chosenDocument. - chosen - ifNotNil: [ - document := self saver loadDocumentFromName: chosen. - self setDocument: document; - setCurrentSave: chosen; - noUnacceptedEdits] \ No newline at end of file + chosen ifNotNil: [ + document := self saver loadDocumentFromName: chosen. + self setDocument: document; + setCurrentSave: chosen; + noUnacceptedEdits] \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/mainSectionFrame.st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/mainSectionFrame.st new file mode 100644 index 0000000..c05147e --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/mainSectionFrame.st @@ -0,0 +1,11 @@ +toolbuilder +mainSectionFrame + + ^ LayoutFrame new + leftFraction: 0; + rightFraction: 1; + topFraction: self menuBarFrame bottomFraction + offset: self menuBarFrame bottomOffset; + bottomFraction: self footerFrame topFraction + offset: self footerFrame topOffset; + yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/manageStructuresButtonFrame.st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/manageStructuresButtonFrame.st new file mode 100644 index 0000000..6f760f5 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/manageStructuresButtonFrame.st @@ -0,0 +1,9 @@ +toolbuilder +manageStructuresButtonFrame + + ^ LayoutFrame new + leftFraction: 0; + rightFraction: 1; + topFraction: 1 offset: self buttonHeight negated; + bottomFraction: 1; + yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/menuBarFrame.st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/menuBarFrame.st new file mode 100644 index 0000000..1411882 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/menuBarFrame.st @@ -0,0 +1,9 @@ +toolbuilder +menuBarFrame + + ^ LayoutFrame new + leftFraction: 0; + rightFraction: 1; + topFraction: 0; + bottomFraction: 0 offset: self buttonHeight; + yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/openDocumentMenu.st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/openDocumentMenu.st index 44f61a3..1f43d19 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/openDocumentMenu.st +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/openDocumentMenu.st @@ -4,9 +4,10 @@ openDocumentMenu ^ self openMenuWith: { {'New' . #openNewEditor}. {'Save' . #saveText}. - {'Save as' . #saveDocumentInSaverWithNamePrompt}. + {'Save as' . #saveDocumentWithNamePrompt}. {'Load' . #loadDocumentFromSaver}. {'Import from File' . #importFileWithDialog}. + {'Import from Object File' . #importObjectFileWithDialog}. {'Export as ...' . #exportFileWithDialog}. {'Inspect Document' . #inspectDocument}. {'Document info' . #showInfo}. diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/openEditMenu.st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/openEditMenu.st index 0f230cd..06b0968 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/openEditMenu.st +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/openEditMenu.st @@ -2,8 +2,7 @@ menubar openEditMenu ^ self openMenuWith: { - {'Undo' . #undo}. - {'Redo' . #redo}. + {'Undo (z)' . #undo}. + {'Redo (Z)' . #redo}. {'Structures' . #openStructureEditor}. - {'Template'. #openTemplateChoser} - } \ No newline at end of file + {'Template'. #openTemplateChoser}} \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/openStructureEditor.st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/openStructureEditor.st index 0d0207f..f3b4d8a 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/openStructureEditor.st +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/openStructureEditor.st @@ -1,4 +1,4 @@ initialize-release openStructureEditor - RichTextStructureEditor openWith: self bufferDocument \ No newline at end of file + RichTextStructureEditor open: self bufferDocument \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/openTemplateChoser.st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/openTemplateChoser.st index 8d34521..a9cf13d 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/openTemplateChoser.st +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/openTemplateChoser.st @@ -1,4 +1,4 @@ text structure openTemplateChoser - RichTextStructureEditor openWith: self bufferDocument \ No newline at end of file + RichTextStructureEditor open: self bufferDocument \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/positionInTextAtIndex..st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/positionInTextAtIndex..st index 2526757..46744ec 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/positionInTextAtIndex..st +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/positionInTextAtIndex..st @@ -7,8 +7,8 @@ positionInTextAtIndex: anIndex lineCounter := 0. currentLine := self displayedLines - detect: - [: each | lineCounter := lineCounter + 1. + detect: [:each | + lineCounter := lineCounter + 1. each first <= (anIndex + 1) and: [each last >= (anIndex + 1)]] ifNone: [self displayedLines last]. positionInLine := anIndex - currentLine first + 2. diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/postBuildWith..st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/postBuildWith..st new file mode 100644 index 0000000..c02c374 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/postBuildWith..st @@ -0,0 +1,8 @@ +toolbuilder +postBuildWith: aBuilder + + self + textView: (aBuilder widgetAt: 'textView'); + footer: (aBuilder widgetAt: 'footer'); + updateFooter. + self editor model: self \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/precedingStructures..st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/precedingStructures..st deleted file mode 100644 index c273559..0000000 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/precedingStructures..st +++ /dev/null @@ -1,4 +0,0 @@ -as yet unclassified -precedingStructures: aSet - - precedingStructures := aSet \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/precedingStructures.st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/precedingStructures.st deleted file mode 100644 index 8480bcd..0000000 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/precedingStructures.st +++ /dev/null @@ -1,4 +0,0 @@ -as yet unclassified -precedingStructures - - ^ precedingStructures \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/precedingStructuresChanged.st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/precedingStructuresChanged.st index 73bb056..76dec28 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/precedingStructuresChanged.st +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/precedingStructuresChanged.st @@ -1,6 +1,6 @@ -as yet unclassified +text structure precedingStructuresChanged - self precedingStructures: (self textStructureSymbols select: - [:structure | self hasStructure: structure between: self selectionStart to: self selectionStart]) asSet. - self changed: #allSelections \ No newline at end of file + self selectedStructures: (self textStructureSymbols select: [:structure | + self hasStructure: structure between: self selectionStart to: self selectionStart]) asSet. + self changed: #allSelections diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/removeTextAttribute..st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/removeTextAttribute..st index f6bed2c..76a5d9c 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/removeTextAttribute..st +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/removeTextAttribute..st @@ -4,5 +4,4 @@ removeTextAttribute: aTextAttribute self bufferDocument removeTextAttribute: aTextAttribute from: self selectionStart - to: self selectionStop. - self selectionChanged \ No newline at end of file + to: self selectionStop diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/saveDocumentInSaverWithNamePrompt.st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/saveDocumentWithNamePrompt.st similarity index 56% rename from packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/saveDocumentInSaverWithNamePrompt.st rename to packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/saveDocumentWithNamePrompt.st index 013e5d2..11974ed 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/saveDocumentInSaverWithNamePrompt.st +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/saveDocumentWithNamePrompt.st @@ -1,13 +1,11 @@ saving and loading -saveDocumentInSaverWithNamePrompt +saveDocumentWithNamePrompt | name | name := UIManager default request: 'Save as...'. - name = '' - ifFalse: [ - self saver - addSave: self targetDocument + (name = '') ifFalse: [ + self saver addSave: self targetDocument underName: name. - self + self setCurrentSave: name; noUnacceptedEdits] \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/saveText.st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/saveText.st index 569b8da..c41b667 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/saveText.st +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/saveText.st @@ -1,6 +1,6 @@ saving and loading saveText - self bufferDocument timeLastSaved: Time dateAndTimeNow. + self bufferDocument timestampLastSaved: Time dateAndTimeNow. self targetDocument copy: self bufferDocument. self noUnacceptedEdits \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/selectionChanged.st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/selectionChanged.st index bf99fe6..628106d 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/selectionChanged.st +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/selectionChanged.st @@ -1,6 +1,7 @@ change selectionChanged - self selectedStructures: (self textStructureSymbols select: - [:structure | self hasStructure: structure]) asSet. - self changed: #allSelections \ No newline at end of file + self isSelectionEmpty ifFalse: [ + self selectedStructures: (self textStructureSymbols select: [:structure | + self hasStructure: structure]) asSet]. + self changed: #allSelections diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/setLabel..st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/setLabel..st index 498343c..347687f 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/setLabel..st +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/setLabel..st @@ -2,8 +2,6 @@ saving and loading setLabel: aString (aString = '') - ifTrue: [ - self label: self class initialLabel] - ifFalse: [ - self label: self class initialLabel, ' - ', aString]. + ifTrue: [self label: self class initialLabel] + ifFalse: [self label: self class initialLabel, ' - ', aString]. self changed: #label \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/setText..st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/setText..st index c906702..f4f373a 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/setText..st +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/setText..st @@ -1,5 +1,6 @@ accessing setText: aText - self text: aText; + self + text: aText; changed: #text \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/showInfo.st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/showInfo.st index acb682f..b2981c5 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/showInfo.st +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/showInfo.st @@ -1,14 +1,6 @@ document information showInfo - | infoText | - infoText := 'Word count: ', self bufferDocument wordcount. - infoText := infoText , String crlf, 'Total characters: ', (self bufferDocument charcountExcept: #()). - infoText := infoText, String crlf, 'Non-blank characters: ', self bufferDocument charcount. - ^ UserDialogBoxMorph new - title: self label; - label: infoText; - exclusive: false; - createButton: 'OK' translated value: true; - openInWorld; - yourself \ No newline at end of file + ^ self showInfoDialog: 'Word count: ', self bufferDocument wordcount asString, + String crlf, 'Total characters: ', (self bufferDocument charcountExcept: #()), + String crlf, 'Non-blank characters: ', self bufferDocument charcount \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/showInfoDialog..st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/showInfoDialog..st new file mode 100644 index 0000000..e8dc7dd --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/showInfoDialog..st @@ -0,0 +1,10 @@ +user interface +showInfoDialog: aString + + ^ UserDialogBoxMorph new + title: self label; + label: aString; + exclusive: false; + createButton: 'OK' translated value: true; + openInWorld; + yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/structureListFrame.st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/structureListFrame.st new file mode 100644 index 0000000..348ba02 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/structureListFrame.st @@ -0,0 +1,9 @@ +toolbuilder +structureListFrame + + ^ LayoutFrame new + leftFraction: 0; + rightFraction: 1; + topFraction: 0; + bottomFraction: 1 offset: self buttonHeight negated; + yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/structureSectionFrame.st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/structureSectionFrame.st new file mode 100644 index 0000000..15b6462 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/structureSectionFrame.st @@ -0,0 +1,9 @@ +toolbuilder +structureSectionFrame + + ^ LayoutFrame new + leftFraction: 0; + rightFraction: 0.3; + topFraction: 0; + bottomFraction: 1; + yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/structureSelectionAt.put..st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/structureSelectionAt.put..st index 2282e51..dae3045 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/structureSelectionAt.put..st +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/structureSelectionAt.put..st @@ -4,13 +4,9 @@ structureSelectionAt: anIndex put: aBoolean | targetSymbol targetStructure | targetSymbol := self textStructureSymbols at: anIndex ifAbsent: [^self]. targetStructure := self textStructures at: anIndex ifAbsent: [^self]. - (aBoolean and: [self isIntervalEmpty]) - ifTrue: [self bufferedStructures add: targetSymbol. self debufferedStructures remove: targetSymbol ifAbsent: []]. - (aBoolean and: [self isIntervalNotEmpty]) - ifTrue: [self addAttribute: targetStructure]. - (aBoolean not and: [self isIntervalEmpty]) - ifTrue: [self debufferedStructures add: targetSymbol. self bufferedStructures remove: targetSymbol ifAbsent: []]. - (aBoolean not and: [self isIntervalNotEmpty]) - ifTrue: [self removeTextAttribute: targetStructure]. + + self isSelectionEmpty + ifTrue: [self changeBuffersFor: aBoolean with: targetSymbol] + ifFalse: [self changeAttributesFor: aBoolean with: targetStructure]. self selectionChanged \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/textChanged.st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/textChanged.st index 37ca943..b14fc94 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/textChanged.st +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/textChanged.st @@ -1,7 +1,8 @@ text structure textChanged - self changed: #text; + self + changed: #text; unacceptedEdits; fitParagraphs; updateFooter \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/textFieldFrame.st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/textFieldFrame.st new file mode 100644 index 0000000..9c5caed --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/textFieldFrame.st @@ -0,0 +1,9 @@ +toolbuilder +textFieldFrame + + ^ LayoutFrame new + leftFraction: 0.3; + rightFraction: 1; + topFraction: 0; + bottomFraction: 1; + yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/toggleStructureSelectionAt..st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/toggleStructureSelectionAt..st index 24d9d19..95d8f47 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/toggleStructureSelectionAt..st +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/toggleStructureSelectionAt..st @@ -1,4 +1,4 @@ -as yet unclassified +text structure toggleStructureSelectionAt: anIndex | isSelected maxIndex | diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/unbufferStructures.st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/unbufferStructures.st deleted file mode 100644 index 70e4efb..0000000 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/unbufferStructures.st +++ /dev/null @@ -1,7 +0,0 @@ -text structure -unbufferStructures - - self - bufferedStructures: Set new; - debufferedStructures: Set new; - changed: #allSelections \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/update..st b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/update..st index 751e2d5..a0eec2b 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/update..st +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/update..st @@ -1,12 +1,12 @@ change update: aParameter - aParameter = #text ifTrue: [^ self textChanged]. - aParameter = #textStructures ifTrue: [^ self structuresChanged]. + (aParameter literalEqual: #text) ifTrue: [^ self textChanged]. + (aParameter literalEqual: #textStructures) ifTrue: [^ self structuresChanged]. self bufferDocument: self targetDocument copy; textChanged; structuresChanged; noUnacceptedEdits. - self bufferDocument myDependents: (self targetDocument myDependents) \ No newline at end of file + self bufferDocument myDependents: self targetDocument myDependents \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/methodProperties.json b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/methodProperties.json index 09eb1d6..78c7959 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/methodProperties.json +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/methodProperties.json @@ -1,84 +1,92 @@ { "class" : { "autocompletion" : "kh 5/5/2020 22:35", - "autocompletion:" : "kh 5/5/2020 21:54", - "fileExporters" : "tok 7/9/2020 22:09", + "autocompletion:" : "frc 8/7/2020 12:43", + "fileExporters" : "JEH 7/26/2020 18:01", "initialLabel" : "ls 6/21/2019 17:54", "initialize" : "ls 6/21/2019 17:54", "open" : "ls 7/24/2019 20:00", + "open:" : "kh 7/27/2020 12:26", "openWith:" : "AG 7/25/2019 13:12", "saverClass" : "ls 5/8/2019 20:28", - "yellowButtonMenuItems" : "tok 5/31/2020 20:54" }, + "yellowButtonMenuItems" : "tok 8/7/2020 19:08" }, "instance" : { - "addAttribute:" : "ls 7/24/2019 20:26", - "addExtendableStructures" : "kh 6/21/2020 10:03", + "addExtendableStructures" : "OS 8/7/2020 13:51", + "addTextAttribute:" : "OS 8/7/2020 13:51", "applyCurrentStructures" : "OS 6/3/2020 22:35", "bufferDocument" : "ls 6/26/2019 17:45", - "bufferDocument:" : "ls 7/24/2019 20:57", - "bufferedStructures" : "ls 6/19/2019 17:30", - "bufferedStructures:" : "ls 6/26/2019 17:46", - "buildDocumentMenuWith:" : "frc 6/25/2020 16:23", - "buildEditMenuWith:" : "frc 6/25/2020 16:22", - "buildFooterWith:" : "frc 6/16/2020 19:37", - "buildHelpButtonWith:" : "frc 6/16/2020 19:35", - "buildManageStructuresButtonWith:" : "frc 6/16/2020 19:37", - "buildStructureListWith:" : "frc 6/16/2020 19:36", - "buildTextFieldWith:" : "frc 6/16/2020 19:35", - "buildWith:" : "frc 6/25/2020 16:23", + "bufferDocument:" : "tok 8/7/2020 20:34", + "buildDocumentMenuWith:" : "kh 7/11/2020 16:09", + "buildEditMenuWith:" : "kh 7/11/2020 16:09", + "buildFooterWith:" : "kh 8/3/2020 13:55", + "buildHelpButtonWith:" : "kh 7/11/2020 16:09", + "buildMainSectionPanelWith:" : "kh 8/3/2020 13:55", + "buildManageStructuresButtonWith:" : "kh 8/3/2020 13:55", + "buildMenuBarPanelWith:" : "kh 8/3/2020 13:55", + "buildStructureListWith:" : "kh 8/3/2020 13:55", + "buildStructureSectionPanelWith:" : "kh 8/3/2020 13:55", + "buildTextFieldWith:" : "kh 8/3/2020 13:55", + "buildWith:" : "kh 7/27/2020 14:07", + "buttonHeight" : "kh 7/27/2020 14:07", + "changeAttributesFor:with:" : "OS 8/7/2020 13:51", + "changeBuffersFor:with:" : "tok 8/3/2020 12:47", "chosenDocument" : "AG 7/25/2019 13:13", "createNewStructure:" : "ls 7/24/2019 15:11", "currentPositionInText" : "JEH 6/14/2020 11:15", "currentSaveName" : "ls 6/26/2019 17:58", "currentSaveName:" : "ls 6/26/2019 17:58", - "currentStructures" : "OS 6/1/2020 00:02", - "debufferedStructures" : "OS 5/31/2020 13:08", - "debufferedStructures:" : "OS 5/31/2020 13:08", "defaultExportNameFor:" : "tok 7/3/2020 19:32", "displayedLines" : "JEH 6/14/2020 09:57", "documentClass" : "ls 7/10/2019 15:53", - "documentTimeText" : "OS 6/14/2020 18:22", + "documentTimeText" : "tok 8/7/2020 20:35", "editor" : "lh 7/24/2019 17:17", "exportFileWithDialog" : "tok 7/3/2020 19:34", "fitParagraphs" : "lh 7/24/2019 22:44", "footer" : "frc 5/25/2020 15:40", "footer:" : "frc 5/25/2020 15:22", + "footerFrame" : "frc 8/7/2020 11:57", + "footerHeight" : "kh 7/11/2020 14:48", "footerText" : "JEH 6/14/2020 11:16", - "getStructureSelectionAt:" : "OS 6/3/2020 23:53", + "getStructureSelectionAt:" : "OS 8/6/2020 16:24", "hasStructure:" : "AG 7/25/2019 13:13", - "hasStructure:between:to:" : "6/1/2020 14:03:21", + "hasStructure:between:to:" : "tok 8/7/2020 20:02", "hasUnacceptedEdits" : "ls 5/9/2019 10:34", - "help" : "kh 5/25/2020 16:35", - "importFileFrom:" : "tok 7/3/2020 18:50", + "help" : "frc 8/7/2020 13:51", + "importFileFrom:" : "tok 8/7/2020 20:35", "importFileWithDialog" : "tok 7/3/2020 18:50", + "importObjectFileFrom:" : "kh 8/3/2020 14:40", + "importObjectFileWithDialog" : "kh 8/3/2020 14:40", "infoText" : "kh 6/20/2020 21:11", - "initialize" : "ls 7/24/2019 15:10", + "initialize" : "OS 8/6/2020 16:23", + "initializeCompletionController" : "tok 8/7/2020 20:36", "initializeDocuments" : "lh 7/24/2019 22:37", "inspectDocument" : "ls 6/26/2019 18:57", - "isCursorBetweenText" : "ls 7/24/2019 15:33", - "isIntervalEmpty" : "OS 5/31/2020 23:41", - "isIntervalNotEmpty" : "lh 7/24/2019 18:27", + "isCursorBetweenText" : "OS 8/7/2020 13:52", + "isSelectionEmpty" : "OS 8/7/2020 13:52", "isTextEmpty" : "AG 7/25/2019 13:13", "label" : "ls 5/11/2019 12:23", "label:" : "ls 6/26/2019 17:46", - "loadDocumentFromSaver" : "tok 7/8/2020 16:09", + "loadDocumentFromSaver" : "tok 8/7/2020 20:36", + "mainSectionFrame" : "frc 8/7/2020 11:57", + "manageStructuresButtonFrame" : "frc 8/7/2020 11:56", + "menuBarFrame" : "frc 8/7/2020 11:56", "noUnacceptedEdits" : "ls 7/24/2019 21:08", "okToChange" : "ls 6/12/2019 22:15", - "openDocumentMenu" : "tok 7/8/2020 16:09", - "openEditMenu" : "JEH 7/4/2020 11:31", + "openDocumentMenu" : "tok 8/7/2020 19:08", + "openEditMenu" : "tok 8/7/2020 20:37", "openMenuWith:" : "frc 6/16/2020 19:51", "openNewEditor" : "JEH 5/31/2020 14:14", - "openStructureEditor" : "ls 7/24/2019 16:53", - "openTemplateChoser" : "JEH 7/6/2020 15:39", - "positionInTextAtIndex:" : "JEH 6/15/2020 15:09", - "precedingStructures" : "OS 5/31/2020 23:22", - "precedingStructures:" : "OS 5/31/2020 23:22", + "openStructureEditor" : "kh 7/27/2020 12:26", + "openTemplateChoser" : "kh 7/27/2020 12:26", + "positionInTextAtIndex:" : "tok 8/7/2020 20:37", + "postBuildWith:" : "tok 8/7/2020 20:38", "precedingStructuresChanged" : "OS 6/1/2020 00:04", "redo" : "AG 5/29/2019 18:37", - "removeTextAttribute:" : "MB 7/24/2019 20:39", + "removeTextAttribute:" : "tok 8/7/2020 20:38", "renameDocuments:" : "ls 6/26/2019 19:13", "resetSaver" : "ls 6/26/2019 18:44", - "saveDocumentInSaverWithNamePrompt" : "OS 6/14/2020 11:17", - "saveText" : "OS 6/14/2020 11:11", + "saveDocumentWithNamePrompt" : "tok 8/7/2020 20:39", + "saveText" : "tok 7/20/2020 14:10", "saveText:" : "ls 6/26/2019 18:33", "saver" : "ls 6/26/2019 21:15", "saves" : "ls 6/26/2019 21:15", @@ -88,24 +96,28 @@ "selectInvisibly" : "lh 7/24/2019 18:02", "selectedStructures" : "MB 6/19/2019 17:36", "selectedStructures:" : "AG 7/25/2019 11:18", - "selectionChanged" : "OS 5/28/2020 22:05", + "selectionChanged" : "tok 8/7/2020 20:40", "selectionInterval" : "lh 7/24/2019 17:20", "selectionStart" : "OS 5/31/2020 13:38", "selectionStop" : "OS 5/31/2020 14:35", "setCurrentSave:" : "ls 6/26/2019 19:12", "setDocument:" : "OS 7/13/2020 15:21", - "setLabel:" : "lh 7/24/2019 17:21", - "setText:" : "AG 5/29/2019 18:35", + "setLabel:" : "tok 8/7/2020 20:40", + "setText:" : "tok 8/7/2020 20:40", "setTextFromView" : "ls 7/24/2019 20:27", - "showInfo" : "tok 6/21/2020 11:43", - "structureSelectionAt:put:" : "OS 6/4/2020 00:04", + "showInfo" : "tok 8/7/2020 20:41", + "showInfoDialog:" : "frc 7/16/2020 12:45", + "structureListFrame" : "frc 8/7/2020 11:56", + "structureSectionFrame" : "frc 8/7/2020 11:56", + "structureSelectionAt:put:" : "tok 8/3/2020 12:52", "structuresChanged" : "ls 6/26/2019 23:03", "targetDocument" : "ls 6/26/2019 18:10", "targetDocument:" : "lh 7/24/2019 20:23", "text" : "ls 6/26/2019 17:59", "text:" : "ls 6/26/2019 17:59", - "textChanged" : "frc 5/25/2020 15:22", + "textChanged" : "tok 8/7/2020 20:42", "textEditorClass" : "lh 7/24/2019 15:09", + "textFieldFrame" : "frc 8/7/2020 11:56", "textMorph" : "ls 7/24/2019 21:06", "textStructureAt:" : "kh 6/21/2020 15:39", "textStructureSymbols" : "ls 7/24/2019 14:25", @@ -115,8 +127,7 @@ "textView:" : "AG 7/25/2019 11:16", "toggleStructureSelectionAt:" : "OS 5/16/2020 22:55", "unacceptedEdits" : "ls 7/24/2019 21:06", - "unbufferStructures" : "OS 5/31/2020 13:09", "undo" : "AG 5/29/2019 18:37", - "update:" : "OS 7/6/2020 13:51", + "update:" : "kh 8/6/2020 14:20", "updateFooter" : "frc 5/25/2020 15:40", "wantsAutocompletion" : "kh 5/5/2020 22:18" } } diff --git a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/properties.json b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/properties.json index d6a174e..272c596 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditorModel.class/properties.json +++ b/packages/RichTextEditing-Core.package/RichTextEditorModel.class/properties.json @@ -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" : [ ], diff --git a/packages/RichTextEditing-Core.package/RichTextEditorSaver.class/class/current.st b/packages/RichTextEditing-Core.package/RichTextEditorSaver.class/class/current.st index c7550a3..414a042 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditorSaver.class/class/current.st +++ b/packages/RichTextEditing-Core.package/RichTextEditorSaver.class/class/current.st @@ -1,6 +1,5 @@ singleton current - current isNil ifTrue: [^ current := self new]. - + current ifNil: [current := self new]. ^ current \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextEditorSaver.class/methodProperties.json b/packages/RichTextEditing-Core.package/RichTextEditorSaver.class/methodProperties.json index 92cfa49..7927a2b 100644 --- a/packages/RichTextEditing-Core.package/RichTextEditorSaver.class/methodProperties.json +++ b/packages/RichTextEditing-Core.package/RichTextEditorSaver.class/methodProperties.json @@ -1,6 +1,6 @@ { "class" : { - "current" : "AG 7/25/2019 13:15", + "current" : "tok 8/7/2020 20:52", "reset" : "AG 5/29/2019 18:40" }, "instance" : { "addSave:underName:" : "AG 7/25/2019 10:57", diff --git a/packages/RichTextEditing-Core.package/RichTextExportStrategy.class/README.md b/packages/RichTextEditing-Core.package/RichTextExportStrategy.class/README.md index e69de29..2900fd6 100644 --- a/packages/RichTextEditing-Core.package/RichTextExportStrategy.class/README.md +++ b/packages/RichTextEditing-Core.package/RichTextExportStrategy.class/README.md @@ -0,0 +1,3 @@ +I am an interface for strategies that export RichTextDocuments to your file sytem. +Each strategy is responsible for a different file format and implements this in the export:on: method. +You can also use export:to: to supply a FilePath and create a file to export to. diff --git a/packages/RichTextEditing-Core.package/RichTextExportStrategy.class/class/availableExportStrategies.st b/packages/RichTextEditing-Core.package/RichTextExportStrategy.class/class/availableExportStrategies.st new file mode 100644 index 0000000..0d197fd --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextExportStrategy.class/class/availableExportStrategies.st @@ -0,0 +1,4 @@ +export +availableExportStrategies + + ^ Dictionary newFrom: (self subclasses collect: [:each | each label -> each]) \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextExportStrategy.class/class/export.on..st b/packages/RichTextEditing-Core.package/RichTextExportStrategy.class/class/export.on..st new file mode 100644 index 0000000..32522c0 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextExportStrategy.class/class/export.on..st @@ -0,0 +1,5 @@ +export +export: aRichTextDocument on: aStream + "Subclasses overwrite this to specify how a text is exported" + + ^ self subclassResponsibility \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextExportStrategy.class/class/export.to..st b/packages/RichTextEditing-Core.package/RichTextExportStrategy.class/class/export.to..st index 1d94090..2816343 100644 --- a/packages/RichTextEditing-Core.package/RichTextExportStrategy.class/class/export.to..st +++ b/packages/RichTextEditing-Core.package/RichTextExportStrategy.class/class/export.to..st @@ -1,5 +1,7 @@ export export: aRichTextDocument to: aFilePath - "Subclasses implement this to specify how a text is exported" - ^ self subclassResponsibility \ No newline at end of file + | fileStream | + fileStream := StandardFileStream newFileNamed: aFilePath. + self export: aRichTextDocument on: fileStream. + fileStream close \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextExportStrategy.class/class/prepareExportFor..st b/packages/RichTextEditing-Core.package/RichTextExportStrategy.class/class/prepareExportFor..st new file mode 100644 index 0000000..2ef91a1 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextExportStrategy.class/class/prepareExportFor..st @@ -0,0 +1,5 @@ +export +prepareExportFor: aRichTextDocument + "Subclasses overwrite this to specify how a text is exported" + + self setTemplateFor: aRichTextDocument \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextExportStrategy.class/class/setTemplateFor..st b/packages/RichTextEditing-Core.package/RichTextExportStrategy.class/class/setTemplateFor..st new file mode 100644 index 0000000..673de34 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextExportStrategy.class/class/setTemplateFor..st @@ -0,0 +1,4 @@ +export +setTemplateFor: aRichTextDocument + + aRichTextDocument setNewTemplate: self template \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextExportStrategy.class/class/template.st b/packages/RichTextEditing-Core.package/RichTextExportStrategy.class/class/template.st new file mode 100644 index 0000000..a142b02 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextExportStrategy.class/class/template.st @@ -0,0 +1,5 @@ +export +template + "Use a template to first transform a document to a specific set of structures, then export" + + ^ self subclassResponsibility \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextExportStrategy.class/methodProperties.json b/packages/RichTextEditing-Core.package/RichTextExportStrategy.class/methodProperties.json index 0facc9b..df85759 100644 --- a/packages/RichTextEditing-Core.package/RichTextExportStrategy.class/methodProperties.json +++ b/packages/RichTextEditing-Core.package/RichTextExportStrategy.class/methodProperties.json @@ -1,7 +1,12 @@ { "class" : { - "export:to:" : "tok 7/3/2020 19:34", + "availableExportStrategies" : "JEH 7/26/2020 18:52", + "export:on:" : "frc 8/7/2020 12:09", + "export:to:" : "tok 8/7/2020 20:51", "fileEnding" : "tok 7/6/2020 14:33", - "label" : "tok 7/8/2020 16:42" }, + "label" : "tok 7/8/2020 16:42", + "prepareExportFor:" : "JEH 7/26/2020 18:14", + "setTemplateFor:" : "frc 7/30/2020 08:31", + "template" : "tok 8/7/2020 20:52" }, "instance" : { } } diff --git a/packages/RichTextEditing-Core.package/RichTextExportStrategy.class/properties.json b/packages/RichTextEditing-Core.package/RichTextExportStrategy.class/properties.json index fb846c0..34fce5a 100644 --- a/packages/RichTextEditing-Core.package/RichTextExportStrategy.class/properties.json +++ b/packages/RichTextEditing-Core.package/RichTextExportStrategy.class/properties.json @@ -4,7 +4,7 @@ ], "classvars" : [ ], - "commentStamp" : "", + "commentStamp" : "JEH 8/7/2020 15:56", "instvars" : [ ], "name" : "RichTextExportStrategy", diff --git a/packages/RichTextEditing-Core.package/TextExtendability.class/README.md b/packages/RichTextEditing-Core.package/RichTextExtendability.class/README.md similarity index 100% rename from packages/RichTextEditing-Core.package/TextExtendability.class/README.md rename to packages/RichTextEditing-Core.package/RichTextExtendability.class/README.md diff --git a/packages/RichTextEditing-Core.package/TextExtendability.class/class/no.st b/packages/RichTextEditing-Core.package/RichTextExtendability.class/class/no.st similarity index 100% rename from packages/RichTextEditing-Core.package/TextExtendability.class/class/no.st rename to packages/RichTextEditing-Core.package/RichTextExtendability.class/class/no.st diff --git a/packages/RichTextEditing-Core.package/TextExtendability.class/class/yes.st b/packages/RichTextEditing-Core.package/RichTextExtendability.class/class/yes.st similarity index 100% rename from packages/RichTextEditing-Core.package/TextExtendability.class/class/yes.st rename to packages/RichTextEditing-Core.package/RichTextExtendability.class/class/yes.st diff --git a/packages/RichTextEditing-Core.package/TextExtendability.class/instance/mayBeExtended..st b/packages/RichTextEditing-Core.package/RichTextExtendability.class/instance/mayBeExtended..st similarity index 100% rename from packages/RichTextEditing-Core.package/TextExtendability.class/instance/mayBeExtended..st rename to packages/RichTextEditing-Core.package/RichTextExtendability.class/instance/mayBeExtended..st diff --git a/packages/RichTextEditing-Core.package/TextExtendability.class/instance/mayBeExtended.st b/packages/RichTextEditing-Core.package/RichTextExtendability.class/instance/mayBeExtended.st similarity index 100% rename from packages/RichTextEditing-Core.package/TextExtendability.class/instance/mayBeExtended.st rename to packages/RichTextEditing-Core.package/RichTextExtendability.class/instance/mayBeExtended.st diff --git a/packages/RichTextEditing-Core.package/TextExtendability.class/methodProperties.json b/packages/RichTextEditing-Core.package/RichTextExtendability.class/methodProperties.json similarity index 100% rename from packages/RichTextEditing-Core.package/TextExtendability.class/methodProperties.json rename to packages/RichTextEditing-Core.package/RichTextExtendability.class/methodProperties.json diff --git a/packages/RichTextEditing-Core.package/TextExtendability.class/properties.json b/packages/RichTextEditing-Core.package/RichTextExtendability.class/properties.json similarity index 87% rename from packages/RichTextEditing-Core.package/TextExtendability.class/properties.json rename to packages/RichTextEditing-Core.package/RichTextExtendability.class/properties.json index 2a93d23..9defc2f 100644 --- a/packages/RichTextEditing-Core.package/TextExtendability.class/properties.json +++ b/packages/RichTextEditing-Core.package/RichTextExtendability.class/properties.json @@ -7,7 +7,7 @@ "commentStamp" : "kh 6/21/2020 16:41", "instvars" : [ "mayBeExtended" ], - "name" : "TextExtendability", + "name" : "RichTextExtendability", "pools" : [ ], "super" : "TextAttribute", diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/README.md b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/README.md new file mode 100644 index 0000000..8608e68 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/README.md @@ -0,0 +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 (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 diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/boldStructureEnclosingStrings.st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/boldStructureEnclosingStrings.st new file mode 100644 index 0000000..0860e37 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/boldStructureEnclosingStrings.st @@ -0,0 +1,4 @@ +special strings +boldStructureEnclosingStrings + + ^ {''. ''} \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/codeStructureEnclosingStrings.st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/codeStructureEnclosingStrings.st new file mode 100644 index 0000000..0df0d01 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/codeStructureEnclosingStrings.st @@ -0,0 +1,4 @@ +special strings +codeStructureEnclosingStrings + + ^ {''. ''} \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/event.contains..st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/event.contains..st new file mode 100644 index 0000000..ed5aba8 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/event.contains..st @@ -0,0 +1,4 @@ +utilities +event: aDocumentReadStreamEvent contains: aStopCondition + + ^ (aDocumentReadStreamEvent second) contains: [:each | each first = aStopCondition] \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/export.on..st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/export.on..st new file mode 100644 index 0000000..6a807ec --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/export.on..st @@ -0,0 +1,5 @@ +export +export: aRichTextDocument on: aStream + + super prepareExportFor: aRichTextDocument. + self new export: aRichTextDocument on: aStream \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/fileEnding.st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/fileEnding.st new file mode 100644 index 0000000..355e99f --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/fileEnding.st @@ -0,0 +1,4 @@ +export +fileEnding + + ^ '.html' \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/heading1StructureEnclosingStrings.st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/heading1StructureEnclosingStrings.st new file mode 100644 index 0000000..c5c99cd --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/heading1StructureEnclosingStrings.st @@ -0,0 +1,4 @@ +special strings +heading1StructureEnclosingStrings + + ^ {'

'. '

'} \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/heading2StructureEnclosingStrings.st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/heading2StructureEnclosingStrings.st new file mode 100644 index 0000000..f9e5954 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/heading2StructureEnclosingStrings.st @@ -0,0 +1,4 @@ +special strings +heading2StructureEnclosingStrings + + ^ {'

'. '

'} \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/heading3StructureEnclosingStrings.st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/heading3StructureEnclosingStrings.st new file mode 100644 index 0000000..4df8854 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/heading3StructureEnclosingStrings.st @@ -0,0 +1,4 @@ +special strings +heading3StructureEnclosingStrings + + ^ {'

'. '

'} \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/heading4StructureEnclosingStrings.st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/heading4StructureEnclosingStrings.st new file mode 100644 index 0000000..e17309e --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/heading4StructureEnclosingStrings.st @@ -0,0 +1,4 @@ +special strings +heading4StructureEnclosingStrings + + ^ {'

'. '

'} \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/italicStructureEnclosingStrings.st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/italicStructureEnclosingStrings.st new file mode 100644 index 0000000..b237abc --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/italicStructureEnclosingStrings.st @@ -0,0 +1,4 @@ +special strings +italicStructureEnclosingStrings + + ^ {''. ''} \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/label.st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/label.st new file mode 100644 index 0000000..64a66f7 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/label.st @@ -0,0 +1,4 @@ +export +label + + ^ #HTML \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/level1ListStructureEnclosingStrings.st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/level1ListStructureEnclosingStrings.st new file mode 100644 index 0000000..9cd912c --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/level1ListStructureEnclosingStrings.st @@ -0,0 +1,4 @@ +special strings +level1ListStructureEnclosingStrings + + ^ {''} \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/level2ListStructureEnclosingStrings.st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/level2ListStructureEnclosingStrings.st new file mode 100644 index 0000000..dce5b4f --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/level2ListStructureEnclosingStrings.st @@ -0,0 +1,4 @@ +special strings +level2ListStructureEnclosingStrings + + ^ {''} \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/level3ListStructureEnclosingStrings.st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/level3ListStructureEnclosingStrings.st new file mode 100644 index 0000000..2f65273 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/level3ListStructureEnclosingStrings.st @@ -0,0 +1,4 @@ +special strings +level3ListStructureEnclosingStrings + + ^ {''} \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/listMiddleString.st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/listMiddleString.st new file mode 100644 index 0000000..df195d0 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/listMiddleString.st @@ -0,0 +1,4 @@ +special strings +listMiddleString + + ^ '
  • ' \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/paragraphStructureEnclosingStrings.st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/paragraphStructureEnclosingStrings.st new file mode 100644 index 0000000..fe96500 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/paragraphStructureEnclosingStrings.st @@ -0,0 +1,4 @@ +special strings +paragraphStructureEnclosingStrings + + ^ {'

    '. '

    '} \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/quoteStructureEnclosingStrings.st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/quoteStructureEnclosingStrings.st new file mode 100644 index 0000000..666bec6 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/quoteStructureEnclosingStrings.st @@ -0,0 +1,4 @@ +special strings +quoteStructureEnclosingStrings + + ^ {'
    '. '
    '} \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/removeLastCharFrom..st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/removeLastCharFrom..st new file mode 100644 index 0000000..6c7f322 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/removeLastCharFrom..st @@ -0,0 +1,4 @@ +utilities +removeLastCharFrom: aText + + ^ aText copyFrom: 1 to: (aText size - 1) \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/template.st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/template.st new file mode 100644 index 0000000..28f5c1c --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/template.st @@ -0,0 +1,4 @@ +export +template + + ^ RichTextHTMLTemplate \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/underlinedStructureEnclosingStrings.st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/underlinedStructureEnclosingStrings.st new file mode 100644 index 0000000..afb8976 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/underlinedStructureEnclosingStrings.st @@ -0,0 +1,4 @@ +special strings +underlinedStructureEnclosingStrings + + ^ {''. ''} \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/urlStructureEnclosingStrings.st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/urlStructureEnclosingStrings.st new file mode 100644 index 0000000..daffed7 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/class/urlStructureEnclosingStrings.st @@ -0,0 +1,4 @@ +special strings +urlStructureEnclosingStrings + + ^ {''. ''} \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/addStructuresAsActive..st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/addStructuresAsActive..st new file mode 100644 index 0000000..8ba2d96 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/addStructuresAsActive..st @@ -0,0 +1,4 @@ +stop-condition-handling +addStructuresAsActive: aCollection + + self currentStructures: (self currentStructures, aCollection) \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/closingStrings.st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/closingStrings.st new file mode 100644 index 0000000..94c70d0 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/closingStrings.st @@ -0,0 +1,19 @@ +accessing +closingStrings + + closingStrings ifNil: [closingStrings := Dictionary newFrom: { + #bold -> self class boldStructureEnclosingStrings last. + #italic -> self class italicStructureEnclosingStrings last. + #heading1 -> self class heading1StructureEnclosingStrings last. + #heading2 -> self class heading2StructureEnclosingStrings last. + #heading3 -> self class heading3StructureEnclosingStrings last. + #heading4 -> self class heading4StructureEnclosingStrings last. + #listLevel1 -> self class level1ListStructureEnclosingStrings last. + #listLevel2 -> self class level2ListStructureEnclosingStrings last. + #listLevel3 -> self class level3ListStructureEnclosingStrings last. + #quote -> self class quoteStructureEnclosingStrings last. + #underlined -> self class underlinedStructureEnclosingStrings last. + #url -> self class urlStructureEnclosingStrings last. + #code -> self class codeStructureEnclosingStrings last. + #paragraph -> self class paragraphStructureEnclosingStrings last}]. + ^ closingStrings \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/currentStructures..st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/currentStructures..st new file mode 100644 index 0000000..4fd2166 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/currentStructures..st @@ -0,0 +1,4 @@ +accessing +currentStructures: anObject + + currentStructures := anObject \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/currentStructures.st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/currentStructures.st new file mode 100644 index 0000000..637286f --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/currentStructures.st @@ -0,0 +1,4 @@ +accessing +currentStructures + + ^ currentStructures \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/document..st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/document..st new file mode 100644 index 0000000..bcf6630 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/document..st @@ -0,0 +1,4 @@ +accessing +document: anObject + + document := anObject \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/document.st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/document.st new file mode 100644 index 0000000..c1594b6 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/document.st @@ -0,0 +1,4 @@ +accessing +document + + ^ document \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/endString.st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/endString.st new file mode 100644 index 0000000..dbff68d --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/endString.st @@ -0,0 +1,4 @@ +accessing +endString + + ^ '

    ' \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/eventHandlingDictionary.st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/eventHandlingDictionary.st new file mode 100644 index 0000000..7479e34 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/eventHandlingDictionary.st @@ -0,0 +1,12 @@ +stop-condition-handling +eventHandlingDictionary + + eventHandlingDictionary ifNil: [ + eventHandlingDictionary := Dictionary newFrom: { + #endOfDocument -> [:event | self handleEndOfDocument: event]. + #endOfStructure -> [:event | self handleEndOfStructure: event]. + #paragraph -> [:event | self handleParagraph: event]. + #lineFeed -> [:event | self handleLineFeed: event]. + #beginOfStructure -> [:event | self handleBeginningOfStructure: event]}]. + + ^ eventHandlingDictionary \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/export.on..st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/export.on..st new file mode 100644 index 0000000..96b9282 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/export.on..st @@ -0,0 +1,10 @@ +export +export: aRichTextDocument on: aStream + + self + document: aRichTextDocument; + fileStream: aStream; + put: self startString; + processDocument; + put: self endString; + saveFile \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/fileStream..st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/fileStream..st new file mode 100644 index 0000000..0332df2 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/fileStream..st @@ -0,0 +1,4 @@ +accessing +fileStream: anObject + + fileStream := anObject \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/fileStream.st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/fileStream.st new file mode 100644 index 0000000..4733ad3 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/fileStream.st @@ -0,0 +1,4 @@ +accessing +fileStream + + ^ fileStream \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/handleBeginningOfStructure..st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/handleBeginningOfStructure..st new file mode 100644 index 0000000..28c4674 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/handleBeginningOfStructure..st @@ -0,0 +1,5 @@ +stop-condition-handling +handleBeginningOfStructure: anEvent + + self putSpecialStrings: anEvent second with: self openingStrings. + self addStructuresAsActive: anEvent second \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/handleEndOfDocument..st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/handleEndOfDocument..st new file mode 100644 index 0000000..6e6c97e --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/handleEndOfDocument..st @@ -0,0 +1,4 @@ +stop-condition-handling +handleEndOfDocument: anEvent + + self putClosingStrings \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/handleEndOfStructure..st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/handleEndOfStructure..st new file mode 100644 index 0000000..9439643 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/handleEndOfStructure..st @@ -0,0 +1,10 @@ +stop-condition-handling +handleEndOfStructure: anEvent + + "If the ranges text structures are applied on overlap, it is neccessary to close ALL tags + before opening the remaining ones again, because otherwise you will not produce valid HTML." + + self + putClosingStrings; + removeStructuresFromActive: anEvent second; + putOpeningStrings \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/handleLineFeed..st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/handleLineFeed..st new file mode 100644 index 0000000..1f549c4 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/handleLineFeed..st @@ -0,0 +1,5 @@ +stop-condition-handling +handleLineFeed: anEvent + + self inList ifTrue: [^ self handleNewListItem]. + self put: self lineFeed \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/handleNewListItem.st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/handleNewListItem.st new file mode 100644 index 0000000..b8fb749 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/handleNewListItem.st @@ -0,0 +1,4 @@ +special handling +handleNewListItem + + self put: self class listMiddleString \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/handleNextEvent..st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/handleNextEvent..st new file mode 100644 index 0000000..8cbd871 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/handleNextEvent..st @@ -0,0 +1,6 @@ +stop-condition-handling +handleNextEvent: aDocumentReadStreamEvent + + self putTextForEvent: aDocumentReadStreamEvent. + (aDocumentReadStreamEvent second) do: [:each | + (self eventHandlingDictionary at: (each first)) value: each] \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/handleParagraph..st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/handleParagraph..st new file mode 100644 index 0000000..8ca1086 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/handleParagraph..st @@ -0,0 +1,9 @@ +stop-condition-handling +handleParagraph: anEvent + + self inList ifTrue: [^ self handleNewListItem]. + self + putClosingStrings; + put: self class paragraphStructureEnclosingStrings last; + put: self class paragraphStructureEnclosingStrings first; + putOpeningStrings \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/inList.st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/inList.st new file mode 100644 index 0000000..a70688e --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/inList.st @@ -0,0 +1,5 @@ +testing +inList + + ^ self currentStructures anySatisfy: [:each | + self listSymbols includes: each structureIdentifier] \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/initialize.st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/initialize.st new file mode 100644 index 0000000..b99e3e0 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/initialize.st @@ -0,0 +1,6 @@ +initialize-release +initialize + + super initialize. + self currentStructures: {} asOrderedCollection. + outputString := '' \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/lineFeed.st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/lineFeed.st new file mode 100644 index 0000000..9532668 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/lineFeed.st @@ -0,0 +1,4 @@ +accessing +lineFeed + + ^ '
    ' \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/listSymbols.st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/listSymbols.st new file mode 100644 index 0000000..ab42260 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/listSymbols.st @@ -0,0 +1,4 @@ +constants +listSymbols + + ^ #(listLevel1 listLevel2 listLevel3) \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/nextPutAll..st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/nextPutAll..st new file mode 100644 index 0000000..b23e287 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/nextPutAll..st @@ -0,0 +1,4 @@ +printing +nextPutAll: aText + + outputString := outputString, aText asString \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/openingStrings.st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/openingStrings.st new file mode 100644 index 0000000..39cc442 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/openingStrings.st @@ -0,0 +1,19 @@ +accessing +openingStrings + + openingStrings ifNil: [openingStrings := Dictionary newFrom: { + #bold -> self class boldStructureEnclosingStrings first. + #italic -> self class italicStructureEnclosingStrings first. + #heading1 -> self class heading1StructureEnclosingStrings first. + #heading2 -> self class heading2StructureEnclosingStrings first. + #heading3 -> self class heading3StructureEnclosingStrings first. + #heading4 -> self class heading4StructureEnclosingStrings first. + #listLevel1 -> self class level1ListStructureEnclosingStrings first. + #listLevel2 -> self class level2ListStructureEnclosingStrings first. + #listLevel3 -> self class level3ListStructureEnclosingStrings first. + #quote -> self class quoteStructureEnclosingStrings first. + #underlined -> self class underlinedStructureEnclosingStrings first. + #url -> self class urlStructureEnclosingStrings first. + #code -> self class codeStructureEnclosingStrings first. + #paragraph -> self class paragraphStructureEnclosingStrings first}]. + ^ openingStrings \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/outputString.st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/outputString.st new file mode 100644 index 0000000..0d6c15f --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/outputString.st @@ -0,0 +1,4 @@ +accessing +outputString + + ^ outputString \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/processDocument.st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/processDocument.st new file mode 100644 index 0000000..7e32a0e --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/processDocument.st @@ -0,0 +1,9 @@ +export +processDocument + + | readStream next | + readStream := RichTextDocumentReadStream on: self document. + next := readStream next. + [next notNil] whileTrue: [ + self handleNextEvent: next. + next := readStream next] \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/put..st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/put..st new file mode 100644 index 0000000..98ffec7 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/put..st @@ -0,0 +1,4 @@ +printing +put: aText + + self nextPutAll: aText asString \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/putClosingStrings.st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/putClosingStrings.st new file mode 100644 index 0000000..37dd3dc --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/putClosingStrings.st @@ -0,0 +1,4 @@ +printing +putClosingStrings + + self putSpecialStrings: (self currentStructures reversed) with: self closingStrings \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/putOpeningStrings.st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/putOpeningStrings.st new file mode 100644 index 0000000..5f3efc4 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/putOpeningStrings.st @@ -0,0 +1,4 @@ +printing +putOpeningStrings + + self putSpecialStrings: self currentStructures with: self openingStrings \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/putSpecialStrings.with..st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/putSpecialStrings.with..st new file mode 100644 index 0000000..dbd01e0 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/putSpecialStrings.with..st @@ -0,0 +1,6 @@ +printing +putSpecialStrings: aCollection with: aDictionary + + | string | + string := aCollection inject: '' into: [:a :b | a, (aDictionary at: b structureIdentifier)]. + self nextPutAll: string \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/putTextForEvent..st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/putTextForEvent..st new file mode 100644 index 0000000..91fda9f --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/putTextForEvent..st @@ -0,0 +1,11 @@ +printing +putTextForEvent: aDocumentReadStreamEvent + + | text | + text := aDocumentReadStreamEvent first. + (self class event: aDocumentReadStreamEvent contains: #paragraph) + ifTrue: [text := self class removeLastCharFrom: text]. + (self class event: aDocumentReadStreamEvent contains: #lineFeed) + ifTrue: [text := self class removeLastCharFrom: text]. + + self put: text diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/removeStructuresFromActive..st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/removeStructuresFromActive..st new file mode 100644 index 0000000..c36b737 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/removeStructuresFromActive..st @@ -0,0 +1,5 @@ +stop-condition-handling +removeStructuresFromActive: aCollection + + self currentStructures: (self currentStructures reject: [:each | + aCollection contains: [:any | any = each]]) \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/saveFile.st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/saveFile.st new file mode 100644 index 0000000..b239bb6 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/saveFile.st @@ -0,0 +1,5 @@ +export +saveFile + + self fileStream nextPutAll: self outputString. + self fileStream close \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/startString.st b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/startString.st new file mode 100644 index 0000000..0c83fef --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/instance/startString.st @@ -0,0 +1,4 @@ +accessing +startString + + ^ '

    ' \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/methodProperties.json b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/methodProperties.json new file mode 100644 index 0000000..f19e655 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/methodProperties.json @@ -0,0 +1,58 @@ +{ + "class" : { + "boldStructureEnclosingStrings" : "JEH 8/3/2020 14:36", + "codeStructureEnclosingStrings" : "JEH 8/3/2020 14:37", + "event:contains:" : "frc 8/7/2020 11:23", + "export:on:" : "frc 8/4/2020 14:26", + "fileEnding" : "JEH 7/26/2020 16:10", + "heading1StructureEnclosingStrings" : "JEH 8/3/2020 14:37", + "heading2StructureEnclosingStrings" : "JEH 8/3/2020 14:37", + "heading3StructureEnclosingStrings" : "JEH 8/3/2020 14:38", + "heading4StructureEnclosingStrings" : "JEH 8/3/2020 14:38", + "italicStructureEnclosingStrings" : "JEH 8/3/2020 14:38", + "label" : "JEH 7/26/2020 16:10", + "level1ListStructureEnclosingStrings" : "JEH 8/3/2020 14:38", + "level2ListStructureEnclosingStrings" : "JEH 8/3/2020 14:38", + "level3ListStructureEnclosingStrings" : "JEH 8/3/2020 14:38", + "listMiddleString" : "frc 8/1/2020 13:30", + "paragraphStructureEnclosingStrings" : "JEH 8/3/2020 14:38", + "quoteStructureEnclosingStrings" : "JEH 8/3/2020 14:39", + "removeLastCharFrom:" : "frc 8/7/2020 11:24", + "template" : "frc 8/1/2020 13:13", + "underlinedStructureEnclosingStrings" : "JEH 8/3/2020 14:39", + "urlStructureEnclosingStrings" : "JEH 8/3/2020 14:39" }, + "instance" : { + "addStructuresAsActive:" : "frc 7/30/2020 08:41", + "closingStrings" : "JEH 8/3/2020 14:41", + "currentStructures" : "frc 7/30/2020 08:42", + "currentStructures:" : "frc 7/30/2020 08:42", + "document" : "frc 7/30/2020 08:43", + "document:" : "frc 7/30/2020 08:43", + "endString" : "JEH 7/26/2020 17:39", + "eventHandlingDictionary" : "OS 8/7/2020 09:58", + "export:on:" : "tok 8/7/2020 20:43", + "fileStream" : "frc 7/30/2020 08:43", + "fileStream:" : "frc 7/30/2020 08:43", + "handleBeginningOfStructure:" : "JEH 7/26/2020 17:28", + "handleEndOfDocument:" : "JEH 7/26/2020 17:28", + "handleEndOfStructure:" : "tok 8/7/2020 20:44", + "handleLineFeed:" : "frc 8/1/2020 13:33", + "handleNewListItem" : "frc 8/1/2020 13:31", + "handleNextEvent:" : "frc 8/1/2020 13:08", + "handleParagraph:" : "tok 8/7/2020 20:44", + "inList" : "tok 8/7/2020 20:45", + "initialize" : "frc 8/1/2020 13:08", + "lineFeed" : "JEH 7/26/2020 16:32", + "listSymbols" : "frc 8/1/2020 13:23", + "nextPutAll:" : "JEH 7/26/2020 17:36", + "openingStrings" : "JEH 8/3/2020 14:42", + "outputString" : "frc 7/30/2020 08:43", + "processDocument" : "tok 8/7/2020 20:45", + "put:" : "JEH 7/26/2020 16:38", + "putClosingStrings" : "JEH 7/26/2020 16:27", + "putOpeningStrings" : "JEH 7/26/2020 16:27", + "putSpecialStrings:with:" : "tok 8/7/2020 20:45", + "putTextForEvent:" : "tok 8/7/2020 20:45", + "removeStructuresFromActive:" : "tok 8/7/2020 20:45", + "saveFile" : "JEH 7/26/2020 17:36", + "startString" : "JEH 7/26/2020 16:16" } } diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/properties.json b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/properties.json new file mode 100644 index 0000000..778ea37 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLExportStrategy.class/properties.json @@ -0,0 +1,20 @@ +{ + "category" : "RichTextEditing-Core", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "JEH 8/7/2020 17:24", + "instvars" : [ + "outputString", + "eventHandlingDictionary", + "currentStructures", + "document", + "fileStream", + "openingStrings", + "closingStrings" ], + "name" : "RichTextHTMLExportStrategy", + "pools" : [ + ], + "super" : "RichTextExportStrategy", + "type" : "normal" } diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLTemplate.class/README.md b/packages/RichTextEditing-Core.package/RichTextHTMLTemplate.class/README.md new file mode 100644 index 0000000..d3e0543 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLTemplate.class/README.md @@ -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 refers to the RichTextMarkdownTemplate, since the two formats contain similar structures. diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLTemplate.class/class/clearCachedDictionaries.st b/packages/RichTextEditing-Core.package/RichTextHTMLTemplate.class/class/clearCachedDictionaries.st new file mode 100644 index 0000000..0039442 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLTemplate.class/class/clearCachedDictionaries.st @@ -0,0 +1,4 @@ +resetting +clearCachedDictionaries + + textStructures := nil \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLTemplate.class/class/identifier.st b/packages/RichTextEditing-Core.package/RichTextHTMLTemplate.class/class/identifier.st new file mode 100644 index 0000000..a31c822 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLTemplate.class/class/identifier.st @@ -0,0 +1,4 @@ +accessing +identifier + + ^ #html \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLTemplate.class/class/initialTextStructures.st b/packages/RichTextEditing-Core.package/RichTextHTMLTemplate.class/class/initialTextStructures.st new file mode 100644 index 0000000..bf4312a --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLTemplate.class/class/initialTextStructures.st @@ -0,0 +1,4 @@ +accessing +initialTextStructures + + ^ RichTextMarkdownTemplate initialTextStructures \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLTemplate.class/class/textStructures.st b/packages/RichTextEditing-Core.package/RichTextHTMLTemplate.class/class/textStructures.st new file mode 100644 index 0000000..49a7a05 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLTemplate.class/class/textStructures.st @@ -0,0 +1,5 @@ +text structures +textStructures + + textStructures ifNil: [textStructures := self initialTextStructures]. + ^ textStructures \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLTemplate.class/methodProperties.json b/packages/RichTextEditing-Core.package/RichTextHTMLTemplate.class/methodProperties.json new file mode 100644 index 0000000..e21281a --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLTemplate.class/methodProperties.json @@ -0,0 +1,8 @@ +{ + "class" : { + "clearCachedDictionaries" : "JEH 7/26/2020 18:03", + "identifier" : "JEH 7/26/2020 18:03", + "initialTextStructures" : "JEH 7/26/2020 18:04", + "textStructures" : "JEH 7/26/2020 18:04" }, + "instance" : { + } } diff --git a/packages/RichTextEditing-Core.package/RichTextHTMLTemplate.class/properties.json b/packages/RichTextEditing-Core.package/RichTextHTMLTemplate.class/properties.json new file mode 100644 index 0000000..d5b82ce --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHTMLTemplate.class/properties.json @@ -0,0 +1,14 @@ +{ + "category" : "RichTextEditing-Core", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "tok 8/7/2020 21:02", + "instvars" : [ + ], + "name" : "RichTextHTMLTemplate", + "pools" : [ + ], + "super" : "RichTextStructureTemplate", + "type" : "normal" } diff --git a/packages/RichTextEditing-Core.package/RichTextHelp.class/README.md b/packages/RichTextEditing-Core.package/RichTextHelp.class/README.md new file mode 100644 index 0000000..2ae8715 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHelp.class/README.md @@ -0,0 +1,5 @@ +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 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. \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHelp.class/class/autocompletion.st b/packages/RichTextEditing-Core.package/RichTextHelp.class/class/autocompletion.st new file mode 100644 index 0000000..593b343 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHelp.class/class/autocompletion.st @@ -0,0 +1,12 @@ +pages +autocompletion + "This method was automatically generated. Edit it using:" + "SquidWordHelp edit: #autocompletion" + ^(HelpTopic + title: 'Autocompletion' + contents: +'Autocompletion in SquidWord can be toggled off by opening Squeaks Preference Browser (Tools > Preference Browser) and searching for ''SquidWord'' in the categories column. +There is an option called ''Word suggestions'' that can be turned off by making sure that ''enabled'' is not selected.!' readStream nextChunkText) + key: #autocompletion; + shouldStyle: false; + yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/SquidWordHelp.class/class/bookName.st b/packages/RichTextEditing-Core.package/RichTextHelp.class/class/bookName.st similarity index 100% rename from packages/RichTextEditing-Core.package/SquidWordHelp.class/class/bookName.st rename to packages/RichTextEditing-Core.package/RichTextHelp.class/class/bookName.st diff --git a/packages/RichTextEditing-Core.package/RichTextHelp.class/class/documentMenu.st b/packages/RichTextEditing-Core.package/RichTextHelp.class/class/documentMenu.st new file mode 100644 index 0000000..e30718f --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHelp.class/class/documentMenu.st @@ -0,0 +1,40 @@ +pages +documentMenu + "This method was automatically generated. Edit it using:" + "SquidWordHelp edit: #documentMenu" + ^(HelpTopic + title: 'Document Menu' + contents: +'Clicking on the Document button in SquidWorld will open the document menu. + +The following options will be present: + +New +Opens a new SquidWord editor with a new empty document. + +Save +Saves the current document inside Squeak into a RichTextDocument object (the document will not appear in your filesystem and only be available inside your image). Saving first is necessary for some operations, e.g. when exporting, the last saved state of the document will be exported. +Can also be triggered by pressing Ctrl-S. +This functionality is not set to automatically trigger Save as when no name is given. This is intended to allow opening documents which are not provided by SquidWord. Saving the document will thus transfer the changes to the document which might reside in another document store. + +Save as +Allows giving your document a name, so that it can be reopened later. Similar to Save, it only saves the document inside the image. Again, it is saved in it''s current state, so make sure to save temporary changes to the document prior to that. More specifically it saves the document inside the RichTextEditorSaver that acts as a document store here. + +Load +Allows reopening a document that is stored within the image (more specifically in the RichTextDocumentSaver) and given a name via Save as. Opening it in a new editor can also be achieved by sending the message openInEditor to it. + +Import from file +Allows opening a file that is stored on your filesystem. See the Export and Import section for more information on available strategies. + +Export as... +Allows exporting the currently loaded RichTextDocument in its last saved state to multiple formats, including plain text and HTML. + +Inspect Document +Triggers the Squeak inspect method on the currently loaded RichTextDocument. + +Document info +Opens a popup with some statistics about the currently loaded RichTextDocument.! +]style[(116 3 58 4 610 7 353 4 191 39 2 16 139 12 133 16 79 13 80),f1i,,f1i,,f1i,,f1i,,f1,,f1i,,f1i,,f1i,,f1i,!' readStream nextChunkText) + key: #documentMenu; + shouldStyle: false; + yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHelp.class/class/documentReadStream.st b/packages/RichTextEditing-Core.package/RichTextHelp.class/class/documentReadStream.st new file mode 100644 index 0000000..3ac4357 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHelp.class/class/documentReadStream.st @@ -0,0 +1,16 @@ +accessing +documentReadStream + "This method was automatically generated. Edit it using:" + "SquidWordHelp edit: #documentReadStream" + ^(HelpTopic + title: 'DocumentReadStream' + contents: +'The RichTextDocumentReadStream offers a scripting API for RichTextDocuments. + +A ReadStream can be opened on a document by calling the "on:" class side method. + +Calling "next" will then return the next bunch of text up to the next point where at least one stop condition (start or end of structure; line break or paragraph; end of document) is met. See the class comment of the RichTextDocumentReadStream for more information.! +]style[(425)f1!' readStream nextChunkText) + key: #documentReadStream; + shouldStyle: false; + yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/SquidWordHelp.class/class/editing.st b/packages/RichTextEditing-Core.package/RichTextHelp.class/class/editing.st similarity index 74% rename from packages/RichTextEditing-Core.package/SquidWordHelp.class/class/editing.st rename to packages/RichTextEditing-Core.package/RichTextHelp.class/class/editing.st index b04266c..95ccf21 100644 --- a/packages/RichTextEditing-Core.package/SquidWordHelp.class/class/editing.st +++ b/packages/RichTextEditing-Core.package/RichTextHelp.class/class/editing.st @@ -7,9 +7,14 @@ editing contents: 'In SquidWord, text can be divided into logical units. Paragraphs are used to structure the text into sections on a broad level and so-called "text structures" are used to assign certain meanings to particular parts of the text. +Paragraphs Pressing Enter inserts a Paragraph, pressing Shift-Enter insert a normal line break. The paragraph is visible by an increased line height. -Structures can be applied to portions of the text by selecting the particular text and selecting the structures from the list of available structures on the left-hand side or using the automatic shortcuts.!' readStream nextChunkText) +Structures +Structures can be applied to portions of the text by selecting the particular text and selecting the structures from the list of available structures on the left-hand side or using the automatic shortcuts. +They can also be completly customized with regards to emphasis, color, font and indentation. For more info on that see the page regarding the Structure Editor. +! +]style[(229 10 141 10 367),f1i,,f1i,!' readStream nextChunkText) key: #editing; shouldStyle: false; yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHelp.class/class/exportAndImport.st b/packages/RichTextEditing-Core.package/RichTextHelp.class/class/exportAndImport.st new file mode 100644 index 0000000..03b342c --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHelp.class/class/exportAndImport.st @@ -0,0 +1,38 @@ +pages +exportAndImport + "This method was automatically generated. Edit it using:" + "SquidWordHelp edit: #exportAndImport" + ^(HelpTopic + title: 'Export and Import' + contents: +'Export +SquidWord provides various ways of exporting your documents. + +Using the *Export as...* button under the *Document* tab, you can choose from the following export format. + +PlainText +This export strategy simply exports your written text without any structural elements like applied structures. The result is by default a .txt file. + +HTML +This export strategy allows you to export your written and structured text to a HTML format. To avoid any problems make sure that you use the predefined *html* structure template available in the structure editor. If for whatever reason you choose to not use the predefined template, SquidWord will try to translate your structures but there is no guarantee this will work. To achieve this, all applied structures are first converted to matching structures in the respective template by name lookup. All structures for which no matching structure exists in the template are discarded. +The result is by default a .html file that can be viewed e.g. in your browser. + +Markdown +This export strategy is currently just like the HTML export strategy with the sole difference that it exports your file to a .md file. The reason is that such HTML file is valid Markdown and that Markdown provides much less functionality using it''s integrated formatting options than rich text. Therefore, converting to Markdown syntax produces some quite nasty edge cases (beware leading and trailing spaces and nested structures!!). Nevertheless, there might be an export to ''real'' Markdown in the future. + +Object +This export strategy allows you to export the RichTextDocument squeak object in a standard serialized format. Using this you can import the object e.g. in another Squeak image to transfer the structure on a 1:1 mapping (other than the other export strategies). This exports custom created structures as well. + +Import +SquidWord provides various ways of exporting your documents. + +Import as PlainText +When importing any file as PlainText, SquidWord will read its contents as plain text and use them as the content for your document. + +Import as Object +SquidWord provides the ability to import a RichTextDocument object. This will import the document (e.g. previously exported using the Object export strategy) on a 1:1 mapping, i.e. restoring all of its attributes like the text, structure and lastSaveDate. +! +]style[(6 171 10 150 5 374 210 81 9 508 6 311 7 60 22 133 17 256)i,f1,f1i,f1,f1i,f1,,f1,f1i,f1,f1i,f1,i,f1,i,f1,i,f1!' readStream nextChunkText) + key: #exportAndImport; + shouldStyle: false; + yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHelp.class/class/keyboardShortcuts.st b/packages/RichTextEditing-Core.package/RichTextHelp.class/class/keyboardShortcuts.st new file mode 100644 index 0000000..e4ce467 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHelp.class/class/keyboardShortcuts.st @@ -0,0 +1,22 @@ +pages +keyboardShortcuts + "This method was automatically generated. Edit it using:" + "SquidWordHelp edit: #keyboardShortcuts" + ^(HelpTopic + title: 'Keyboard Shortcuts' + contents: +'Structuring +Ctrl-Shift-[1,2,...,0] toggle 1st, 2nd, ... or 10th structure from the top of the structure list +The default settings work only for an american keyboard layout. Nevertheless you can change the structure keymap by visiting the SquidWord category in the Preference Browser and changing the Structure keyboard shortcuts to something that matches your layout. Be warned that not all keys will work, as some shortcuts are already in use by Squeak. + +Editing +Shift-Enter insert normal line break +Ctrl-z Undo last change +Ctrl-Shift-z Redo last change + +Document management +Ctrl-s save current document! +]style[(11 289 28 128 7 96 19 32)f1i,f1,,f1,f1i,f1,f1i,f1!' readStream nextChunkText) + key: #keyboardShortcuts; + shouldStyle: false; + yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHelp.class/class/menuStructure.st b/packages/RichTextEditing-Core.package/RichTextHelp.class/class/menuStructure.st new file mode 100644 index 0000000..561dba4 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHelp.class/class/menuStructure.st @@ -0,0 +1,35 @@ +pages +menuStructure + "This method was automatically generated. Edit it using:" + "SquidWordHelp edit: #menuStructure" + ^(HelpTopic + title: 'Menu Structure' + contents: +'You can access all important functionalities from the SquidWord menu bar, which will be described in the following. You can also access some more text-focused features like find and replace by clicking the right mouse button when hovering over the text. + +The menu of SquidWord is divided into the following components. + +Document +This contains functionalities regarding the document itself. See the Document Menu help page for more details. + New - Open a new SquidWord with a new document + Save - Save the current document + Save as... - Save with a name + Load - Load a document from image + Import from file - Import text from a file (see Export and Import) + Export as... - Export to a specific format (see Export and Import) + Inspect document - Open the Squeak inspector on the document object + Document info - Show info on the document like word count, amount of total and non-blank characters + +Edit +This contains functionalities regarding editing the text. + Undo - Undo the last changes like typed text or applied/unapplied structures + Redo - Same as undo, just the other way + Structures - Open the structure editor + Template - Open the templates chooser (currently same as Structures) + +Help +Show this help browser! +]style[(320 9 567 5 289 5 22),f1i,,f1i,,f1i,!' readStream nextChunkText) + key: #menuStructure; + shouldStyle: false; + yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHelp.class/class/pages.st b/packages/RichTextEditing-Core.package/RichTextHelp.class/class/pages.st new file mode 100644 index 0000000..094abb6 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHelp.class/class/pages.st @@ -0,0 +1,4 @@ +accessing +pages + + ^ #(welcome menuStructure documentMenu editing structureEditor keyboardShortcuts exportAndImport autocompletion documentReadStream) \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextHelp.class/class/structureEditor.st b/packages/RichTextEditing-Core.package/RichTextHelp.class/class/structureEditor.st new file mode 100644 index 0000000..cbbd99e --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHelp.class/class/structureEditor.st @@ -0,0 +1,24 @@ +pages +structureEditor + "This method was automatically generated. Edit it using:" + "SquidWordHelp edit: #structureEditor" + ^(HelpTopic + title: 'Structure Editor' + contents: +'SquidWord allows you to customize structures and their styles per document using the Structure Editor. + +You can launch the Structure Editor by clicking on the "Manage Structures" button in the bottom left corner of a SquidWord instance. + +Here you can modify the way the structures are displayed (font, text color, text attributes like bold and italic) by first selecting the structure you want to modify in the second column on the left and then setting the style for that structure on the right. A preview of the currently selected structure applied to some text is shown in the bottom right. + +Using the "+" and "-" buttons you can create additional structures or remove existing ones. + +Using the "Up" and "Down" buttons you can rearrange the structures in the list. Attributes like color of structures at the top of the list take priority over the same attributes with different values lower in the list if multiple structures are applied to the same text. The order of the structures in the main editor is the same as the order in the structure editor and affects the shortcuts for text structures (see "Keyboard Shortcuts"). + +Additionally, you can select a new styles template for your text. +Selecting a template in the list to the left column and then clicking the "Accept Template" button in the bottom left hand corner (and the "Select template" button in the appearing confirmation window) will replace the currently configured structures with the ones that are predifined for that template. The formatting of the current document will be converted, as long as matching structures can be found in the new template. +Note that, after a template has been selected, changes to the appearing structures won''t be saved back to the template and are specific to the document you are editing.! +]style[(123 16 968 19 4 661)f1,,f1,,f1,!' readStream nextChunkText) + key: #structureEditor; + shouldStyle: false; + yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/SquidWordHelp.class/class/welcome.st b/packages/RichTextEditing-Core.package/RichTextHelp.class/class/welcome.st similarity index 100% rename from packages/RichTextEditing-Core.package/SquidWordHelp.class/class/welcome.st rename to packages/RichTextEditing-Core.package/RichTextHelp.class/class/welcome.st diff --git a/packages/RichTextEditing-Core.package/RichTextHelp.class/methodProperties.json b/packages/RichTextEditing-Core.package/RichTextHelp.class/methodProperties.json new file mode 100644 index 0000000..c7894cb --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextHelp.class/methodProperties.json @@ -0,0 +1,15 @@ +{ + "class" : { + "autocompletion" : "OS 8/7/2020 12:56", + "bookName" : "kh 5/25/2020 16:31", + "documentMenu" : "tok 8/7/2020 12:08", + "documentReadStream" : "tok 8/7/2020 12:21", + "editing" : "tok 8/6/2020 15:34", + "exportAndImport" : "tok 8/7/2020 12:20", + "keyboardShortcuts" : "OS 8/7/2020 12:52", + "menuStructure" : "OS 8/7/2020 12:46", + "pages" : "JEH 8/7/2020 10:18", + "structureEditor" : "tok 8/7/2020 12:13", + "welcome" : "kh 5/25/2020 18:11" }, + "instance" : { + } } diff --git a/packages/RichTextEditing-Core.package/SquidWordHelp.class/properties.json b/packages/RichTextEditing-Core.package/RichTextHelp.class/properties.json similarity index 72% rename from packages/RichTextEditing-Core.package/SquidWordHelp.class/properties.json rename to packages/RichTextEditing-Core.package/RichTextHelp.class/properties.json index bcd6a72..baa6d75 100644 --- a/packages/RichTextEditing-Core.package/SquidWordHelp.class/properties.json +++ b/packages/RichTextEditing-Core.package/RichTextHelp.class/properties.json @@ -4,10 +4,10 @@ ], "classvars" : [ ], - "commentStamp" : "kh 6/1/2020 13:43", + "commentStamp" : "JEH 8/7/2020 17:09", "instvars" : [ ], - "name" : "SquidWordHelp", + "name" : "RichTextHelp", "pools" : [ ], "super" : "CustomHelp", diff --git a/packages/RichTextEditing-Core.package/RichTextMarkdownExportStrategy.class/README.md b/packages/RichTextEditing-Core.package/RichTextMarkdownExportStrategy.class/README.md new file mode 100644 index 0000000..674e501 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextMarkdownExportStrategy.class/README.md @@ -0,0 +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. + +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 \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextMarkdownExportStrategy.class/class/export.on..st b/packages/RichTextEditing-Core.package/RichTextMarkdownExportStrategy.class/class/export.on..st new file mode 100644 index 0000000..d23c247 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextMarkdownExportStrategy.class/class/export.on..st @@ -0,0 +1,8 @@ +export +export: aRichTextDocument on: aStream + "Markdown does not allow a proper representation of the structures and is not well defined. That's why the implementation of Markdown export is handled with an HTML export. This will also create valid Markdown." + + | document | + document := aRichTextDocument copy. + super prepareExportFor: document. + RichTextHTMLExportStrategy new export: document on: aStream \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextMarkdownExportStrategy.class/class/fileEnding.st b/packages/RichTextEditing-Core.package/RichTextMarkdownExportStrategy.class/class/fileEnding.st new file mode 100644 index 0000000..c05ca43 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextMarkdownExportStrategy.class/class/fileEnding.st @@ -0,0 +1,4 @@ +export +fileEnding + + ^ '.md' \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextMarkdownExportStrategy.class/class/label.st b/packages/RichTextEditing-Core.package/RichTextMarkdownExportStrategy.class/class/label.st new file mode 100644 index 0000000..b17d80a --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextMarkdownExportStrategy.class/class/label.st @@ -0,0 +1,4 @@ +export +label + + ^ #Markdown \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/newTemplate.st b/packages/RichTextEditing-Core.package/RichTextMarkdownExportStrategy.class/class/template.st similarity index 56% rename from packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/newTemplate.st rename to packages/RichTextEditing-Core.package/RichTextMarkdownExportStrategy.class/class/template.st index e9e8b32..226be81 100644 --- a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/newTemplate.st +++ b/packages/RichTextEditing-Core.package/RichTextMarkdownExportStrategy.class/class/template.st @@ -1,4 +1,4 @@ -utilities -newTemplate +export +template ^ RichTextMarkdownTemplate \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextMarkdownExportStrategy.class/methodProperties.json b/packages/RichTextEditing-Core.package/RichTextMarkdownExportStrategy.class/methodProperties.json new file mode 100644 index 0000000..94f9d26 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextMarkdownExportStrategy.class/methodProperties.json @@ -0,0 +1,8 @@ +{ + "class" : { + "export:on:" : "tok 8/7/2020 20:52", + "fileEnding" : "JEH 7/26/2020 17:58", + "label" : "JEH 7/26/2020 17:58", + "template" : "JEH 7/26/2020 18:12" }, + "instance" : { + } } diff --git a/packages/RichTextEditing-Core.package/RichTextMarkdownExportStrategy.class/properties.json b/packages/RichTextEditing-Core.package/RichTextMarkdownExportStrategy.class/properties.json new file mode 100644 index 0000000..6f6a46c --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextMarkdownExportStrategy.class/properties.json @@ -0,0 +1,14 @@ +{ + "category" : "RichTextEditing-Core", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "JEH 8/7/2020 16:57", + "instvars" : [ + ], + "name" : "RichTextMarkdownExportStrategy", + "pools" : [ + ], + "super" : "RichTextExportStrategy", + "type" : "normal" } diff --git a/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/README.md b/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/README.md index c06bce4..6b4ec97 100644 --- a/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/README.md +++ b/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/README.md @@ -1,3 +1,4 @@ I am a RichTextMarkdownTemplate. I specify structures that can be used to style the text in a markdown-like formatting. + diff --git a/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/clearCachedDictionaries.st b/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/clearCachedDictionaries.st new file mode 100644 index 0000000..0039442 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/clearCachedDictionaries.st @@ -0,0 +1,4 @@ +resetting +clearCachedDictionaries + + textStructures := nil \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialBoldStructure.st b/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialBoldStructure.st index 9fbf94b..26dbfa9 100644 --- a/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialBoldStructure.st +++ b/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialBoldStructure.st @@ -1,6 +1,4 @@ initial structures initialBoldStructure - ^ TextStructure - new: #bold - from: {TextStructure bold} \ No newline at end of file + ^ RichTextStructure bold \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialCodeStructure.st b/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialCodeStructure.st index 5a006fd..8ce5748 100644 --- a/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialCodeStructure.st +++ b/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialCodeStructure.st @@ -1,6 +1,8 @@ initial structures initialCodeStructure - ^ TextStructure + ^ RichTextStructure new: #code - from: {TextStructure fromColor: (Color r: 0.93 g: 0.745 b: 0.142). TextStructure fromFont: ((TextStyle named: #BitstreamVeraSansMono) fontOfPointSize: 12)} \ No newline at end of file + from: {RichTextStructure fromColor: (Color r: 0.93 g: 0.745 b: 0.142). + RichTextStructure fromFont: + ((TextStyle named: #BitstreamVeraSansMono) fontOfPointSize: 12)} \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialFootnoteStructure.st b/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialFootnoteStructure.st deleted file mode 100644 index 6ee23a8..0000000 --- a/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialFootnoteStructure.st +++ /dev/null @@ -1,6 +0,0 @@ -initial structures -initialFootnoteStructure - - ^ TextStructure - new: #footnote - from: {TextStructure fromFont: (StrikeFont createDejaVuDark: 9)} \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialHeading1Structure.st b/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialHeading1Structure.st index b8b2bbb..91abdf1 100644 --- a/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialHeading1Structure.st +++ b/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialHeading1Structure.st @@ -1,6 +1,7 @@ initial structures initialHeading1Structure - ^ TextStructure + ^ RichTextStructure new: #heading1 - from: {TextStructure fromFont: (StrikeFont createDejaVuDark: 20). TextStructure bold} \ No newline at end of file + from: {RichTextStructure fromFont: (StrikeFont createDejaVuDark: 20). + RichTextStructure bold} \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialHeading2Structure.st b/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialHeading2Structure.st index 0cd5f1d..6e9ab13 100644 --- a/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialHeading2Structure.st +++ b/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialHeading2Structure.st @@ -1,6 +1,7 @@ initial structures initialHeading2Structure - ^ TextStructure + ^ RichTextStructure new: #heading2 - from: {TextStructure fromFont: (StrikeFont createDejaVuDark: 17). TextStructure bold} \ No newline at end of file + from: {RichTextStructure fromFont: (StrikeFont createDejaVuDark: 17). + RichTextStructure bold} \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialHeading3Structure.st b/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialHeading3Structure.st index 7884cdb..6b05c78 100644 --- a/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialHeading3Structure.st +++ b/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialHeading3Structure.st @@ -1,6 +1,7 @@ initial structures initialHeading3Structure - ^ TextStructure + ^ RichTextStructure new: #heading3 - from: {TextStructure fromFont: (StrikeFont createDejaVuDark: 14). TextStructure bold} \ No newline at end of file + from: {RichTextStructure fromFont: (StrikeFont createDejaVuDark: 14). + RichTextStructure bold} \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialHeading4Structure.st b/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialHeading4Structure.st index 36d36ad..fd2e5f5 100644 --- a/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialHeading4Structure.st +++ b/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialHeading4Structure.st @@ -1,6 +1,7 @@ initial structures initialHeading4Structure - ^ TextStructure + ^ RichTextStructure new: #heading4 - from: {TextStructure fromFont: (StrikeFont createDejaVuDark: 12). TextStructure bold} \ No newline at end of file + from: {RichTextStructure fromFont: (StrikeFont createDejaVuDark: 12). + RichTextStructure bold} \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialItalicStructure.st b/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialItalicStructure.st index d774a22..3dffd4a 100644 --- a/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialItalicStructure.st +++ b/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialItalicStructure.st @@ -1,6 +1,4 @@ initial structures initialItalicStructure - ^ TextStructure - new: #italic - from: {TextStructure italic} \ No newline at end of file + ^ RichTextStructure italic \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialLevel1ListStructure.st b/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialLevel1ListStructure.st index 4aa9f17..e40e391 100644 --- a/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialLevel1ListStructure.st +++ b/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialLevel1ListStructure.st @@ -1,6 +1,6 @@ initial structures initialLevel1ListStructure - ^ TextStructure + ^ RichTextStructure new: #listLevel1 - from: {TextStructure indentedBy: 1} \ No newline at end of file + from: {RichTextStructure indentedBy: 1} \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialLevel2ListStructure.st b/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialLevel2ListStructure.st index 31056ad..ffd31c9 100644 --- a/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialLevel2ListStructure.st +++ b/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialLevel2ListStructure.st @@ -1,6 +1,6 @@ initial structures initialLevel2ListStructure - ^ TextStructure + ^ RichTextStructure new: #listLevel2 - from: {TextStructure listOnLevel: 2} \ No newline at end of file + from: {RichTextStructure listOnLevel: 2} \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialLevel3ListStructure.st b/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialLevel3ListStructure.st index af6e40d..b4d4845 100644 --- a/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialLevel3ListStructure.st +++ b/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialLevel3ListStructure.st @@ -1,6 +1,6 @@ initial structures initialLevel3ListStructure - ^ TextStructure + ^ RichTextStructure new: #listLevel3 - from: {TextStructure listOnLevel: 3} \ No newline at end of file + from: {RichTextStructure listOnLevel: 3} \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialQuoteStructure.st b/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialQuoteStructure.st index c178809..495f95b 100644 --- a/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialQuoteStructure.st +++ b/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialQuoteStructure.st @@ -1,6 +1,7 @@ initial structures initialQuoteStructure - ^ TextStructure + ^ RichTextStructure new: #quote - from: {TextStructure fromColor: (Color veryLightGray). TextStructure listOnLevel: 1} \ No newline at end of file + from: {RichTextStructure fromColor: (Color veryLightGray). + RichTextStructure listOnLevel: 1} \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialTextStructures.st b/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialTextStructures.st index 8786fea..4612062 100644 --- a/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialTextStructures.st +++ b/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialTextStructures.st @@ -10,7 +10,6 @@ initialTextStructures self initialHeading2Structure. self initialHeading3Structure. self initialHeading4Structure. - self initialFootnoteStructure. self initialLevel1ListStructure. self initialLevel2ListStructure. self initialLevel3ListStructure. diff --git a/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialURLStructure.st b/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialURLStructure.st index 99ec8ff..1da80e9 100644 --- a/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialURLStructure.st +++ b/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialURLStructure.st @@ -1,6 +1,8 @@ initial structures initialURLStructure - ^ TextStructure + ^ RichTextStructure new: #url - from: {TextStructure autohyperlink. TextStructure underlined. TextStructure notExtendable} \ No newline at end of file + from: {RichTextStructure autohyperlink. + RichTextStructure underlined. + RichTextStructure notExtendable} \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialUnderlinedStructure.st b/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialUnderlinedStructure.st index 789b1be..eb2a1d0 100644 --- a/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialUnderlinedStructure.st +++ b/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/initialUnderlinedStructure.st @@ -1,6 +1,4 @@ initial structures initialUnderlinedStructure - ^ TextStructure - new: #underlined - from: {TextStructure underlined} \ No newline at end of file + ^ RichTextStructure underlined \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/textStructures.st b/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/textStructures.st new file mode 100644 index 0000000..49a7a05 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/class/textStructures.st @@ -0,0 +1,5 @@ +text structures +textStructures + + textStructures ifNil: [textStructures := self initialTextStructures]. + ^ textStructures \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/methodProperties.json b/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/methodProperties.json index f8b84bd..cc10fc9 100644 --- a/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/methodProperties.json +++ b/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/methodProperties.json @@ -1,20 +1,21 @@ { "class" : { + "clearCachedDictionaries" : "JEH 7/25/2020 20:06", "identifier" : "JEH 7/4/2020 11:26", - "initialBoldStructure" : "JEH 7/4/2020 11:15", - "initialCodeStructure" : "JEH 7/4/2020 12:20", - "initialFootnoteStructure" : "JEH 7/4/2020 11:15", - "initialHeading1Structure" : "JEH 7/4/2020 11:15", - "initialHeading2Structure" : "JEH 7/4/2020 11:15", - "initialHeading3Structure" : "JEH 7/4/2020 11:15", - "initialHeading4Structure" : "JEH 7/4/2020 11:58", - "initialItalicStructure" : "JEH 7/4/2020 11:16", - "initialLevel1ListStructure" : "JEH 7/4/2020 12:23", - "initialLevel2ListStructure" : "JEH 7/4/2020 12:03", - "initialLevel3ListStructure" : "JEH 7/4/2020 12:03", - "initialQuoteStructure" : "JEH 7/4/2020 12:35", - "initialTextStructures" : "JEH 7/4/2020 12:32", - "initialURLStructure" : "JEH 7/4/2020 11:16", - "initialUnderlinedStructure" : "JEH 7/4/2020 11:16" }, + "initialBoldStructure" : "tok 8/7/2020 15:51", + "initialCodeStructure" : "tok 8/7/2020 20:58", + "initialHeading1Structure" : "tok 8/7/2020 20:58", + "initialHeading2Structure" : "tok 8/7/2020 20:58", + "initialHeading3Structure" : "tok 8/7/2020 20:58", + "initialHeading4Structure" : "tok 8/7/2020 20:58", + "initialItalicStructure" : "tok 8/7/2020 15:52", + "initialLevel1ListStructure" : "tok 8/7/2020 15:52", + "initialLevel2ListStructure" : "tok 8/7/2020 15:52", + "initialLevel3ListStructure" : "tok 8/7/2020 15:52", + "initialQuoteStructure" : "tok 8/7/2020 20:58", + "initialTextStructures" : "JEH 7/25/2020 18:59", + "initialURLStructure" : "tok 8/7/2020 20:58", + "initialUnderlinedStructure" : "tok 8/7/2020 15:52", + "textStructures" : "frc 7/15/2020 18:31" }, "instance" : { } } diff --git a/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/properties.json b/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/properties.json index 5e392d2..8e3ce44 100644 --- a/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/properties.json +++ b/packages/RichTextEditing-Core.package/RichTextMarkdownTemplate.class/properties.json @@ -4,7 +4,7 @@ ], "classvars" : [ ], - "commentStamp" : "JEH 7/10/2020 15:08", + "commentStamp" : "tok 8/7/2020 21:04", "instvars" : [ ], "name" : "RichTextMarkdownTemplate", diff --git a/packages/RichTextEditing-Core.package/NullTextStructure.class/README.md b/packages/RichTextEditing-Core.package/RichTextNullStructure.class/README.md similarity index 100% rename from packages/RichTextEditing-Core.package/NullTextStructure.class/README.md rename to packages/RichTextEditing-Core.package/RichTextNullStructure.class/README.md diff --git a/packages/RichTextEditing-Core.package/NullTextStructure.class/class/warningText.st b/packages/RichTextEditing-Core.package/RichTextNullStructure.class/class/warningText.st similarity index 100% rename from packages/RichTextEditing-Core.package/NullTextStructure.class/class/warningText.st rename to packages/RichTextEditing-Core.package/RichTextNullStructure.class/class/warningText.st diff --git a/packages/RichTextEditing-Core.package/NullTextStructure.class/instance/add..st b/packages/RichTextEditing-Core.package/RichTextNullStructure.class/instance/add..st similarity index 100% rename from packages/RichTextEditing-Core.package/NullTextStructure.class/instance/add..st rename to packages/RichTextEditing-Core.package/RichTextNullStructure.class/instance/add..st diff --git a/packages/RichTextEditing-Core.package/NullTextStructure.class/instance/includes..st b/packages/RichTextEditing-Core.package/RichTextNullStructure.class/instance/includes..st similarity index 100% rename from packages/RichTextEditing-Core.package/NullTextStructure.class/instance/includes..st rename to packages/RichTextEditing-Core.package/RichTextNullStructure.class/instance/includes..st diff --git a/packages/RichTextEditing-Core.package/RichTextNullStructure.class/instance/isNullObject.st b/packages/RichTextEditing-Core.package/RichTextNullStructure.class/instance/isNullObject.st new file mode 100644 index 0000000..f37fbfa --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextNullStructure.class/instance/isNullObject.st @@ -0,0 +1,4 @@ +testing +isNullObject + + ^ true \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/NullTextStructure.class/instance/noCurrentStructureWarning.st b/packages/RichTextEditing-Core.package/RichTextNullStructure.class/instance/noCurrentStructureWarning.st similarity index 100% rename from packages/RichTextEditing-Core.package/NullTextStructure.class/instance/noCurrentStructureWarning.st rename to packages/RichTextEditing-Core.package/RichTextNullStructure.class/instance/noCurrentStructureWarning.st diff --git a/packages/RichTextEditing-Core.package/NullTextStructure.class/instance/openColorPicker.st b/packages/RichTextEditing-Core.package/RichTextNullStructure.class/instance/openColorPicker.st similarity index 100% rename from packages/RichTextEditing-Core.package/NullTextStructure.class/instance/openColorPicker.st rename to packages/RichTextEditing-Core.package/RichTextNullStructure.class/instance/openColorPicker.st diff --git a/packages/RichTextEditing-Core.package/NullTextStructure.class/instance/openFontChooser.st b/packages/RichTextEditing-Core.package/RichTextNullStructure.class/instance/openFontChooser.st similarity index 100% rename from packages/RichTextEditing-Core.package/NullTextStructure.class/instance/openFontChooser.st rename to packages/RichTextEditing-Core.package/RichTextNullStructure.class/instance/openFontChooser.st diff --git a/packages/RichTextEditing-Core.package/NullTextStructure.class/instance/remove..st b/packages/RichTextEditing-Core.package/RichTextNullStructure.class/instance/remove..st similarity index 100% rename from packages/RichTextEditing-Core.package/NullTextStructure.class/instance/remove..st rename to packages/RichTextEditing-Core.package/RichTextNullStructure.class/instance/remove..st diff --git a/packages/RichTextEditing-Core.package/NullTextStructure.class/instance/resetColorOfCurrentStructure.st b/packages/RichTextEditing-Core.package/RichTextNullStructure.class/instance/resetColor.st similarity index 56% rename from packages/RichTextEditing-Core.package/NullTextStructure.class/instance/resetColorOfCurrentStructure.st rename to packages/RichTextEditing-Core.package/RichTextNullStructure.class/instance/resetColor.st index 5d1f15d..8acf107 100644 --- a/packages/RichTextEditing-Core.package/NullTextStructure.class/instance/resetColorOfCurrentStructure.st +++ b/packages/RichTextEditing-Core.package/RichTextNullStructure.class/instance/resetColor.st @@ -1,4 +1,4 @@ color -resetColorOfCurrentStructure +resetColor self noCurrentStructureWarning \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/NullTextStructure.class/instance/resetFontOfCurrentStructure.st b/packages/RichTextEditing-Core.package/RichTextNullStructure.class/instance/resetFont.st similarity index 56% rename from packages/RichTextEditing-Core.package/NullTextStructure.class/instance/resetFontOfCurrentStructure.st rename to packages/RichTextEditing-Core.package/RichTextNullStructure.class/instance/resetFont.st index f84dcac..ec99f1b 100644 --- a/packages/RichTextEditing-Core.package/NullTextStructure.class/instance/resetFontOfCurrentStructure.st +++ b/packages/RichTextEditing-Core.package/RichTextNullStructure.class/instance/resetFont.st @@ -1,4 +1,4 @@ font -resetFontOfCurrentStructure +resetFont self noCurrentStructureWarning \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/NullTextStructure.class/instance/structureIdentifier..st b/packages/RichTextEditing-Core.package/RichTextNullStructure.class/instance/structureIdentifier..st similarity index 100% rename from packages/RichTextEditing-Core.package/NullTextStructure.class/instance/structureIdentifier..st rename to packages/RichTextEditing-Core.package/RichTextNullStructure.class/instance/structureIdentifier..st diff --git a/packages/RichTextEditing-Core.package/NullTextStructure.class/instance/structureIdentifier.st b/packages/RichTextEditing-Core.package/RichTextNullStructure.class/instance/structureIdentifier.st similarity index 100% rename from packages/RichTextEditing-Core.package/NullTextStructure.class/instance/structureIdentifier.st rename to packages/RichTextEditing-Core.package/RichTextNullStructure.class/instance/structureIdentifier.st diff --git a/packages/RichTextEditing-Core.package/NullTextStructure.class/methodProperties.json b/packages/RichTextEditing-Core.package/RichTextNullStructure.class/methodProperties.json similarity index 77% rename from packages/RichTextEditing-Core.package/NullTextStructure.class/methodProperties.json rename to packages/RichTextEditing-Core.package/RichTextNullStructure.class/methodProperties.json index 0e01bde..466d031 100644 --- a/packages/RichTextEditing-Core.package/NullTextStructure.class/methodProperties.json +++ b/packages/RichTextEditing-Core.package/RichTextNullStructure.class/methodProperties.json @@ -4,11 +4,12 @@ "instance" : { "add:" : "kh 6/18/2020 21:24", "includes:" : "kh 6/18/2020 21:25", + "isNullObject" : "frc 7/30/2020 11:10", "noCurrentStructureWarning" : "tok 6/12/2020 12:41", "openColorPicker" : "ls 7/24/2019 21:54", "openFontChooser" : "ls 7/24/2019 21:22", "remove:" : "kh 6/18/2020 21:24", - "resetColorOfCurrentStructure" : "kh 6/19/2020 18:05", - "resetFontOfCurrentStructure" : "kh 6/19/2020 18:07", + "resetColor" : "frc 7/30/2020 11:48", + "resetFont" : "frc 7/30/2020 11:46", "structureIdentifier" : "ls 7/24/2019 22:17", "structureIdentifier:" : "kh 6/18/2020 21:57" } } diff --git a/packages/RichTextEditing-Core.package/NullTextStructure.class/properties.json b/packages/RichTextEditing-Core.package/RichTextNullStructure.class/properties.json similarity index 74% rename from packages/RichTextEditing-Core.package/NullTextStructure.class/properties.json rename to packages/RichTextEditing-Core.package/RichTextNullStructure.class/properties.json index f9e80e1..a3a48bb 100644 --- a/packages/RichTextEditing-Core.package/NullTextStructure.class/properties.json +++ b/packages/RichTextEditing-Core.package/RichTextNullStructure.class/properties.json @@ -7,8 +7,8 @@ "commentStamp" : "ls 7/25/2019 13:56", "instvars" : [ ], - "name" : "NullTextStructure", + "name" : "RichTextNullStructure", "pools" : [ ], - "super" : "TextStructure", + "super" : "RichTextStructure", "type" : "normal" } diff --git a/packages/RichTextEditing-Core.package/RichTextObjectExportStrategy.class/README.md b/packages/RichTextEditing-Core.package/RichTextObjectExportStrategy.class/README.md new file mode 100644 index 0000000..e38bcb5 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextObjectExportStrategy.class/README.md @@ -0,0 +1,2 @@ +I am a RichTextObjectExportStrategy. +I export a document to a file by serializing it using a ReferenceStream. \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextObjectExportStrategy.class/class/export.on..st b/packages/RichTextEditing-Core.package/RichTextObjectExportStrategy.class/class/export.on..st new file mode 100644 index 0000000..f62026e --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextObjectExportStrategy.class/class/export.on..st @@ -0,0 +1,6 @@ +export +export: aRichTextDocument on: aStream + + (ReferenceStream on: aStream) + nextPut: aRichTextDocument; + close \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextObjectExportStrategy.class/class/fileEnding.st b/packages/RichTextEditing-Core.package/RichTextObjectExportStrategy.class/class/fileEnding.st new file mode 100644 index 0000000..cd75ac9 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextObjectExportStrategy.class/class/fileEnding.st @@ -0,0 +1,4 @@ +export +fileEnding + + ^ '.obj' \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextObjectExportStrategy.class/class/label.st b/packages/RichTextEditing-Core.package/RichTextObjectExportStrategy.class/class/label.st new file mode 100644 index 0000000..67e91ae --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextObjectExportStrategy.class/class/label.st @@ -0,0 +1,4 @@ +export +label + + ^ #Object \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextObjectExportStrategy.class/class/setTemplateFor..st b/packages/RichTextEditing-Core.package/RichTextObjectExportStrategy.class/class/setTemplateFor..st new file mode 100644 index 0000000..63d3e34 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextObjectExportStrategy.class/class/setTemplateFor..st @@ -0,0 +1,3 @@ +export +setTemplateFor: aRichTextDocument + "No template here" \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextObjectExportStrategy.class/class/template.st b/packages/RichTextEditing-Core.package/RichTextObjectExportStrategy.class/class/template.st new file mode 100644 index 0000000..a906a58 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextObjectExportStrategy.class/class/template.st @@ -0,0 +1,4 @@ +export +template + + ^ self shouldNotImplement \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextObjectExportStrategy.class/methodProperties.json b/packages/RichTextEditing-Core.package/RichTextObjectExportStrategy.class/methodProperties.json new file mode 100644 index 0000000..0ae753f --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextObjectExportStrategy.class/methodProperties.json @@ -0,0 +1,9 @@ +{ + "class" : { + "export:on:" : "frc 8/7/2020 12:13", + "fileEnding" : "kh 7/27/2020 12:15", + "label" : "kh 7/27/2020 12:15", + "setTemplateFor:" : "tok 8/7/2020 20:55", + "template" : "tok 8/7/2020 20:54" }, + "instance" : { + } } diff --git a/packages/RichTextEditing-Core.package/RichTextObjectExportStrategy.class/properties.json b/packages/RichTextEditing-Core.package/RichTextObjectExportStrategy.class/properties.json new file mode 100644 index 0000000..93e3aec --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextObjectExportStrategy.class/properties.json @@ -0,0 +1,14 @@ +{ + "category" : "RichTextEditing-Core", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "JEH 8/7/2020 15:57", + "instvars" : [ + ], + "name" : "RichTextObjectExportStrategy", + "pools" : [ + ], + "super" : "RichTextExportStrategy", + "type" : "normal" } diff --git a/packages/RichTextEditing-Core.package/RichTextPlainExportStrategy.class/README.md b/packages/RichTextEditing-Core.package/RichTextPlainExportStrategy.class/README.md new file mode 100644 index 0000000..9f73a17 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextPlainExportStrategy.class/README.md @@ -0,0 +1,2 @@ +I am a RichTextPlainTextExportStrategy. +I export a document to a file by removing all formatting and storing it as plain text. \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextPlainExportStrategy.class/class/export.on..st b/packages/RichTextEditing-Core.package/RichTextPlainExportStrategy.class/class/export.on..st new file mode 100644 index 0000000..cf2cb9a --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextPlainExportStrategy.class/class/export.on..st @@ -0,0 +1,5 @@ +export +export: aRichTextDocument on: aStream + + super prepareExportFor: aRichTextDocument. + aStream nextPutAll: aRichTextDocument asString \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextPlainTextExportStrategy.class/class/fileEnding.st b/packages/RichTextEditing-Core.package/RichTextPlainExportStrategy.class/class/fileEnding.st similarity index 100% rename from packages/RichTextEditing-Core.package/RichTextPlainTextExportStrategy.class/class/fileEnding.st rename to packages/RichTextEditing-Core.package/RichTextPlainExportStrategy.class/class/fileEnding.st diff --git a/packages/RichTextEditing-Core.package/RichTextPlainTextExportStrategy.class/class/label.st b/packages/RichTextEditing-Core.package/RichTextPlainExportStrategy.class/class/label.st similarity index 100% rename from packages/RichTextEditing-Core.package/RichTextPlainTextExportStrategy.class/class/label.st rename to packages/RichTextEditing-Core.package/RichTextPlainExportStrategy.class/class/label.st diff --git a/packages/RichTextEditing-Core.package/RichTextPlainExportStrategy.class/class/setTemplateFor..st b/packages/RichTextEditing-Core.package/RichTextPlainExportStrategy.class/class/setTemplateFor..st new file mode 100644 index 0000000..63d3e34 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextPlainExportStrategy.class/class/setTemplateFor..st @@ -0,0 +1,3 @@ +export +setTemplateFor: aRichTextDocument + "No template here" \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextPlainExportStrategy.class/class/template.st b/packages/RichTextEditing-Core.package/RichTextPlainExportStrategy.class/class/template.st new file mode 100644 index 0000000..06b9eed --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextPlainExportStrategy.class/class/template.st @@ -0,0 +1,5 @@ +export +template + "No template here" + + ^ self shouldNotImplement \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextPlainExportStrategy.class/methodProperties.json b/packages/RichTextEditing-Core.package/RichTextPlainExportStrategy.class/methodProperties.json new file mode 100644 index 0000000..494cb3c --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextPlainExportStrategy.class/methodProperties.json @@ -0,0 +1,9 @@ +{ + "class" : { + "export:on:" : "frc 8/4/2020 14:24", + "fileEnding" : "tok 7/3/2020 19:28", + "label" : "tok 7/8/2020 16:42", + "setTemplateFor:" : "tok 8/7/2020 20:55", + "template" : "tok 8/7/2020 20:53" }, + "instance" : { + } } diff --git a/packages/RichTextEditing-Core.package/RichTextPlainTextExportStrategy.class/properties.json b/packages/RichTextEditing-Core.package/RichTextPlainExportStrategy.class/properties.json similarity index 70% rename from packages/RichTextEditing-Core.package/RichTextPlainTextExportStrategy.class/properties.json rename to packages/RichTextEditing-Core.package/RichTextPlainExportStrategy.class/properties.json index cb6625a..253e7af 100644 --- a/packages/RichTextEditing-Core.package/RichTextPlainTextExportStrategy.class/properties.json +++ b/packages/RichTextEditing-Core.package/RichTextPlainExportStrategy.class/properties.json @@ -4,10 +4,10 @@ ], "classvars" : [ ], - "commentStamp" : "", + "commentStamp" : "JEH 8/7/2020 15:59", "instvars" : [ ], - "name" : "RichTextPlainTextExportStrategy", + "name" : "RichTextPlainExportStrategy", "pools" : [ ], "super" : "RichTextExportStrategy", diff --git a/packages/RichTextEditing-Core.package/RichTextPlainTextExportStrategy.class/README.md b/packages/RichTextEditing-Core.package/RichTextPlainTextExportStrategy.class/README.md deleted file mode 100644 index e69de29..0000000 diff --git a/packages/RichTextEditing-Core.package/RichTextPlainTextExportStrategy.class/class/export.to..st b/packages/RichTextEditing-Core.package/RichTextPlainTextExportStrategy.class/class/export.to..st deleted file mode 100644 index 47e66fa..0000000 --- a/packages/RichTextEditing-Core.package/RichTextPlainTextExportStrategy.class/class/export.to..st +++ /dev/null @@ -1,7 +0,0 @@ -export -export: aRichTextDocument to: aFilePath - - | fileStream | - fileStream := StandardFileStream newFileNamed: aFilePath. - fileStream nextPutAll: aRichTextDocument text asString. - fileStream close \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextPlainTextExportStrategy.class/methodProperties.json b/packages/RichTextEditing-Core.package/RichTextPlainTextExportStrategy.class/methodProperties.json deleted file mode 100644 index 9475590..0000000 --- a/packages/RichTextEditing-Core.package/RichTextPlainTextExportStrategy.class/methodProperties.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "class" : { - "export:to:" : "tok 7/9/2020 21:38", - "fileEnding" : "tok 7/3/2020 19:28", - "label" : "tok 7/8/2020 16:42" }, - "instance" : { - } } diff --git a/packages/RichTextEditing-Core.package/TextStructure.class/README.md b/packages/RichTextEditing-Core.package/RichTextStructure.class/README.md similarity index 88% rename from packages/RichTextEditing-Core.package/TextStructure.class/README.md rename to packages/RichTextEditing-Core.package/RichTextStructure.class/README.md index 191786f..0730475 100644 --- a/packages/RichTextEditing-Core.package/TextStructure.class/README.md +++ b/packages/RichTextEditing-Core.package/RichTextStructure.class/README.md @@ -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 \ No newline at end of file +attributes - aSet of TextAttributes +preAddHook - action that is performed before the structure is applied on a text \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/TextStructure.class/class/allTextStructures.st b/packages/RichTextEditing-Core.package/RichTextStructure.class/class/all.st similarity index 88% rename from packages/RichTextEditing-Core.package/TextStructure.class/class/allTextStructures.st rename to packages/RichTextEditing-Core.package/RichTextStructure.class/class/all.st index d9b89e9..0ed685c 100644 --- a/packages/RichTextEditing-Core.package/TextStructure.class/class/allTextStructures.st +++ b/packages/RichTextEditing-Core.package/RichTextStructure.class/class/all.st @@ -1,5 +1,5 @@ predefined -allTextStructures +all ^ {self bold. self italic. diff --git a/packages/RichTextEditing-Core.package/RichTextStructure.class/class/autohyperlink.st b/packages/RichTextEditing-Core.package/RichTextStructure.class/class/autohyperlink.st new file mode 100644 index 0000000..57f723a --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextStructure.class/class/autohyperlink.st @@ -0,0 +1,8 @@ +predefined +autohyperlink + + | structure | + structure:= self new: #hyperlink from: {RichTextStructure hyperlinkTo: 'https://example.com'}. + structure preAddHook: [:text | + structure add: (RichTextStructure hyperlinkTo: text asString)]. + ^ structure \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/TextStructure.class/class/bold.st b/packages/RichTextEditing-Core.package/RichTextStructure.class/class/bold.st similarity index 100% rename from packages/RichTextEditing-Core.package/TextStructure.class/class/bold.st rename to packages/RichTextEditing-Core.package/RichTextStructure.class/class/bold.st diff --git a/packages/RichTextEditing-Core.package/TextStructure.class/class/color.st b/packages/RichTextEditing-Core.package/RichTextStructure.class/class/color.st similarity index 100% rename from packages/RichTextEditing-Core.package/TextStructure.class/class/color.st rename to packages/RichTextEditing-Core.package/RichTextStructure.class/class/color.st diff --git a/packages/RichTextEditing-Core.package/TextStructure.class/class/font.st b/packages/RichTextEditing-Core.package/RichTextStructure.class/class/font.st similarity index 100% rename from packages/RichTextEditing-Core.package/TextStructure.class/class/font.st rename to packages/RichTextEditing-Core.package/RichTextStructure.class/class/font.st diff --git a/packages/RichTextEditing-Core.package/TextStructure.class/class/fromColor..st b/packages/RichTextEditing-Core.package/RichTextStructure.class/class/fromColor..st similarity index 100% rename from packages/RichTextEditing-Core.package/TextStructure.class/class/fromColor..st rename to packages/RichTextEditing-Core.package/RichTextStructure.class/class/fromColor..st diff --git a/packages/RichTextEditing-Core.package/TextStructure.class/class/fromFont..st b/packages/RichTextEditing-Core.package/RichTextStructure.class/class/fromFont..st similarity index 100% rename from packages/RichTextEditing-Core.package/TextStructure.class/class/fromFont..st rename to packages/RichTextEditing-Core.package/RichTextStructure.class/class/fromFont..st diff --git a/packages/RichTextEditing-Core.package/RichTextStructure.class/class/hyperlinkTo..st b/packages/RichTextEditing-Core.package/RichTextStructure.class/class/hyperlinkTo..st new file mode 100644 index 0000000..ba320cb --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextStructure.class/class/hyperlinkTo..st @@ -0,0 +1,4 @@ +predefined +hyperlinkTo: url + + ^ self new: #hyperlink from: {TextURL new url: url} \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/TextStructure.class/class/indented.st b/packages/RichTextEditing-Core.package/RichTextStructure.class/class/indented.st similarity index 100% rename from packages/RichTextEditing-Core.package/TextStructure.class/class/indented.st rename to packages/RichTextEditing-Core.package/RichTextStructure.class/class/indented.st diff --git a/packages/RichTextEditing-Core.package/TextStructure.class/class/indentedBy..st b/packages/RichTextEditing-Core.package/RichTextStructure.class/class/indentedBy..st similarity index 100% rename from packages/RichTextEditing-Core.package/TextStructure.class/class/indentedBy..st rename to packages/RichTextEditing-Core.package/RichTextStructure.class/class/indentedBy..st diff --git a/packages/RichTextEditing-Core.package/TextStructure.class/class/italic.st b/packages/RichTextEditing-Core.package/RichTextStructure.class/class/italic.st similarity index 100% rename from packages/RichTextEditing-Core.package/TextStructure.class/class/italic.st rename to packages/RichTextEditing-Core.package/RichTextStructure.class/class/italic.st diff --git a/packages/RichTextEditing-Core.package/TextStructure.class/class/listOnLevel..st b/packages/RichTextEditing-Core.package/RichTextStructure.class/class/listOnLevel..st similarity index 100% rename from packages/RichTextEditing-Core.package/TextStructure.class/class/listOnLevel..st rename to packages/RichTextEditing-Core.package/RichTextStructure.class/class/listOnLevel..st diff --git a/packages/RichTextEditing-Core.package/TextStructure.class/class/new..st b/packages/RichTextEditing-Core.package/RichTextStructure.class/class/new..st similarity index 100% rename from packages/RichTextEditing-Core.package/TextStructure.class/class/new..st rename to packages/RichTextEditing-Core.package/RichTextStructure.class/class/new..st diff --git a/packages/RichTextEditing-Core.package/RichTextStructure.class/class/new.from..st b/packages/RichTextEditing-Core.package/RichTextStructure.class/class/new.from..st new file mode 100644 index 0000000..c74f41d --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextStructure.class/class/new.from..st @@ -0,0 +1,4 @@ +instance creation +new: aSymbol from: aCollection + + ^ (self new: aSymbol) attributes: aCollection asSet \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructure.class/class/notExtendable.st b/packages/RichTextEditing-Core.package/RichTextStructure.class/class/notExtendable.st new file mode 100644 index 0000000..87ce6e9 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextStructure.class/class/notExtendable.st @@ -0,0 +1,4 @@ +predefined +notExtendable + + ^ self new: #notExtendable from: {RichTextExtendability no} \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/TextStructure.class/class/predefinedStructureFor..st b/packages/RichTextEditing-Core.package/RichTextStructure.class/class/predefinedStructureFor..st similarity index 62% rename from packages/RichTextEditing-Core.package/TextStructure.class/class/predefinedStructureFor..st rename to packages/RichTextEditing-Core.package/RichTextStructure.class/class/predefinedStructureFor..st index 79d877d..792e0ca 100644 --- a/packages/RichTextEditing-Core.package/TextStructure.class/class/predefinedStructureFor..st +++ b/packages/RichTextEditing-Core.package/RichTextStructure.class/class/predefinedStructureFor..st @@ -1,6 +1,6 @@ predefined predefinedStructureFor: aSymbol - ^ self allTextStructures + ^ self all detect: [:each | each structureIdentifier = aSymbol] - ifNone: [NullTextStructure new] \ No newline at end of file + ifNone: [RichTextNullStructure new] \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/TextStructure.class/class/struckOut.st b/packages/RichTextEditing-Core.package/RichTextStructure.class/class/struckOut.st similarity index 100% rename from packages/RichTextEditing-Core.package/TextStructure.class/class/struckOut.st rename to packages/RichTextEditing-Core.package/RichTextStructure.class/class/struckOut.st diff --git a/packages/RichTextEditing-Core.package/TextStructure.class/class/underlined.st b/packages/RichTextEditing-Core.package/RichTextStructure.class/class/underlined.st similarity index 100% rename from packages/RichTextEditing-Core.package/TextStructure.class/class/underlined.st rename to packages/RichTextEditing-Core.package/RichTextStructure.class/class/underlined.st diff --git a/packages/RichTextEditing-Core.package/TextStructure.class/instance/^equals.st b/packages/RichTextEditing-Core.package/RichTextStructure.class/instance/^equals.st similarity index 100% rename from packages/RichTextEditing-Core.package/TextStructure.class/instance/^equals.st rename to packages/RichTextEditing-Core.package/RichTextStructure.class/instance/^equals.st diff --git a/packages/RichTextEditing-Core.package/TextStructure.class/instance/actOnClickFor..st b/packages/RichTextEditing-Core.package/RichTextStructure.class/instance/actOnClickFor..st similarity index 100% rename from packages/RichTextEditing-Core.package/TextStructure.class/instance/actOnClickFor..st rename to packages/RichTextEditing-Core.package/RichTextStructure.class/instance/actOnClickFor..st diff --git a/packages/RichTextEditing-Core.package/TextStructure.class/instance/add..st b/packages/RichTextEditing-Core.package/RichTextStructure.class/instance/add..st similarity index 100% rename from packages/RichTextEditing-Core.package/TextStructure.class/instance/add..st rename to packages/RichTextEditing-Core.package/RichTextStructure.class/instance/add..st diff --git a/packages/RichTextEditing-Core.package/TextStructure.class/instance/addAll..st b/packages/RichTextEditing-Core.package/RichTextStructure.class/instance/addAll..st similarity index 100% rename from packages/RichTextEditing-Core.package/TextStructure.class/instance/addAll..st rename to packages/RichTextEditing-Core.package/RichTextStructure.class/instance/addAll..st diff --git a/packages/RichTextEditing-Core.package/TextStructure.class/instance/amount.st b/packages/RichTextEditing-Core.package/RichTextStructure.class/instance/amount.st similarity index 100% rename from packages/RichTextEditing-Core.package/TextStructure.class/instance/amount.st rename to packages/RichTextEditing-Core.package/RichTextStructure.class/instance/amount.st diff --git a/packages/RichTextEditing-Core.package/TextStructure.class/instance/attributes..st b/packages/RichTextEditing-Core.package/RichTextStructure.class/instance/attributes..st similarity index 100% rename from packages/RichTextEditing-Core.package/TextStructure.class/instance/attributes..st rename to packages/RichTextEditing-Core.package/RichTextStructure.class/instance/attributes..st diff --git a/packages/RichTextEditing-Core.package/TextStructure.class/instance/attributes.st b/packages/RichTextEditing-Core.package/RichTextStructure.class/instance/attributes.st similarity index 100% rename from packages/RichTextEditing-Core.package/TextStructure.class/instance/attributes.st rename to packages/RichTextEditing-Core.package/RichTextStructure.class/instance/attributes.st diff --git a/packages/RichTextEditing-Core.package/TextStructure.class/instance/couldDeriveFromPrettyPrinting.st b/packages/RichTextEditing-Core.package/RichTextStructure.class/instance/couldDeriveFromPrettyPrinting.st similarity index 100% rename from packages/RichTextEditing-Core.package/TextStructure.class/instance/couldDeriveFromPrettyPrinting.st rename to packages/RichTextEditing-Core.package/RichTextStructure.class/instance/couldDeriveFromPrettyPrinting.st diff --git a/packages/RichTextEditing-Core.package/TextStructure.class/instance/emphasisCode.st b/packages/RichTextEditing-Core.package/RichTextStructure.class/instance/emphasisCode.st similarity index 100% rename from packages/RichTextEditing-Core.package/TextStructure.class/instance/emphasisCode.st rename to packages/RichTextEditing-Core.package/RichTextStructure.class/instance/emphasisCode.st diff --git a/packages/RichTextEditing-Core.package/TextStructure.class/instance/emphasizeScanner..st b/packages/RichTextEditing-Core.package/RichTextStructure.class/instance/emphasizeScanner..st similarity index 100% rename from packages/RichTextEditing-Core.package/TextStructure.class/instance/emphasizeScanner..st rename to packages/RichTextEditing-Core.package/RichTextStructure.class/instance/emphasizeScanner..st diff --git a/packages/RichTextEditing-Core.package/TextStructure.class/instance/flatten.st b/packages/RichTextEditing-Core.package/RichTextStructure.class/instance/flatten.st similarity index 100% rename from packages/RichTextEditing-Core.package/TextStructure.class/instance/flatten.st rename to packages/RichTextEditing-Core.package/RichTextStructure.class/instance/flatten.st diff --git a/packages/RichTextEditing-Core.package/TextStructure.class/instance/hash.st b/packages/RichTextEditing-Core.package/RichTextStructure.class/instance/hash.st similarity index 100% rename from packages/RichTextEditing-Core.package/TextStructure.class/instance/hash.st rename to packages/RichTextEditing-Core.package/RichTextStructure.class/instance/hash.st diff --git a/packages/RichTextEditing-Core.package/TextStructure.class/instance/includes..st b/packages/RichTextEditing-Core.package/RichTextStructure.class/instance/includes..st similarity index 100% rename from packages/RichTextEditing-Core.package/TextStructure.class/instance/includes..st rename to packages/RichTextEditing-Core.package/RichTextStructure.class/instance/includes..st diff --git a/packages/RichTextEditing-Core.package/TextStructure.class/instance/initialize.st b/packages/RichTextEditing-Core.package/RichTextStructure.class/instance/initialize.st similarity index 100% rename from packages/RichTextEditing-Core.package/TextStructure.class/instance/initialize.st rename to packages/RichTextEditing-Core.package/RichTextStructure.class/instance/initialize.st diff --git a/packages/RichTextEditing-Core.package/TextStructure.class/instance/isKern.st b/packages/RichTextEditing-Core.package/RichTextStructure.class/instance/isKern.st similarity index 100% rename from packages/RichTextEditing-Core.package/TextStructure.class/instance/isKern.st rename to packages/RichTextEditing-Core.package/RichTextStructure.class/instance/isKern.st diff --git a/packages/RichTextEditing-Core.package/TextStructure.class/instance/isTextAlignment.st b/packages/RichTextEditing-Core.package/RichTextStructure.class/instance/isTextAlignment.st similarity index 100% rename from packages/RichTextEditing-Core.package/TextStructure.class/instance/isTextAlignment.st rename to packages/RichTextEditing-Core.package/RichTextStructure.class/instance/isTextAlignment.st diff --git a/packages/RichTextEditing-Core.package/TextStructure.class/instance/isTextColor.st b/packages/RichTextEditing-Core.package/RichTextStructure.class/instance/isTextColor.st similarity index 100% rename from packages/RichTextEditing-Core.package/TextStructure.class/instance/isTextColor.st rename to packages/RichTextEditing-Core.package/RichTextStructure.class/instance/isTextColor.st diff --git a/packages/RichTextEditing-Core.package/TextStructure.class/instance/isTextIndent.st b/packages/RichTextEditing-Core.package/RichTextStructure.class/instance/isTextIndent.st similarity index 100% rename from packages/RichTextEditing-Core.package/TextStructure.class/instance/isTextIndent.st rename to packages/RichTextEditing-Core.package/RichTextStructure.class/instance/isTextIndent.st diff --git a/packages/RichTextEditing-Core.package/TextStructure.class/instance/isTextStructure.st b/packages/RichTextEditing-Core.package/RichTextStructure.class/instance/isTextStructure.st similarity index 100% rename from packages/RichTextEditing-Core.package/TextStructure.class/instance/isTextStructure.st rename to packages/RichTextEditing-Core.package/RichTextStructure.class/instance/isTextStructure.st diff --git a/packages/RichTextEditing-Core.package/TextStructure.class/instance/mayActOnClick.st b/packages/RichTextEditing-Core.package/RichTextStructure.class/instance/mayActOnClick.st similarity index 100% rename from packages/RichTextEditing-Core.package/TextStructure.class/instance/mayActOnClick.st rename to packages/RichTextEditing-Core.package/RichTextStructure.class/instance/mayActOnClick.st diff --git a/packages/RichTextEditing-Core.package/TextStructure.class/instance/mayBeExtended.st b/packages/RichTextEditing-Core.package/RichTextStructure.class/instance/mayBeExtended.st similarity index 100% rename from packages/RichTextEditing-Core.package/TextStructure.class/instance/mayBeExtended.st rename to packages/RichTextEditing-Core.package/RichTextStructure.class/instance/mayBeExtended.st diff --git a/packages/RichTextEditing-Core.package/TextStructure.class/instance/preAdd..st b/packages/RichTextEditing-Core.package/RichTextStructure.class/instance/preAdd..st similarity index 100% rename from packages/RichTextEditing-Core.package/TextStructure.class/instance/preAdd..st rename to packages/RichTextEditing-Core.package/RichTextStructure.class/instance/preAdd..st diff --git a/packages/RichTextEditing-Core.package/TextStructure.class/instance/preAddHook..st b/packages/RichTextEditing-Core.package/RichTextStructure.class/instance/preAddHook..st similarity index 100% rename from packages/RichTextEditing-Core.package/TextStructure.class/instance/preAddHook..st rename to packages/RichTextEditing-Core.package/RichTextStructure.class/instance/preAddHook..st diff --git a/packages/RichTextEditing-Core.package/TextStructure.class/instance/preAddHook.st b/packages/RichTextEditing-Core.package/RichTextStructure.class/instance/preAddHook.st similarity index 100% rename from packages/RichTextEditing-Core.package/TextStructure.class/instance/preAddHook.st rename to packages/RichTextEditing-Core.package/RichTextStructure.class/instance/preAddHook.st diff --git a/packages/RichTextEditing-Core.package/TextStructure.class/instance/printOn..st b/packages/RichTextEditing-Core.package/RichTextStructure.class/instance/printOn..st similarity index 100% rename from packages/RichTextEditing-Core.package/TextStructure.class/instance/printOn..st rename to packages/RichTextEditing-Core.package/RichTextStructure.class/instance/printOn..st diff --git a/packages/RichTextEditing-Core.package/TextStructure.class/instance/remove..st b/packages/RichTextEditing-Core.package/RichTextStructure.class/instance/remove..st similarity index 100% rename from packages/RichTextEditing-Core.package/TextStructure.class/instance/remove..st rename to packages/RichTextEditing-Core.package/RichTextStructure.class/instance/remove..st diff --git a/packages/RichTextEditing-Core.package/RichTextStructure.class/instance/resetColor.st b/packages/RichTextEditing-Core.package/RichTextStructure.class/instance/resetColor.st new file mode 100644 index 0000000..c20b927 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextStructure.class/instance/resetColor.st @@ -0,0 +1,4 @@ +color +resetColor + + self remove: (self class color) \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructure.class/instance/resetFont.st b/packages/RichTextEditing-Core.package/RichTextStructure.class/instance/resetFont.st new file mode 100644 index 0000000..74ace2e --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextStructure.class/instance/resetFont.st @@ -0,0 +1,4 @@ +font +resetFont + + self remove: (self class font) \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/TextStructure.class/instance/structureIdentifier..st b/packages/RichTextEditing-Core.package/RichTextStructure.class/instance/structureIdentifier..st similarity index 100% rename from packages/RichTextEditing-Core.package/TextStructure.class/instance/structureIdentifier..st rename to packages/RichTextEditing-Core.package/RichTextStructure.class/instance/structureIdentifier..st diff --git a/packages/RichTextEditing-Core.package/TextStructure.class/instance/structureIdentifier.st b/packages/RichTextEditing-Core.package/RichTextStructure.class/instance/structureIdentifier.st similarity index 100% rename from packages/RichTextEditing-Core.package/TextStructure.class/instance/structureIdentifier.st rename to packages/RichTextEditing-Core.package/RichTextStructure.class/instance/structureIdentifier.st diff --git a/packages/RichTextEditing-Core.package/TextStructure.class/methodProperties.json b/packages/RichTextEditing-Core.package/RichTextStructure.class/methodProperties.json similarity index 81% rename from packages/RichTextEditing-Core.package/TextStructure.class/methodProperties.json rename to packages/RichTextEditing-Core.package/RichTextStructure.class/methodProperties.json index 5fb5920..02fcb03 100644 --- a/packages/RichTextEditing-Core.package/TextStructure.class/methodProperties.json +++ b/packages/RichTextEditing-Core.package/RichTextStructure.class/methodProperties.json @@ -1,28 +1,28 @@ { "class" : { - "allTextStructures" : "kh 6/21/2020 16:10", - "autohyperlink" : "kh 6/21/2020 16:56", + "all" : "frc 8/7/2020 11:09", + "autohyperlink" : "tok 8/7/2020 15:52", "bold" : "kh 6/19/2020 12:25", "color" : "kh 6/18/2020 22:52", "font" : "kh 6/18/2020 23:23", "fromColor:" : "kh 6/25/2020 13:57", "fromFont:" : "kh 6/25/2020 13:57", - "hyperlinkTo:" : "kh 6/21/2020 16:56", + "hyperlinkTo:" : "frc 7/16/2020 12:41", "indented" : "kh 6/21/2020 16:58", "indentedBy:" : "kh 6/21/2020 16:58", "italic" : "kh 6/19/2020 12:25", "listOnLevel:" : "kh 6/21/2020 16:58", "new:" : "kh 6/21/2020 15:51", - "new:from:" : "kh 6/21/2020 15:51", - "notExtendable" : "kh 6/19/2020 17:26", - "predefinedStructureFor:" : "kh 6/21/2020 16:11", + "new:from:" : "frc 7/16/2020 12:41", + "notExtendable" : "tok 8/7/2020 15:50", + "predefinedStructureFor:" : "tok 8/7/2020 15:53", "struckOut" : "kh 6/19/2020 12:25", "underlined" : "kh 6/19/2020 12:25" }, "instance" : { "=" : "lh 7/24/2019 20:24", "actOnClickFor:" : "kh 6/21/2020 15:50", "add:" : "kh 6/19/2020 12:12", - "addAll:" : "kh 6/19/2020 12:07", + "addAll:" : "frc 8/7/2020 10:45", "amount" : "kh 6/19/2020 15:13", "attributes" : "kh 6/18/2020 14:14", "attributes:" : "kh 6/19/2020 15:17", @@ -45,5 +45,7 @@ "preAddHook:" : "kh 6/19/2020 12:14", "printOn:" : "ls 7/3/2019 17:32", "remove:" : "kh 6/18/2020 22:38", + "resetColor" : "frc 8/7/2020 11:21", + "resetFont" : "frc 8/7/2020 11:21", "structureIdentifier" : "ls 5/29/2019 17:41", "structureIdentifier:" : "AG 5/29/2019 18:33" } } diff --git a/packages/RichTextEditing-Core.package/TextStructure.class/properties.json b/packages/RichTextEditing-Core.package/RichTextStructure.class/properties.json similarity index 76% rename from packages/RichTextEditing-Core.package/TextStructure.class/properties.json rename to packages/RichTextEditing-Core.package/RichTextStructure.class/properties.json index 30466ea..ba1d74f 100644 --- a/packages/RichTextEditing-Core.package/TextStructure.class/properties.json +++ b/packages/RichTextEditing-Core.package/RichTextStructure.class/properties.json @@ -4,12 +4,12 @@ ], "classvars" : [ ], - "commentStamp" : "kh 6/21/2020 10:08", + "commentStamp" : "JEH 8/7/2020 17:27", "instvars" : [ "structureIdentifier", "attributes", "preAddHook" ], - "name" : "TextStructure", + "name" : "RichTextStructure", "pools" : [ ], "super" : "TextAttribute", diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/README.md b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/README.md index e1a18d9..6bcb13a 100644 --- a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/README.md +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/README.md @@ -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: @@ -9,4 +10,5 @@ structureList - anOrderedCollection styleList - anOrderedCollection loremIpsum - aText (previewText) lastStructureSymbol - aSymbol -currentStructureSymbol - aSymbol \ No newline at end of file +currentStructureSymbol - aSymbol +currentTemplateSymbol - aSymbol \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/class/allStructureIdentifiers.st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/class/allStructureIdentifiers.st deleted file mode 100644 index 8f27d20..0000000 --- a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/class/allStructureIdentifiers.st +++ /dev/null @@ -1,4 +0,0 @@ -constants -allStructureIdentifiers - - ^ TextStructure allTextStructures collect: [:each | each structureIdentifier] \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/class/allStyleIdentifiers.st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/class/allStyleIdentifiers.st new file mode 100644 index 0000000..1f808b8 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/class/allStyleIdentifiers.st @@ -0,0 +1,4 @@ +constants +allStyleIdentifiers + + ^ RichTextStructure all collect: [:each | each structureIdentifier] \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/class/open..st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/class/open..st new file mode 100644 index 0000000..17fbd63 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/class/open..st @@ -0,0 +1,9 @@ +instance creation +open: aRichTextDocument + + | instance | + instance := self basicNew document: aRichTextDocument. + instance initialize. + aRichTextDocument textStructuresDo: [:each | each addDependent: instance]. + + ^ ToolBuilder default open: instance \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/acceptTemplateButtonFrame.st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/acceptTemplateButtonFrame.st new file mode 100644 index 0000000..72b8115 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/acceptTemplateButtonFrame.st @@ -0,0 +1,10 @@ +toolbuilder +acceptTemplateButtonFrame + + ^ LayoutFrame new + leftFraction: 0; + rightFraction: 1; + topFraction: 1 offset: self buttonHeight negated; + bottomFraction: 1; + yourself + \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/allStructureIdentifiers.st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/allStructureIdentifiers.st deleted file mode 100644 index 3ab6af0..0000000 --- a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/allStructureIdentifiers.st +++ /dev/null @@ -1,4 +0,0 @@ -text attributes -allStructureIdentifiers - - ^ self class allStructureIdentifiers \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/allStyleIdentifiers.st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/allStyleIdentifiers.st new file mode 100644 index 0000000..a87ef06 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/allStyleIdentifiers.st @@ -0,0 +1,4 @@ +text attributes +allStyleIdentifiers + + ^ self class allStyleIdentifiers \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildAcceptTemplateButtonWith..st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildAcceptTemplateButtonWith..st index 70d708a..0c40bea 100644 --- a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildAcceptTemplateButtonWith..st +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildAcceptTemplateButtonWith..st @@ -3,7 +3,7 @@ buildAcceptTemplateButtonWith: aBuilder ^ aBuilder pluggableButtonSpec new model: self; - frame: (0 @ 0.9 corner: 0.25 @ 1); + frame: self acceptTemplateButtonFrame; label: 'Accept Template'; action: #acceptNewTemplate; yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildAddStructureButtonWith..st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildAddStructureButtonWith..st index 118766c..0e9aca9 100644 --- a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildAddStructureButtonWith..st +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildAddStructureButtonWith..st @@ -3,7 +3,6 @@ buildAddStructureButtonWith: aBuilder ^ aBuilder pluggableButtonSpec new model: self; - frame: (0.25 @ 0.8 corner: 0.425 @ 0.9); label: '+'; action: #addNewStructure; yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildColorButtonWith..st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildColorButtonWith..st index 8f972bf..43ea1fd 100644 --- a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildColorButtonWith..st +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildColorButtonWith..st @@ -4,9 +4,7 @@ buildColorButtonWith: aBuilder ^ aBuilder pluggableButtonSpec new name: 'colorButton'; model: self; - frame: (0.6 @ 0.55 corner: 0.8 @ 0.65); + frame: (0 @ 0.5 corner: 0.5 @ 1); label: 'Color'; action: #openColorPicker; - yourself - - \ No newline at end of file + yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildColorResetButtonWith..st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildColorResetButtonWith..st index 60cad29..b475121 100644 --- a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildColorResetButtonWith..st +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildColorResetButtonWith..st @@ -3,7 +3,7 @@ buildColorResetButtonWith: aBuilder ^ aBuilder pluggableButtonSpec new model: self; - frame: (0.8 @ 0.55 corner: 1 @ 0.65); + frame: (0.5 @ 0.5 corner: 1 @ 1); label: 'Reset color'; action: #resetColorOfCurrentStructure; yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildDecreasePriorityButtonWith..st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildDecreasePriorityButtonWith..st index 33059db..4f33b56 100644 --- a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildDecreasePriorityButtonWith..st +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildDecreasePriorityButtonWith..st @@ -3,7 +3,6 @@ buildDecreasePriorityButtonWith: aBuilder ^ aBuilder pluggableButtonSpec new model: self; - frame: (0.25 @ 0.9 corner: 0.425 @ 1); label: 'Down'; action: #decreasePriority; yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildFontButtonWith..st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildFontButtonWith..st index 23fc0c7..4445a5b 100644 --- a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildFontButtonWith..st +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildFontButtonWith..st @@ -4,7 +4,7 @@ buildFontButtonWith: aBuilder ^ aBuilder pluggableButtonSpec new name: 'fontButton'; model: self; - frame: (0.6 @ 0.45 corner: 0.8 @ 0.55); + frame: (0 @ 0 corner: 0.5 @ 0.5); label: 'Font'; action: #openFontChooser; yourself diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildFontResetButtonWith..st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildFontResetButtonWith..st index 6788180..2fb3370 100644 --- a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildFontResetButtonWith..st +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildFontResetButtonWith..st @@ -3,7 +3,7 @@ buildFontResetButtonWith: aBuilder ^ aBuilder pluggableButtonSpec new model: self; - frame: (0.8 @ 0.45 corner: 1 @ 0.55); + frame: (0.5 @ 0 corner: 1 @ 0.5); label: 'Reset font'; action: #resetFontOfCurrentStructure; yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildIncreasePriorityButtonWith..st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildIncreasePriorityButtonWith..st index 0ae6136..3fcce9a 100644 --- a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildIncreasePriorityButtonWith..st +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildIncreasePriorityButtonWith..st @@ -3,7 +3,6 @@ buildIncreasePriorityButtonWith: aBuilder ^ aBuilder pluggableButtonSpec new model: self; - frame: (0.425 @ 0.9 corner: 0.6 @ 1); label: 'Up'; action: #increasePriority; yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildRemoveStructureButtonWith..st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildRemoveStructureButtonWith..st index 62f4d24..f00db77 100644 --- a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildRemoveStructureButtonWith..st +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildRemoveStructureButtonWith..st @@ -3,7 +3,6 @@ buildRemoveStructureButtonWith: aBuilder ^ aBuilder pluggableButtonSpec new model: self; - frame: (0.425 @ 0.8 corner: 0.6 @ 0.9); label: '-'; action: #removeStructure; yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildStructureButtonPanelWith..st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildStructureButtonPanelWith..st new file mode 100644 index 0000000..6c194b7 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildStructureButtonPanelWith..st @@ -0,0 +1,13 @@ +toolbuilder +buildStructureButtonPanelWith: aBuilder + + ^ aBuilder pluggablePanelSpec new + model: self; + frame: self structureButtonPanelFrame; + layout: #horizontal; + children: { + self buildAddStructureButtonWith: aBuilder. + self buildRemoveStructureButtonWith: aBuilder. + self buildIncreasePriorityButtonWith: aBuilder. + self buildDecreasePriorityButtonWith: aBuilder.}; + yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildStructureFieldWith..st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildStructureFieldWith..st index a7ae95d..5545705 100644 --- a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildStructureFieldWith..st +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildStructureFieldWith..st @@ -4,7 +4,7 @@ buildStructureFieldWith: aBuilder ^ aBuilder pluggableListSpec new name: 'structureField'; model: self; - frame: (0.25 @ 0 corner: 0.6 @ 0.8); + frame: self structureFieldFrame; list: #textStructures; getSelected: #currentStructureSymbol; setSelected: #currentStructureSymbol:; diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildStructurePanelWith..st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildStructurePanelWith..st new file mode 100644 index 0000000..51b82f4 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildStructurePanelWith..st @@ -0,0 +1,11 @@ +toolbuilder +buildStructurePanelWith: aBuilder + + ^ aBuilder pluggablePanelSpec new + model: self; + wantsResizeHandles: true; + children: { + self buildStructureFieldWith: aBuilder. + self buildStructureButtonPanelWith: aBuilder}; + frame: self structurePanelFrame; + yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildStyleButtonPanelWith..st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildStyleButtonPanelWith..st new file mode 100644 index 0000000..a13acf4 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildStyleButtonPanelWith..st @@ -0,0 +1,13 @@ +toolbuilder +buildStyleButtonPanelWith: aBuilder + + ^ aBuilder pluggablePanelSpec new + model: self; + frame: self styleButtonPanelFrame; + verticalResizing: #rigid; + children: { + self buildFontButtonWith: aBuilder. + self buildFontResetButtonWith: aBuilder. + self buildColorButtonWith: aBuilder. + self buildColorResetButtonWith: aBuilder}; + yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildStyleFieldWith..st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildStyleFieldWith..st index 4a50818..5ac8774 100644 --- a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildStyleFieldWith..st +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildStyleFieldWith..st @@ -4,8 +4,8 @@ buildStyleFieldWith: aBuilder ^ aBuilder pluggableMultiSelectionListSpec new name: 'styleField'; model: self; - frame: (0.6 @ 0 corner: 1 @ 0.45); - list: #allStructureIdentifiers; + frame: self styleFieldFrame; + list: #allStyleIdentifiers; getSelectionList: #isActiveStructureAt:; setSelectionList: #structureAt:activate:; yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildStylePanelWith..st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildStylePanelWith..st new file mode 100644 index 0000000..462ebe4 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildStylePanelWith..st @@ -0,0 +1,12 @@ +toolbuilder +buildStylePanelWith: aBuilder + + ^ aBuilder pluggablePanelSpec new + model: self; + wantsResizeHandles: true; + children: { + self buildStyleFieldWith: aBuilder. + self buildStyleButtonPanelWith: aBuilder. + self buildTextPreviewFieldWith: aBuilder}; + frame: self stylePanelFrame; + yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildTemplateFieldWith..st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildTemplateFieldWith..st index d617558..47c77db 100644 --- a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildTemplateFieldWith..st +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildTemplateFieldWith..st @@ -4,7 +4,7 @@ buildTemplateFieldWith: aBuilder. ^ aBuilder pluggableListSpec new name: 'templateField'; model: self; - frame: (0 @ 0 corner: 0.25 @ 0.9); + frame: self templateFieldFrame; list: #templateIdentifiers; getSelected: #currentTemplateSymbol; setSelected: #currentTemplateSymbol:; diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildTemplatePanelWith..st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildTemplatePanelWith..st new file mode 100644 index 0000000..91bebab --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildTemplatePanelWith..st @@ -0,0 +1,11 @@ +toolbuilder +buildTemplatePanelWith: aBuilder + + ^ aBuilder pluggablePanelSpec new + model: self; + wantsResizeHandles: true; + children: { + self buildTemplateFieldWith: aBuilder. + self buildAcceptTemplateButtonWith: aBuilder}; + frame: self templatePanelFrame; + yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildTextPreviewFieldWith..st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildTextPreviewFieldWith..st index 19c36dc..cb0915a 100644 --- a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildTextPreviewFieldWith..st +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildTextPreviewFieldWith..st @@ -4,7 +4,7 @@ buildTextPreviewFieldWith: aBuilder ^ aBuilder pluggableTextSpec new name: 'textPreview'; model: self; - frame: (0.6 @ 0.65 corner: 1 @ 1); + frame: self textPreviewFrame; readOnly: true; getText: #loremIpsum; yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildWith..st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildWith..st index 2ddb30f..a745cec 100644 --- a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildWith..st +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buildWith..st @@ -1,23 +1,13 @@ toolbuilder buildWith: aBuilder + | windowSpec | windowSpec := aBuilder pluggableWindowSpec new. windowSpec model: self; label: 'Structure Editor'; children: { - self buildStructureFieldWith: aBuilder. - self buildStyleFieldWith: aBuilder. - self buildTextPreviewFieldWith: aBuilder. - self buildAddStructureButtonWith: aBuilder. - self buildFontButtonWith: aBuilder. - self buildFontResetButtonWith: aBuilder. - self buildColorButtonWith: aBuilder. - self buildColorResetButtonWith: aBuilder. - self buildRemoveStructureButtonWith: aBuilder. - self buildIncreasePriorityButtonWith: aBuilder. - self buildDecreasePriorityButtonWith: aBuilder. - - self buildAcceptTemplateButtonWith: aBuilder. - self buildTemplateFieldWith: aBuilder}. + self buildTemplatePanelWith: aBuilder. + self buildStructurePanelWith: aBuilder. + self buildStylePanelWith: aBuilder}. ^ aBuilder build: windowSpec \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buttonHeight.st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buttonHeight.st new file mode 100644 index 0000000..afeebde --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/buttonHeight.st @@ -0,0 +1,4 @@ +toolbuilder +buttonHeight + + ^ Preferences standardButtonFont height * 3 \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/checkAcceptTemplateConfirmation.st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/checkAcceptTemplateConfirmation.st index 065084c..738cabf 100644 --- a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/checkAcceptTemplateConfirmation.st +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/checkAcceptTemplateConfirmation.st @@ -2,14 +2,11 @@ template-choosing checkAcceptTemplateConfirmation | result | - result := UIManager default chooseFrom: {'Select Template'. 'Cancel'} values: {true. false} title: self formattingRemovedWarning. - result ifNil: [^ false]. - ^ result \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/chooseStructureToRemove.st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/chooseStructureToRemove.st index 54e601f..b3a3fc3 100644 --- a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/chooseStructureToRemove.st +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/chooseStructureToRemove.st @@ -2,6 +2,6 @@ text structures chooseStructureToRemove | chosen | - chosen := UIManager default chooseFrom: self textStructures values: self textStructures title: 'Remove:'. - chosen ifNotNil: [ - self document removeStructure: chosen] \ No newline at end of file + chosen := UIManager default chooseFrom: self textStructures + values: self textStructures title: 'Remove:'. + chosen ifNotNil: [self document removeStructure: chosen] \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/currentStructureSymbol..st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/currentStructureSymbol..st index 4ef99a7..bec6abc 100644 --- a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/currentStructureSymbol..st +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/currentStructureSymbol..st @@ -3,6 +3,7 @@ currentStructureSymbol: aSymbol self lastStructureSymbol: self currentStructureSymbol. currentStructureSymbol := aSymbol. - self changed: #allSelections; + self + changed: #allSelections; changed: #currentStructureSymbol; updateLoremIpsum \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/currentTemplateSymbol.st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/currentTemplateSymbol.st index 0490b24..7c77c6f 100644 --- a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/currentTemplateSymbol.st +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/currentTemplateSymbol.st @@ -1,3 +1,4 @@ accessing currentTemplateSymbol + ^ currentTemplateSymbol \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/formattingRemovedWarning.st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/formattingRemovedWarning.st index 2d10b07..fe23208 100644 --- a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/formattingRemovedWarning.st +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/formattingRemovedWarning.st @@ -1,4 +1,4 @@ template-choosing formattingRemovedWarning - ^ 'Note: By choosing a new template, all currently applied formatting of the text will be removed.' \ No newline at end of file + ^ 'Note: By choosing a new template, all structures that can not be matched to template structures will be removed.' \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/initialize.st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/initialize.st index f4c3c8c..48759b8 100644 --- a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/initialize.st +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/initialize.st @@ -2,4 +2,5 @@ initialize-release initialize self initializeLoremIpsum. + self currentStructureSymbol: RichTextNullStructure new structureIdentifier. self currentTemplateSymbol: RichTextStructureTemplate defaultTemplate identifier \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/isActiveStructureAt..st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/isActiveStructureAt..st index fae76aa..00b822c 100644 --- a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/isActiveStructureAt..st +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/isActiveStructureAt..st @@ -1,4 +1,4 @@ text attributes isActiveStructureAt: anIndex - ^ self currentStructure includes: (TextStructure new: (self structureIdentifierAt: anIndex)) \ No newline at end of file + ^ self currentStructure includes: (RichTextStructure new: (self structureIdentifierAt: anIndex)) \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/newNullTextStructure.st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/newNullTextStructure.st index 9d26895..d247dc2 100644 --- a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/newNullTextStructure.st +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/newNullTextStructure.st @@ -1,4 +1,4 @@ initialize-release newNullTextStructure - ^ NullTextStructure new \ No newline at end of file + ^ RichTextNullStructure new \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/openColorPicker.st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/openColorPicker.st index b8a6fd8..e5cb8e8 100644 --- a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/openColorPicker.st +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/openColorPicker.st @@ -1,6 +1,8 @@ text coloring openColorPicker + self currentStructureSymbol = #null ifTrue: [^ self currentStructure openColorPicker]. + "This should propably be handled by the TextStructure, thus requiring no null check" (NewColorPickerMorph on: self originalColor: self defaultColor diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/openFontChooser.st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/openFontChooser.st index e99a470..174ef6b 100644 --- a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/openFontChooser.st +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/openFontChooser.st @@ -1,8 +1,9 @@ text font openFontChooser - + + self currentStructureSymbol = #null ifTrue: [^ self currentStructure openFontChooser]. FontChooserTool openWithWindowTitle: 'FontChooser' for: self setSelector: #fontOfCurrentStructure: - getSelector: #defaultFont \ No newline at end of file + getSelector: #defaultFont diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/removeColorFromCurrentStructure.st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/removeColorFromCurrentStructure.st index c5c4757..686fb18 100644 --- a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/removeColorFromCurrentStructure.st +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/removeColorFromCurrentStructure.st @@ -1,4 +1,4 @@ text coloring removeColorFromCurrentStructure - self currentStructure remove: (TextStructure color) \ No newline at end of file + self currentStructure resetColor \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/removeFontFromCurrentStructure.st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/removeFontFromCurrentStructure.st index 8f0ede9..eb2bd4d 100644 --- a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/removeFontFromCurrentStructure.st +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/removeFontFromCurrentStructure.st @@ -1,4 +1,4 @@ text font removeFontFromCurrentStructure - self currentStructure remove: (TextStructure font) \ No newline at end of file + self currentStructure resetFont \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/removeStructure.st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/removeStructure.st index 049407a..226777a 100644 --- a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/removeStructure.st +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/removeStructure.st @@ -1,7 +1,7 @@ text structures removeStructure - self currentStructureSymbol ifNil: [ + (self currentStructureSymbol = #null) ifTrue: [ self chooseStructureToRemove. ^nil]. self document removeStructure: self currentStructureSymbol. diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/replaceColorOfCurrentStructure..st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/replaceColorOfCurrentStructure..st index 1dfd829..c9b74d4 100644 --- a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/replaceColorOfCurrentStructure..st +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/replaceColorOfCurrentStructure..st @@ -1,4 +1,4 @@ text coloring replaceColorOfCurrentStructure: aColor - self currentStructure add: (TextStructure fromColor: aColor) \ No newline at end of file + self currentStructure add: (RichTextStructure fromColor: aColor) \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/replaceFontOfCurrentStructure..st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/replaceFontOfCurrentStructure..st index dfdd859..80e8d49 100644 --- a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/replaceFontOfCurrentStructure..st +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/replaceFontOfCurrentStructure..st @@ -1,4 +1,4 @@ text font replaceFontOfCurrentStructure: aFont - self currentStructure add: (TextStructure fromFont: aFont) \ No newline at end of file + self currentStructure add: (RichTextStructure fromFont: aFont) \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/structureAt.activate..st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/structureAt.activate..st index ad8029f..b25ff18 100644 --- a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/structureAt.activate..st +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/structureAt.activate..st @@ -3,9 +3,9 @@ structureAt: anIndex activate: aBoolean | target targetTextStructure | target := self currentStructure. - targetTextStructure := (TextStructure predefinedStructureFor: + targetTextStructure := (RichTextStructure predefinedStructureFor: (self structureIdentifierAt: anIndex)). aBoolean - ifTrue: [ target add: targetTextStructure] - ifFalse: [ target remove: targetTextStructure]. + ifTrue: [target add: targetTextStructure] + ifFalse: [target remove: targetTextStructure]. self updateLoremIpsum \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/structureButtonPanelFrame.st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/structureButtonPanelFrame.st new file mode 100644 index 0000000..8cdb30c --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/structureButtonPanelFrame.st @@ -0,0 +1,9 @@ +toolbuilder +structureButtonPanelFrame + + ^ LayoutFrame new + leftFraction: 0; + rightFraction: 1; + topFraction: 1 offset: self buttonHeight negated; + bottomFraction: 1; + yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/structureFieldFrame.st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/structureFieldFrame.st new file mode 100644 index 0000000..54042c9 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/structureFieldFrame.st @@ -0,0 +1,9 @@ +toolbuilder +structureFieldFrame + + ^ LayoutFrame new + leftFraction: 0; + rightFraction: 1; + topFraction: 0; + bottomFraction: 1 offset: self buttonHeight negated; + yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/structureIdentifierAt..st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/structureIdentifierAt..st index 9462a9b..49254e6 100644 --- a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/structureIdentifierAt..st +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/structureIdentifierAt..st @@ -1,4 +1,4 @@ text attributes structureIdentifierAt: anIndex - ^ self allStructureIdentifiers at: anIndex \ No newline at end of file + ^ self allStyleIdentifiers at: anIndex \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/structurePanelFrame.st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/structurePanelFrame.st new file mode 100644 index 0000000..128541d --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/structurePanelFrame.st @@ -0,0 +1,9 @@ +toolbuilder +structurePanelFrame + + ^ LayoutFrame new + leftFraction: 0.2; + rightFraction: 0.6; + topFraction: 0; + bottomFraction: 1; + yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/styleButtonPanelFrame.st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/styleButtonPanelFrame.st new file mode 100644 index 0000000..b0ab25a --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/styleButtonPanelFrame.st @@ -0,0 +1,9 @@ +toolbuilder +styleButtonPanelFrame + + ^ LayoutFrame new + leftFraction: 0; + rightFraction: 1; + topFraction: 0.5; + bottomFraction: 0.5 offset: self buttonHeight * 2; + yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/styleFieldFrame.st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/styleFieldFrame.st new file mode 100644 index 0000000..276834f --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/styleFieldFrame.st @@ -0,0 +1,9 @@ +toolbuilder +styleFieldFrame + + ^ LayoutFrame new + leftFraction: 0; + rightFraction: 1; + topFraction: 0; + bottomFraction: 0.5; + yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/stylePanelFrame.st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/stylePanelFrame.st new file mode 100644 index 0000000..77d32ba --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/stylePanelFrame.st @@ -0,0 +1,9 @@ +toolbuilder +stylePanelFrame + + ^ LayoutFrame new + leftFraction: 0.6; + rightFraction: 1; + topFraction: 0; + bottomFraction: 1; + yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/templateFieldFrame.st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/templateFieldFrame.st new file mode 100644 index 0000000..0fdaa20 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/templateFieldFrame.st @@ -0,0 +1,9 @@ +toolbuilder +templateFieldFrame + + ^ LayoutFrame new + leftFraction: 0; + rightFraction: 1; + topFraction: 0; + bottomFraction: 1 offset: self buttonHeight negated; + yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/templateIdentifiers.st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/templateIdentifiers.st index a311d62..982f431 100644 --- a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/templateIdentifiers.st +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/templateIdentifiers.st @@ -1,4 +1,4 @@ template-choosing templateIdentifiers - ^ RichTextStructureTemplate availableTemplates collect: [ : each | each identifier ] \ No newline at end of file + ^ RichTextStructureTemplate availableTemplates collect: [:each | each identifier] \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/templatePanelFrame.st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/templatePanelFrame.st new file mode 100644 index 0000000..026d64b --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/templatePanelFrame.st @@ -0,0 +1,9 @@ +toolbuilder +templatePanelFrame + + ^ LayoutFrame new + leftFraction: 0; + rightFraction: 0.2; + topFraction: 0; + bottomFraction: 1; + yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/textPreviewFrame.st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/textPreviewFrame.st new file mode 100644 index 0000000..6b2ccfb --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/textPreviewFrame.st @@ -0,0 +1,9 @@ +toolbuilder +textPreviewFrame + + ^ LayoutFrame new + leftFraction: 0; + rightFraction: 1; + topFraction: 0.5 offset: self styleButtonPanelFrame bottomOffset; + bottomFraction: 1; + yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/update..st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/update..st index 635a33b..ef72507 100644 --- a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/update..st +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/update..st @@ -1,7 +1,7 @@ change update: aParameter - (aParameter = #font or: [aParameter = #color]) + (#(font color) includes: aParameter) ifTrue: [self updateLoremIpsum. self document textChanged]. super update: aParameter \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/updateLoremIpsum.st b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/updateLoremIpsum.st index f9ac698..fb9b5bb 100644 --- a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/updateLoremIpsum.st +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/instance/updateLoremIpsum.st @@ -3,7 +3,8 @@ updateLoremIpsum self lastStructureSymbol ifNotNil: [ self loremIpsum removeAttribute: - (self document textStructureAt: self lastStructureSymbol) from: 1 to: self loremIpsum size]. + (self document textStructureAt: self lastStructureSymbol) + from: 1 to: self loremIpsum size]. self currentStructureSymbol ifNotNil: [ self loremIpsum addAttribute: self currentStructure from: 1 to: self loremIpsum size]. diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/methodProperties.json b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/methodProperties.json index 1bc4d83..593f21b 100644 --- a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/methodProperties.json +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/methodProperties.json @@ -1,34 +1,42 @@ { "class" : { - "allStructureIdentifiers" : "kh 6/21/2020 16:22", + "allStyleIdentifiers" : "tok 8/7/2020 20:05", + "open:" : "kh 7/27/2020 12:29", "openWith:" : "AG 7/25/2019 13:15" }, "instance" : { "acceptNewTemplate" : "JEH 7/6/2020 15:56", + "acceptTemplateButtonFrame" : "frc 8/7/2020 11:57", "addNewStructure" : "ls 7/24/2019 17:06", - "allStructureIdentifiers" : "kh 6/21/2020 16:17", - "buildAcceptTemplateButtonWith:" : "JEH 7/9/2020 14:10", - "buildAddStructureButtonWith:" : "JEH 7/6/2020 15:37", - "buildColorButtonWith:" : "JEH 7/6/2020 15:33", - "buildColorResetButtonWith:" : "JEH 7/6/2020 15:33", - "buildDecreasePriorityButtonWith:" : "JEH 7/6/2020 15:37", - "buildFontButtonWith:" : "JEH 7/6/2020 15:34", - "buildFontResetButtonWith:" : "JEH 7/6/2020 15:35", - "buildIncreasePriorityButtonWith:" : "JEH 7/6/2020 15:36", - "buildRemoveStructureButtonWith:" : "JEH 7/6/2020 15:36", - "buildStructureFieldWith:" : "JEH 7/6/2020 15:32", - "buildStyleFieldWith:" : "JEH 7/6/2020 15:38", - "buildTemplateFieldWith:" : "JEH 7/6/2020 15:50", - "buildTextPreviewFieldWith:" : "JEH 7/6/2020 15:38", - "buildWith:" : "JEH 7/6/2020 15:50", - "checkAcceptTemplateConfirmation" : "JEH 7/10/2020 14:56", - "chooseStructureToRemove" : "ls 7/24/2019 17:26", + "allStyleIdentifiers" : "tok 8/7/2020 20:05", + "buildAcceptTemplateButtonWith:" : "kh 7/27/2020 11:48", + "buildAddStructureButtonWith:" : "kh 7/11/2020 19:14", + "buildColorButtonWith:" : "kh 7/11/2020 19:21", + "buildColorResetButtonWith:" : "kh 7/11/2020 19:21", + "buildDecreasePriorityButtonWith:" : "kh 7/11/2020 19:14", + "buildFontButtonWith:" : "kh 7/11/2020 19:21", + "buildFontResetButtonWith:" : "kh 7/11/2020 19:22", + "buildIncreasePriorityButtonWith:" : "kh 7/11/2020 19:14", + "buildRemoveStructureButtonWith:" : "kh 7/11/2020 19:14", + "buildStructureButtonPanelWith:" : "kh 7/27/2020 14:11", + "buildStructureFieldWith:" : "kh 7/27/2020 14:11", + "buildStructurePanelWith:" : "kh 7/27/2020 14:08", + "buildStyleButtonPanelWith:" : "kh 7/27/2020 14:11", + "buildStyleFieldWith:" : "tok 8/7/2020 20:05", + "buildStylePanelWith:" : "kh 7/27/2020 14:08", + "buildTemplateFieldWith:" : "kh 7/27/2020 11:39", + "buildTemplatePanelWith:" : "kh 7/27/2020 14:08", + "buildTextPreviewFieldWith:" : "kh 7/27/2020 14:11", + "buildWith:" : "kh 7/27/2020 11:36", + "buttonHeight" : "kh 7/27/2020 14:09", + "checkAcceptTemplateConfirmation" : "tok 8/7/2020 20:47", + "chooseStructureToRemove" : "tok 8/7/2020 20:48", "colorOfCurrentStructure:" : "kh 6/21/2020 15:46", "copyTextStructures" : "lh 7/24/2019 18:33", "currentPriority" : "kh 6/19/2020 10:46", "currentStructure" : "kh 6/21/2020 11:22", "currentStructureSymbol" : "kh 6/19/2020 10:48", - "currentStructureSymbol:" : "OS 7/10/2020 13:29", - "currentTemplateSymbol" : "JEH 7/6/2020 15:25", + "currentStructureSymbol:" : "tok 8/7/2020 20:48", + "currentTemplateSymbol" : "tok 8/7/2020 20:48", "currentTemplateSymbol:" : "JEH 7/6/2020 15:25", "decreasePriority" : "ls 7/24/2019 22:36", "defaultColor" : "kh 6/18/2020 23:09", @@ -36,30 +44,39 @@ "document" : "ls 7/24/2019 16:49", "document:" : "ls 7/24/2019 16:49", "fontOfCurrentStructure:" : "kh 6/21/2020 15:45", - "formattingRemovedWarning" : "JEH 7/10/2020 14:59", + "formattingRemovedWarning" : "frc 7/15/2020 18:15", "increasePriority" : "ls 7/24/2019 22:36", - "initialize" : "JEH 7/6/2020 15:26", + "initialize" : "tok 8/7/2020 15:53", "initializeLoremIpsum" : "lh 7/24/2019 16:16", - "isActiveStructureAt:" : "kh 6/21/2020 16:19", + "isActiveStructureAt:" : "tok 8/7/2020 15:52", "lastStructureSymbol" : "AG 7/25/2019 10:43", "lastStructureSymbol:" : "AG 7/25/2019 10:43", "loremIpsum" : "ls 6/5/2019 22:07", "loremIpsum:" : "ls 6/5/2019 22:07", "loremIpsumDefault" : "lh 7/24/2019 16:16", - "newNullTextStructure" : "kh 6/18/2020 22:07", - "openColorPicker" : "kh 6/21/2020 15:41", - "openFontChooser" : "kh 6/21/2020 15:45", - "removeColorFromCurrentStructure" : "kh 6/19/2020 18:04", - "removeFontFromCurrentStructure" : "kh 6/19/2020 18:07", - "removeStructure" : "kh 6/19/2020 10:47", - "replaceColorOfCurrentStructure:" : "kh 6/25/2020 13:57", - "replaceFontOfCurrentStructure:" : "kh 6/25/2020 13:57", + "newNullTextStructure" : "tok 8/7/2020 15:53", + "openColorPicker" : "frc 7/30/2020 11:27", + "openFontChooser" : "frc 7/30/2020 11:43", + "removeColorFromCurrentStructure" : "frc 7/30/2020 11:48", + "removeFontFromCurrentStructure" : "frc 7/30/2020 11:45", + "removeStructure" : "frc 7/30/2020 11:08", + "replaceColorOfCurrentStructure:" : "tok 8/7/2020 15:52", + "replaceFontOfCurrentStructure:" : "tok 8/7/2020 15:52", "resetColorOfCurrentStructure" : "kh 6/19/2020 18:05", "resetFontOfCurrentStructure" : "kh 6/19/2020 18:07", - "structureAt:activate:" : "kh 6/21/2020 16:19", - "structureIdentifierAt:" : "kh 6/21/2020 16:18", - "templateIdentifiers" : "JEH 7/6/2020 15:25", + "structureAt:activate:" : "tok 8/7/2020 20:49", + "structureButtonPanelFrame" : "frc 8/7/2020 11:58", + "structureFieldFrame" : "frc 8/7/2020 11:58", + "structureIdentifierAt:" : "tok 8/7/2020 20:05", + "structurePanelFrame" : "frc 8/7/2020 11:58", + "styleButtonPanelFrame" : "frc 8/7/2020 11:58", + "styleFieldFrame" : "frc 8/7/2020 11:58", + "stylePanelFrame" : "frc 8/7/2020 11:58", + "templateFieldFrame" : "frc 8/7/2020 11:58", + "templateIdentifiers" : "tok 8/7/2020 20:49", + "templatePanelFrame" : "frc 8/7/2020 11:58", + "textPreviewFrame" : "frc 8/7/2020 11:58", "textStructures" : "ls 7/24/2019 16:55", - "update:" : "ls 7/24/2019 21:57", - "updateLoremIpsum" : "kh 6/21/2020 10:04", + "update:" : "frc 7/16/2020 13:52", + "updateLoremIpsum" : "tok 8/7/2020 20:49", "updateStructures:" : "lh 7/25/2019 11:05" } } diff --git a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/properties.json b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/properties.json index 95f7a38..05c8926 100644 --- a/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/properties.json +++ b/packages/RichTextEditing-Core.package/RichTextStructureEditor.class/properties.json @@ -4,7 +4,7 @@ ], "classvars" : [ ], - "commentStamp" : "ls 7/25/2019 13:53", + "commentStamp" : "JEH 8/7/2020 17:25", "instvars" : [ "document", "structureList", diff --git a/packages/RichTextEditing-Core.package/RichTextStructureTemplate.class/class/applyOn..st b/packages/RichTextEditing-Core.package/RichTextStructureTemplate.class/class/applyOn..st new file mode 100644 index 0000000..a322ac1 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextStructureTemplate.class/class/applyOn..st @@ -0,0 +1,5 @@ +apply +applyOn: aDocument + + self transformStructuresOn: aDocument. + aDocument setTemplateStructures \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureTemplate.class/class/clearAllTemplatesCachedDictionaries.st b/packages/RichTextEditing-Core.package/RichTextStructureTemplate.class/class/clearAllTemplatesCachedDictionaries.st new file mode 100644 index 0000000..709d244 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextStructureTemplate.class/class/clearAllTemplatesCachedDictionaries.st @@ -0,0 +1,4 @@ +resetting +clearAllTemplatesCachedDictionaries + + self availableTemplates do: [:each | each clearCachedDictionaries] \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureTemplate.class/class/initialStructureIdentifiers.st b/packages/RichTextEditing-Core.package/RichTextStructureTemplate.class/class/initialStructureIdentifiers.st index c3b2ef2..12a5131 100644 --- a/packages/RichTextEditing-Core.package/RichTextStructureTemplate.class/class/initialStructureIdentifiers.st +++ b/packages/RichTextEditing-Core.package/RichTextStructureTemplate.class/class/initialStructureIdentifiers.st @@ -1,4 +1,4 @@ initial structures initialStructureIdentifiers - ^ self initialTextStructures collect: [:each | each structureIdentifier ] \ No newline at end of file + ^ self textStructures collect: [:each | each structureIdentifier] \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureTemplate.class/class/selectValidStructures..st b/packages/RichTextEditing-Core.package/RichTextStructureTemplate.class/class/selectValidStructures..st new file mode 100644 index 0000000..a30df22 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextStructureTemplate.class/class/selectValidStructures..st @@ -0,0 +1,4 @@ +apply +selectValidStructures: aCollection + + ^ (aCollection collect: [:each | self transformStructure: each]) reject: [:each | each isNil] \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureTemplate.class/class/templateFromIdentifier..st b/packages/RichTextEditing-Core.package/RichTextStructureTemplate.class/class/templateFromIdentifier..st index f74a6a3..35eba23 100644 --- a/packages/RichTextEditing-Core.package/RichTextStructureTemplate.class/class/templateFromIdentifier..st +++ b/packages/RichTextEditing-Core.package/RichTextStructureTemplate.class/class/templateFromIdentifier..st @@ -1,4 +1,4 @@ accessing templateFromIdentifier: aSymbol - ^ self subclasses detect: [ : each | each identifier = aSymbol ] \ No newline at end of file + ^ self subclasses detect: [:each | each identifier = aSymbol] \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureTemplate.class/class/textStructureByIndentifier..st b/packages/RichTextEditing-Core.package/RichTextStructureTemplate.class/class/textStructureByIndentifier..st new file mode 100644 index 0000000..1adb2d9 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextStructureTemplate.class/class/textStructureByIndentifier..st @@ -0,0 +1,5 @@ +text structures +textStructureByIndentifier: aSymbol + + self textStructures do: [:each | each structureIdentifier = aSymbol ifTrue: [^ each]]. + ^ nil \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureTemplate.class/class/textStructures.st b/packages/RichTextEditing-Core.package/RichTextStructureTemplate.class/class/textStructures.st new file mode 100644 index 0000000..ace39cd --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextStructureTemplate.class/class/textStructures.st @@ -0,0 +1,5 @@ +text structures +textStructures + "Handled in subclasses to access appropriate class variables" + + ^ self subclassResponsibility \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureTemplate.class/class/transformStructure..st b/packages/RichTextEditing-Core.package/RichTextStructureTemplate.class/class/transformStructure..st new file mode 100644 index 0000000..1132d28 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextStructureTemplate.class/class/transformStructure..st @@ -0,0 +1,6 @@ +apply +transformStructure: aTextStructure + + (self initialStructureIdentifiers includes: (aTextStructure structureIdentifier)) ifTrue: [ + ^ self textStructureByIndentifier: aTextStructure structureIdentifier]. + ^ nil \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureTemplate.class/class/transformStructuresOn..st b/packages/RichTextEditing-Core.package/RichTextStructureTemplate.class/class/transformStructuresOn..st new file mode 100644 index 0000000..555d9b8 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextStructureTemplate.class/class/transformStructuresOn..st @@ -0,0 +1,5 @@ +apply +transformStructuresOn: aDocument + + aDocument textStructures: self initialTextStructures. + aDocument textRuns: (self updateRunArrayOn: aDocument with: self initialTextStructures) \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureTemplate.class/class/updateRunArrayOn.with..st b/packages/RichTextEditing-Core.package/RichTextStructureTemplate.class/class/updateRunArrayOn.with..st new file mode 100644 index 0000000..bf332c2 --- /dev/null +++ b/packages/RichTextEditing-Core.package/RichTextStructureTemplate.class/class/updateRunArrayOn.with..st @@ -0,0 +1,9 @@ +apply +updateRunArrayOn: aDocument with: newStructures + + | initialRuns newRuns | + newRuns := OrderedCollection new. + initialRuns := aDocument textRuns. + initialRuns do: [:each | + newRuns add: (self selectValidStructures: each)]. + ^ RunArray newFrom: newRuns \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/RichTextStructureTemplate.class/methodProperties.json b/packages/RichTextEditing-Core.package/RichTextStructureTemplate.class/methodProperties.json index 504f597..4be6fa0 100644 --- a/packages/RichTextEditing-Core.package/RichTextStructureTemplate.class/methodProperties.json +++ b/packages/RichTextEditing-Core.package/RichTextStructureTemplate.class/methodProperties.json @@ -1,10 +1,18 @@ { "class" : { + "applyOn:" : "frc 8/7/2020 14:43", "availableTemplates" : "JEH 7/4/2020 11:16", + "clearAllTemplatesCachedDictionaries" : "JEH 7/25/2020 18:51", "defaultTemplate" : "JEH 7/4/2020 11:16", "identifier" : "JEH 7/4/2020 11:17", - "initialStructureIdentifiers" : "JEH 7/10/2020 15:00", + "initialStructureIdentifiers" : "tok 8/7/2020 20:56", "initialTextStructures" : "JEH 7/4/2020 11:17", - "templateFromIdentifier:" : "JEH 7/4/2020 11:41" }, + "selectValidStructures:" : "frc 7/15/2020 18:24", + "templateFromIdentifier:" : "tok 8/7/2020 20:56", + "textStructureByIndentifier:" : "JEH 8/3/2020 15:02", + "textStructures" : "tok 8/7/2020 20:57", + "transformStructure:" : "frc 8/7/2020 14:43", + "transformStructuresOn:" : "frc 8/7/2020 14:43", + "updateRunArrayOn:with:" : "tok 8/7/2020 20:57" }, "instance" : { } } diff --git a/packages/RichTextEditing-Core.package/RichTextStructureTemplate.class/properties.json b/packages/RichTextEditing-Core.package/RichTextStructureTemplate.class/properties.json index 055d28f..9983df6 100644 --- a/packages/RichTextEditing-Core.package/RichTextStructureTemplate.class/properties.json +++ b/packages/RichTextEditing-Core.package/RichTextStructureTemplate.class/properties.json @@ -1,7 +1,7 @@ { "category" : "RichTextEditing-Core", "classinstvars" : [ - ], + "textStructures" ], "classvars" : [ ], "commentStamp" : "JEH 7/10/2020 15:07", diff --git a/packages/RichTextEditing-Core.package/SquidWordHelp.class/README.md b/packages/RichTextEditing-Core.package/SquidWordHelp.class/README.md deleted file mode 100644 index ffec2a6..0000000 --- a/packages/RichTextEditing-Core.package/SquidWordHelp.class/README.md +++ /dev/null @@ -1,4 +0,0 @@ -I am a class containing help topics on SquidWord. The help provided by me is included automatically 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. \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/SquidWordHelp.class/class/keyboardShortcuts.st b/packages/RichTextEditing-Core.package/SquidWordHelp.class/class/keyboardShortcuts.st deleted file mode 100644 index c558ddc..0000000 --- a/packages/RichTextEditing-Core.package/SquidWordHelp.class/class/keyboardShortcuts.st +++ /dev/null @@ -1,19 +0,0 @@ -pages -keyboardShortcuts - "This method was automatically generated. Edit it using:" - "SquidWordHelp edit: #keyboardShortcuts" - ^(HelpTopic - title: 'Keyboard Shortcuts' - contents: -'Structuring -Ctrl-Shift-[1,2,...,0] toggle 1st, 2nd, ... or 10th structure from the top of the structure list - -Editing -Shift-Enter insert normal line break - -Document management -Ctrl-s save current document! -]style[(11 99 7 39 19 30)f1i,f1,f1i,f1,f1i,f1!' readStream nextChunkText) - key: #keyboardShortcuts; - shouldStyle: false; - yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/SquidWordHelp.class/class/pages.st b/packages/RichTextEditing-Core.package/SquidWordHelp.class/class/pages.st deleted file mode 100644 index 5dc1bb3..0000000 --- a/packages/RichTextEditing-Core.package/SquidWordHelp.class/class/pages.st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -pages - - ^ #(welcome editing structureEditor keyboardShortcuts) \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/SquidWordHelp.class/class/structureEditor.st b/packages/RichTextEditing-Core.package/SquidWordHelp.class/class/structureEditor.st deleted file mode 100644 index 480bbef..0000000 --- a/packages/RichTextEditing-Core.package/SquidWordHelp.class/class/structureEditor.st +++ /dev/null @@ -1,20 +0,0 @@ -pages -structureEditor - "This method was automatically generated. Edit it using:" - "SquidWordHelp edit: #structureEditor" - ^(HelpTopic - title: 'Structure Editor' - contents: -'SquidWord allows you to customize structures and their styles per document using the Structure Editor. - -You can launch the Structure Editor by clicking on the "Manage Structures" button in the bottom left corner of a SquidWord instance. - -There you can modify the way the structures are displayed (font, text color, text attributes like bold and italic) by first selecting the structure you want to modify on the left and then setting the style for that structure on the right. A preview of the currently selected structure applied to some text is shown in the bottom right. - -Using the "+" and "-" buttons you can create additional structures or remove existing ones. - -Using the "Up" and "Down" buttons you can rearrange the structures in the list. Attributes like color of structures at the top of the list take priority over the same attributes with different values lower in the list if multiple structures are applied to the same text. The order of the structures in the main editor is the same as the order in the structure editor and affects the shortcuts for text structures (see "Keyboard Shortcuts").! -]style[(123 16 948 19 2)f1,,f1,,f1!' readStream nextChunkText) - key: #structureEditor; - shouldStyle: false; - yourself \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/SquidWordHelp.class/methodProperties.json b/packages/RichTextEditing-Core.package/SquidWordHelp.class/methodProperties.json deleted file mode 100644 index ff3215b..0000000 --- a/packages/RichTextEditing-Core.package/SquidWordHelp.class/methodProperties.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "class" : { - "bookName" : "kh 5/25/2020 16:31", - "editing" : "kh 5/25/2020 22:33", - "keyboardShortcuts" : "kh 5/25/2020 22:31", - "pages" : "kh 5/25/2020 18:12", - "structureEditor" : "kh 5/25/2020 22:23", - "welcome" : "kh 5/25/2020 18:11" }, - "instance" : { - } } diff --git a/packages/RichTextEditing-Core.package/TextStructure.class/class/autohyperlink.st b/packages/RichTextEditing-Core.package/TextStructure.class/class/autohyperlink.st deleted file mode 100644 index d9fc3a6..0000000 --- a/packages/RichTextEditing-Core.package/TextStructure.class/class/autohyperlink.st +++ /dev/null @@ -1,8 +0,0 @@ -predefined -autohyperlink - - | structure | - structure:= self new: #hyperlink from: {TextStructure hyperlinkTo: 'https://example.com'}. - structure preAddHook: [:text | - structure add: (TextStructure hyperlinkTo: text asString)]. - ^ structure \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/TextStructure.class/class/hyperlinkTo..st b/packages/RichTextEditing-Core.package/TextStructure.class/class/hyperlinkTo..st deleted file mode 100644 index 5a000a9..0000000 --- a/packages/RichTextEditing-Core.package/TextStructure.class/class/hyperlinkTo..st +++ /dev/null @@ -1,4 +0,0 @@ -predefined -hyperlinkTo: url - - ^ self new: #hyperlink from: {TextURL new url: url}. \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/TextStructure.class/class/new.from..st b/packages/RichTextEditing-Core.package/TextStructure.class/class/new.from..st deleted file mode 100644 index 31da5b0..0000000 --- a/packages/RichTextEditing-Core.package/TextStructure.class/class/new.from..st +++ /dev/null @@ -1,4 +0,0 @@ -instance creation -new: aSymbol from: aCollection - - ^ (self new: aSymbol) attributes: aCollection asSet. \ No newline at end of file diff --git a/packages/RichTextEditing-Core.package/TextStructure.class/class/notExtendable.st b/packages/RichTextEditing-Core.package/TextStructure.class/class/notExtendable.st deleted file mode 100644 index 88632b6..0000000 --- a/packages/RichTextEditing-Core.package/TextStructure.class/class/notExtendable.st +++ /dev/null @@ -1,4 +0,0 @@ -predefined -notExtendable - - ^ self new: #notExtendable from: {TextExtendability no} \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextDocumentReadStreamTests.class/instance/isBeginningOfStructure..st b/packages/RichTextEditing-Tests.package/RichTextDocumentReadStreamTests.class/instance/isBeginningOfStructure..st index e19350d..102831b 100644 --- a/packages/RichTextEditing-Tests.package/RichTextDocumentReadStreamTests.class/instance/isBeginningOfStructure..st +++ b/packages/RichTextEditing-Tests.package/RichTextDocumentReadStreamTests.class/instance/isBeginningOfStructure..st @@ -1,4 +1,4 @@ utilities isBeginningOfStructure: aListElement - ^ aListElement first = #beginningOfStructure \ No newline at end of file + ^ aListElement first = #beginOfStructure \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextDocumentReadStreamTests.class/instance/isParagraph..st b/packages/RichTextEditing-Tests.package/RichTextDocumentReadStreamTests.class/instance/isParagraph..st index 9df56ca..20e54f1 100644 --- a/packages/RichTextEditing-Tests.package/RichTextDocumentReadStreamTests.class/instance/isParagraph..st +++ b/packages/RichTextEditing-Tests.package/RichTextDocumentReadStreamTests.class/instance/isParagraph..st @@ -1,4 +1,4 @@ utilities isParagraph: aListElement - ^ aListElement = #paragraph \ No newline at end of file + ^ aListElement first = #paragraph \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextDocumentReadStreamTests.class/instance/paragraphCharacter.st b/packages/RichTextEditing-Tests.package/RichTextDocumentReadStreamTests.class/instance/paragraphCharacter.st deleted file mode 100644 index e2f7de3..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextDocumentReadStreamTests.class/instance/paragraphCharacter.st +++ /dev/null @@ -1,4 +0,0 @@ -constants -paragraphCharacter - - ^ Character value: 182 \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextDocumentReadStreamTests.class/instance/stopConditionsForExampleText.st b/packages/RichTextEditing-Tests.package/RichTextDocumentReadStreamTests.class/instance/stopConditionsForExampleText.st new file mode 100644 index 0000000..6732528 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextDocumentReadStreamTests.class/instance/stopConditionsForExampleText.st @@ -0,0 +1,8 @@ +acceptance-tests +stopConditionsForExampleText + + | stream | + self document text: self textWithAttributes. + stream := RichTextDocumentReadStream on: self document. + stream next. + ^ stream next second \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextDocumentReadStreamTests.class/instance/testUS59EndOfStructureAndBeginOfStructureIncludeStructure.st b/packages/RichTextEditing-Tests.package/RichTextDocumentReadStreamTests.class/instance/testUS59EndOfStructureAndBeginOfStructureIncludeStructure.st index d360e0c..ed46007 100644 --- a/packages/RichTextEditing-Tests.package/RichTextDocumentReadStreamTests.class/instance/testUS59EndOfStructureAndBeginOfStructureIncludeStructure.st +++ b/packages/RichTextEditing-Tests.package/RichTextDocumentReadStreamTests.class/instance/testUS59EndOfStructureAndBeginOfStructureIncludeStructure.st @@ -1,9 +1,7 @@ acceptance-tests testUS59EndOfStructureAndBeginOfStructureIncludeStructure - | stream stopConditions | - self document text: self textWithAttributes. - stream := DocumentReadStream on: self document. - stopConditions := stream next second. - self assert: (((stopConditions at: 1) second) = {self boldTextStructure}). - self assert: (((stopConditions at: 3) second) = {self italicTextStructure}). \ No newline at end of file + | stopConditions | + stopConditions := self stopConditionsForExampleText. + self assert: (((stopConditions first) second) = {self boldTextStructure} asOrderedCollection). + self assert: (((stopConditions third) second) = {self italicTextStructure} asOrderedCollection) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextDocumentReadStreamTests.class/instance/testUS59NextReturnsNextSectionOfTextAndListOfStopConditions.st b/packages/RichTextEditing-Tests.package/RichTextDocumentReadStreamTests.class/instance/testUS59NextReturnsNextSectionOfTextAndListOfStopConditions.st index da67124..c66967b 100644 --- a/packages/RichTextEditing-Tests.package/RichTextDocumentReadStreamTests.class/instance/testUS59NextReturnsNextSectionOfTextAndListOfStopConditions.st +++ b/packages/RichTextEditing-Tests.package/RichTextDocumentReadStreamTests.class/instance/testUS59NextReturnsNextSectionOfTextAndListOfStopConditions.st @@ -1,9 +1,8 @@ acceptance-tests testUS59NextReturnsNextSectionOfTextAndListOfStopConditions - | testText stream | - testText := ('hello', self paragraphCharacter asString, 'world') asText. - self document text: testText. - stream := DocumentReadStream on: self document. - self assert: stream next = {('hello', self paragraphCharacter asString) asText. {#paragraph}}. - self assert: stream next = {'world' asText. {#endOfDocument}} \ No newline at end of file + | stream | + self document text: self textWithParagraph. + stream := RichTextDocumentReadStream on: self document. + self assert: stream next = {('hello', RichTextEditor paragraphCharacter asString) asText. {{#paragraph}}}. + self assert: stream next = {'world' asText. {{#endOfDocument}}} \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextDocumentReadStreamTests.class/instance/testUS59ReadStreamExists.st b/packages/RichTextEditing-Tests.package/RichTextDocumentReadStreamTests.class/instance/testUS59ReadStreamExists.st index c8951a2..67dc58a 100644 --- a/packages/RichTextEditing-Tests.package/RichTextDocumentReadStreamTests.class/instance/testUS59ReadStreamExists.st +++ b/packages/RichTextEditing-Tests.package/RichTextDocumentReadStreamTests.class/instance/testUS59ReadStreamExists.st @@ -1,4 +1,4 @@ acceptance-tests testUS59ReadStreamExists - self assert: (Smalltalk hasClassNamed: #DocumentReadStream) \ No newline at end of file + self assert: (Smalltalk hasClassNamed: #RichTextDocumentReadStream) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextDocumentReadStreamTests.class/instance/testUS59StopConditionsAreInCorrectOrder.st b/packages/RichTextEditing-Tests.package/RichTextDocumentReadStreamTests.class/instance/testUS59StopConditionsAreInCorrectOrder.st index de1d861..0f7cb66 100644 --- a/packages/RichTextEditing-Tests.package/RichTextDocumentReadStreamTests.class/instance/testUS59StopConditionsAreInCorrectOrder.st +++ b/packages/RichTextEditing-Tests.package/RichTextDocumentReadStreamTests.class/instance/testUS59StopConditionsAreInCorrectOrder.st @@ -1,10 +1,9 @@ acceptance-tests testUS59StopConditionsAreInCorrectOrder - | stream stopConditions | - self document text: self textWithAttributes. - stream := DocumentReadStream on: self document. - stopConditions := stream next second. - self assert: (self isEndOfStructure: (stopConditions at: 1)). - self assert: (self isParagraph: (stopConditions at: 2)). - self assert: (self isBeginningOfStructure: (stopConditions at: 3)). \ No newline at end of file + | stopConditions | + stopConditions := self stopConditionsForExampleText. + self + assert: (self isEndOfStructure: (stopConditions first)); + assert: (self isParagraph: (stopConditions second)); + assert: (self isBeginningOfStructure: (stopConditions third)) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextDocumentReadStreamTests.class/methodProperties.json b/packages/RichTextEditing-Tests.package/RichTextDocumentReadStreamTests.class/methodProperties.json index 8590952..50573a7 100644 --- a/packages/RichTextEditing-Tests.package/RichTextDocumentReadStreamTests.class/methodProperties.json +++ b/packages/RichTextEditing-Tests.package/RichTextDocumentReadStreamTests.class/methodProperties.json @@ -2,12 +2,11 @@ "class" : { }, "instance" : { - "isBeginningOfStructure:" : "OS 7/10/2020 12:17", + "isBeginningOfStructure:" : "OS 8/7/2020 09:58", "isEndOfStructure:" : "frc 7/13/2020 13:29", - "isParagraph:" : "OS 7/10/2020 12:20", - "paragraphCharacter" : "OS 7/10/2020 11:34", - "testUS59EndOfStructureAndBeginOfStructureIncludeStructure" : "OS 7/10/2020 12:26", - "testUS59NextReturnsNextSectionOfTextAndListOfStopConditions" : "OS 7/10/2020 12:27", + "isParagraph:" : "JEH 7/26/2020 18:39", + "stopConditionsForExampleText" : "tok 8/7/2020 17:46", + "testUS59EndOfStructureAndBeginOfStructureIncludeStructure" : "tok 8/7/2020 17:46", + "testUS59NextReturnsNextSectionOfTextAndListOfStopConditions" : "tok 8/7/2020 17:44", "testUS59ReadStreamExists" : "OS 7/10/2020 11:22", - "testUS59StopConditionsAreInCorrectOrder" : "OS 7/10/2020 12:22", - "textWithAttributes" : "frc 7/13/2020 13:29" } } + "testUS59StopConditionsAreInCorrectOrder" : "tok 8/7/2020 17:47" } } diff --git a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/class/lastStoredRun.st b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/class/lastStoredRun.st deleted file mode 100644 index 80cee52..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/class/lastStoredRun.st +++ /dev/null @@ -1,3 +0,0 @@ -history -lastStoredRun - ^ ((Dictionary new) add: (#duration->709); add: (#errors->((Set new))); add: (#passed->((Set new) add: #testDocumentCanOpenEditor; yourself)); add: (#failures->((Set new))); add: (#timeStamp->'12 June 2020 7:58:47.300548 pm' asTimeStamp); add: (#durations->((Dictionary new) add: (#testDocumentCanOpenEditor->709); yourself)); yourself) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/ASCIISymbolsOfLetterA.st b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/ASCIISymbolsOfLetterA.st new file mode 100644 index 0000000..05c2ea2 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/ASCIISymbolsOfLetterA.st @@ -0,0 +1,4 @@ +constants +ASCIISymbolsOfLetterA + + ^ #(65 97) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/boldIsListed.st b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/boldIsListed.st index f9821a7..efd080c 100644 --- a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/boldIsListed.st +++ b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/boldIsListed.st @@ -1,4 +1,4 @@ utilities boldIsListed - ^ self editorModel textStructures includes: self boldStructure \ No newline at end of file + ^ self editorModel textStructures includes: RichTextStructure bold \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/boldStructure.st b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/boldStructure.st deleted file mode 100644 index 87dcdb1..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/boldStructure.st +++ /dev/null @@ -1,4 +0,0 @@ -utilities -boldStructure - - ^ TextStructure bold \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/boldStructureSymbol.st b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/boldStructureSymbol.st deleted file mode 100644 index 735d228..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/boldStructureSymbol.st +++ /dev/null @@ -1,5 +0,0 @@ -utilities -boldStructureSymbol - - ^ TextStructure bold structureIdentifier - \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/loadSavedDocument.st b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/loadSavedDocument.st new file mode 100644 index 0000000..b42ad17 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/loadSavedDocument.st @@ -0,0 +1,5 @@ +utilities +loadSavedDocument + + self enterString: self saveName + inBackwardsCompatibleDialog: [self editorModel loadDocumentFromSaver] \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/modifyStructures.st b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/modifyStructures.st new file mode 100644 index 0000000..56dad5a --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/modifyStructures.st @@ -0,0 +1,6 @@ +utilities +modifyStructures + + self document + createNewStructure: self structureSymbol; + removeStructure: RichTextStructure bold structureIdentifier \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/openEditorWithTargetDocument.st b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/openEditorWithTargetDocument.st deleted file mode 100644 index 2dd825e..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/openEditorWithTargetDocument.st +++ /dev/null @@ -1,4 +0,0 @@ -utilities -openEditorWithTargetDocument - - ^ self targetDocument openInEditor \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/openNewEditor.st b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/openNewEditor.st new file mode 100644 index 0000000..29b6789 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/openNewEditor.st @@ -0,0 +1,5 @@ +utilities +openNewEditor + + self editorView abandon. + self openNewEditorModel \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/removeStructure.andAddCostumStructure..st b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/removeStructure.andAddCostumStructure..st deleted file mode 100644 index b696bbb..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/removeStructure.andAddCostumStructure..st +++ /dev/null @@ -1,6 +0,0 @@ -utilities -removeStructure: aRemoveStructure andAddCostumStructure: aAddStructure - - self document - createNewStructure: aAddStructure; - removeStructure: aRemoveStructure \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/saveTextInImage.st b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/saveTextInImage.st new file mode 100644 index 0000000..4b2b3b7 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/saveTextInImage.st @@ -0,0 +1,5 @@ +utilities +saveTextInImage + + self editorModel saveText. + self enterStringInSaveDialog: self saveName \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/saveTextInImageAndOpenNewEditor.st b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/saveTextInImageAndOpenNewEditor.st deleted file mode 100644 index 6fe103f..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/saveTextInImageAndOpenNewEditor.st +++ /dev/null @@ -1,7 +0,0 @@ -utilities -saveTextInImageAndOpenNewEditor - - self editorModel saveText. - self enterStringInSaveDialog: self saveName. - self editorView abandon. - self openNewEditorModel \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/setUp.st b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/setUp.st index 0caa63b..743dddc 100644 --- a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/setUp.st +++ b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/setUp.st @@ -1,4 +1,4 @@ -setup and teardown +running setUp super setUp. diff --git a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/structureIsListed.st b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/structureIsListed.st deleted file mode 100644 index 0a8cd0c..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/structureIsListed.st +++ /dev/null @@ -1,4 +0,0 @@ -utilities -structureIsListed - - ^ self editorModel textStructures includes: self structure \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/targetDocumentHasText..st b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/targetDocumentHasText..st deleted file mode 100644 index f81fe32..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/targetDocumentHasText..st +++ /dev/null @@ -1,4 +0,0 @@ -utilities -targetDocumentHasText: aText - - ^ self targetDocument text = aText \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testCharCountForText.st b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testCharCountForText.st new file mode 100644 index 0000000..0e4bac2 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testCharCountForText.st @@ -0,0 +1,5 @@ +unit-tests +testCharCountForText + + self enterExampleStringOntoTextField. + self assert: self document charcount = 16 \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testCharCountInitiallyZero.st b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testCharCountInitiallyZero.st new file mode 100644 index 0000000..1f61bf9 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testCharCountInitiallyZero.st @@ -0,0 +1,4 @@ +unit-tests +testCharCountInitiallyZero + + self assert: self document charcount = 0 \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testCharCountWithSpacesForText.st b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testCharCountWithSpacesForText.st new file mode 100644 index 0000000..5f816e8 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testCharCountWithSpacesForText.st @@ -0,0 +1,5 @@ +unit-tests +testCharCountWithSpacesForText + + self enterExampleStringOntoTextField. + self assert: (self document charcountExcept: #()) = self exampleString size \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testCharCountWithoutLetterA.st b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testCharCountWithoutLetterA.st new file mode 100644 index 0000000..3990ad3 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testCharCountWithoutLetterA.st @@ -0,0 +1,5 @@ +unit-tests +testCharCountWithoutLetterA + + self enterStringOntoTextField: 'Abra Kadabra'. + self assert: (self document charcountExcept: self ASCIISymbolsOfLetterA) = 7 \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testDocumentCanOpenEditor.st b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testDocumentCanOpenEditor.st index e9995cc..b44f6d8 100644 --- a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testDocumentCanOpenEditor.st +++ b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testDocumentCanOpenEditor.st @@ -1,10 +1,8 @@ unit-tests testDocumentCanOpenEditor - | editor possibleMorphs | + | windowCount editor | + windowCount := (self windowsWithLabel: self editorModel label) size. editor := self document openEditor. - possibleMorphs := Project current world submorphs. - possibleMorphs := possibleMorphs select: [:morph | morph class = PluggableSystemWindow]. - possibleMorphs := possibleMorphs select: [:morph | morph label = self editorModel label]. - self assert: (possibleMorphs notEmpty). + self assert: (self windowsWithLabel: self editorModel label) size > windowCount. editor abandon \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testDocumentHashIsEqual.st b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testDocumentHashIsEqual.st new file mode 100644 index 0000000..0cf7a5b --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testDocumentHashIsEqual.st @@ -0,0 +1,5 @@ +unit-tests +testDocumentHashIsEqual + + self assert: (RichTextDocument new copy: self htmlFormattedDocument) hash = + self htmlFormattedDocument hash \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testDocumentHashIsNotEqual.st b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testDocumentHashIsNotEqual.st new file mode 100644 index 0000000..97212c3 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testDocumentHashIsNotEqual.st @@ -0,0 +1,7 @@ +unit-tests +testDocumentHashIsNotEqual + + | aDocument | + aDocument := RichTextDocument new copy: self htmlFormattedDocument. + aDocument initializeStructure: #unequal. + self assert: aDocument hash ~= self htmlFormattedDocument hash \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testUS38ChangesToTextStructuresAreTextBound.st b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testUS38ChangesToTextStructuresAreTextBound.st new file mode 100644 index 0000000..434dab3 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testUS38ChangesToTextStructuresAreTextBound.st @@ -0,0 +1,10 @@ +acceptance-tests +testUS38ChangesToTextStructuresAreTextBound + + self + modifyStructures; + saveTextInImage; + openNewEditor; + + deny: self structureSymbolIsListed; + assert: self boldIsListed \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testUS38TextStructuresAreLoadedInWithText.st b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testUS38TextStructuresAreLoadedInWithText.st new file mode 100644 index 0000000..3ac331e --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testUS38TextStructuresAreLoadedInWithText.st @@ -0,0 +1,10 @@ +acceptance-tests +testUS38TextStructuresAreLoadedInWithText + + self + modifyStructures; + saveTextInImage; + openNewEditor; + loadSavedDocument; + assert: self structureSymbolIsListed; + deny: self boldIsListed \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testUS38changesToTextStructuresAreTextBound.st b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testUS38changesToTextStructuresAreTextBound.st deleted file mode 100644 index 43aa1e8..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testUS38changesToTextStructuresAreTextBound.st +++ /dev/null @@ -1,9 +0,0 @@ -acceptance-tests -testUS38changesToTextStructuresAreTextBound - - self - removeStructure: self boldStructureSymbol andAddCostumStructure: self structureSymbol; - saveTextInImageAndOpenNewEditor. - - self deny: self structureSymbolIsListed. - self assert: self boldIsListed \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testUS38textStructuresAreLoadedInWithText.st b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testUS38textStructuresAreLoadedInWithText.st deleted file mode 100644 index 1c1ce40..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testUS38textStructuresAreLoadedInWithText.st +++ /dev/null @@ -1,10 +0,0 @@ -acceptance-tests -testUS38textStructuresAreLoadedInWithText - - self - removeStructure: self boldStructureSymbol andAddCostumStructure: self structureSymbol; - saveTextInImageAndOpenNewEditor. - - self enterString: self saveName inBackwardsCompatibleDialog: [self editorModel loadDocumentFromSaver]. - self assert: self structureSymbolIsListed. - self deny: self boldIsListed \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testUS57OpenInEditorOpensDocumentInEditor.st b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testUS57OpenInEditorOpensDocumentInEditor.st new file mode 100644 index 0000000..044e74e --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testUS57OpenInEditorOpensDocumentInEditor.st @@ -0,0 +1,9 @@ +acceptance-tests +testUS57OpenInEditorOpensDocumentInEditor + + | newEditor | + newEditor := self targetDocument openInEditor. + self addMorphToEditorView: (newEditor textView owner). + self assert: (self editorHasSameTargetAsCurrent: newEditor). + + newEditor textView owner owner abandon \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testUS57SaveActionPreservesTargetDocumentIdentity.st b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testUS57SaveActionPreservesTargetDocumentIdentity.st index 0b877e9..bc38f05 100644 --- a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testUS57SaveActionPreservesTargetDocumentIdentity.st +++ b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testUS57SaveActionPreservesTargetDocumentIdentity.st @@ -1,8 +1,6 @@ acceptance-tests testUS57SaveActionPreservesTargetDocumentIdentity - | testText | - testText := 'test text' asText. - self enterStringOntoTextField: testText. + self enterExampleStringOntoTextField. self editorModel saveText. self assert: self targetIdentityIsPreserved \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testUS57SaveActionWritesIntoTargetDocument.st b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testUS57SaveActionWritesIntoTargetDocument.st index 8adf979..6c0677a 100644 --- a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testUS57SaveActionWritesIntoTargetDocument.st +++ b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testUS57SaveActionWritesIntoTargetDocument.st @@ -1,8 +1,6 @@ acceptance-tests testUS57SaveActionWritesIntoTargetDocument - | testText | - testText := 'test text' asText. - self enterStringOntoTextField: testText. + self enterExampleStringOntoTextField. self editorModel saveText. - self assert: (self targetDocumentHasText: testText) \ No newline at end of file + self assert: (self targetDocument text asString = self exampleString) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testUS57SaveAsPutsTargetDocumentInSaver.st b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testUS57SaveAsPutsTargetDocumentInSaver.st index 4d1a1c6..5dd525a 100644 --- a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testUS57SaveAsPutsTargetDocumentInSaver.st +++ b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testUS57SaveAsPutsTargetDocumentInSaver.st @@ -1,12 +1,10 @@ acceptance-tests testUS57SaveAsPutsTargetDocumentInSaver - | saveName | - saveName := 'save name'. - self enterStringInSaveDialog: saveName. + self enterStringInSaveDialog: self saveName. "Close old editor view, since new one is about to be opened" self editorView abandon. self openNewEditorModel; - enterString: saveName inBackwardsCompatibleDialog: [self editorModel loadDocumentFromSaver]; + loadSavedDocument; assert: self targetIdentityIsPreserved \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testUS57openInEditorOpensDocumentInEditor.st b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testUS57openInEditorOpensDocumentInEditor.st deleted file mode 100644 index 103ef27..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testUS57openInEditorOpensDocumentInEditor.st +++ /dev/null @@ -1,7 +0,0 @@ -acceptance-tests -testUS57openInEditorOpensDocumentInEditor - - | newEditor | - newEditor := self openEditorWithTargetDocument. - self addMorphToEditorView: (newEditor textView owner). - self assert: (self editorHasSameTargetAsCurrent: newEditor) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testUS63CharCountForText.st b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testUS63CharCountForText.st deleted file mode 100644 index d176641..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testUS63CharCountForText.st +++ /dev/null @@ -1,7 +0,0 @@ -acceptance-tests -testUS63CharCountForText - - | testText | - testText := 'Hello World' asText. - self enterStringOntoTextField: testText. - self assert: self document charcount = 10. \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testUS63CharCountInitiallyZero.st b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testUS63CharCountInitiallyZero.st deleted file mode 100644 index 1246102..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testUS63CharCountInitiallyZero.st +++ /dev/null @@ -1,4 +0,0 @@ -acceptance-tests -testUS63CharCountInitiallyZero - - self assert: self document charcount = 0 \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testUS63CharCountWithSpacesForText.st b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testUS63CharCountWithSpacesForText.st deleted file mode 100644 index a714598..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testUS63CharCountWithSpacesForText.st +++ /dev/null @@ -1,7 +0,0 @@ -acceptance-tests -testUS63CharCountWithSpacesForText - - | testText | - testText := 'Hello World' asText. - self enterStringOntoTextField: testText. - self assert: (self document charcountExcept: #()) = 11. \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testUS63CharCountWithoutLetterA.st b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testUS63CharCountWithoutLetterA.st deleted file mode 100644 index e4ab06c..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testUS63CharCountWithoutLetterA.st +++ /dev/null @@ -1,7 +0,0 @@ -acceptance-tests -testUS63CharCountWithoutLetterA - - | testText | - testText := 'Abra Kadabra' asText. - self enterStringOntoTextField: testText. - self assert: (self document charcountExcept: #(65 97)) = 7. \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testUS63WordCountForText.st b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testUS63WordCountForText.st deleted file mode 100644 index 0384ffa..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testUS63WordCountForText.st +++ /dev/null @@ -1,7 +0,0 @@ -acceptance-tests -testUS63WordCountForText - - | testText | - testText := 'This is a test text' asText. - self enterStringOntoTextField: testText. - self assert: self document wordcount = 5. \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testUS63WordCountInitiallyZero.st b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testUS63WordCountInitiallyZero.st deleted file mode 100644 index 6cacb8f..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testUS63WordCountInitiallyZero.st +++ /dev/null @@ -1,4 +0,0 @@ -acceptance-tests -testUS63WordCountInitiallyZero - - self assert: self document wordcount = 0 \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testWordCountForText.st b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testWordCountForText.st new file mode 100644 index 0000000..4d13fba --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testWordCountForText.st @@ -0,0 +1,5 @@ +unit-tests +testWordCountForText + + self enterExampleStringOntoTextField. + self assert: self document wordcount = 5 \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testWordCountInitiallyZero.st b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testWordCountInitiallyZero.st new file mode 100644 index 0000000..7d1e7f3 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/instance/testWordCountInitiallyZero.st @@ -0,0 +1,4 @@ +unit-tests +testWordCountInitiallyZero + + self assert: self document wordcount = 0 \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/methodProperties.json b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/methodProperties.json index bb00aff..2c7e005 100644 --- a/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/methodProperties.json +++ b/packages/RichTextEditing-Tests.package/RichTextDocumentTests.class/methodProperties.json @@ -1,35 +1,35 @@ { "class" : { - "lastStoredRun" : "frc 6/12/2020 19:59" }, + }, "instance" : { - "boldIsListed" : "kh 6/19/2020 16:32", - "boldStructure" : "kh 6/21/2020 11:10", - "boldStructureSymbol" : "kh 6/19/2020 16:37", + "ASCIISymbolsOfLetterA" : "tok 8/7/2020 18:10", + "boldIsListed" : "tok 8/7/2020 18:16", "editorHasSameTargetAsCurrent:" : "ls 7/3/2019 19:05", - "openEditorWithTargetDocument" : "ls 7/3/2019 18:43", - "removeStructure:andAddCostumStructure:" : "ls 7/24/2019 17:30", + "loadSavedDocument" : "tok 8/7/2020 18:01", + "modifyStructures" : "tok 8/7/2020 18:17", + "openNewEditor" : "tok 8/7/2020 17:59", "saveName" : "MB 6/12/2019 18:08", - "saveTextInImageAndOpenNewEditor" : "ls 7/3/2019 21:42", + "saveTextInImage" : "tok 8/7/2020 18:33", "setUp" : "JEH 5/31/2020 14:55", - "structureIsListed" : "kh 6/19/2020 16:31", "structureSymbol" : "ls 7/3/2019 21:38", "structureSymbolIsListed" : "ls 7/3/2019 21:42", "targetDocument" : "ls 7/3/2019 18:43", - "targetDocumentHasText:" : "ls 7/3/2019 18:43", "targetIdentity" : "ls 7/3/2019 18:14", "targetIdentity:" : "ls 7/3/2019 18:14", "targetIdentityIsPreserved" : "ls 7/3/2019 18:43", - "testDocumentCanOpenEditor" : "frc 6/13/2020 11:10", - "testUS38changesToTextStructuresAreTextBound" : "kh 6/19/2020 16:39", - "testUS38textStructuresAreLoadedInWithText" : "tok 7/8/2020 16:09", + "testCharCountForText" : "tok 8/7/2020 18:32", + "testCharCountInitiallyZero" : "tok 8/7/2020 18:09", + "testCharCountWithSpacesForText" : "tok 8/7/2020 18:09", + "testCharCountWithoutLetterA" : "tok 8/7/2020 18:10", + "testDocumentCanOpenEditor" : "tok 8/7/2020 18:15", + "testDocumentHashIsEqual" : "tok 8/7/2020 18:16", + "testDocumentHashIsNotEqual" : "tok 8/7/2020 18:16", + "testUS38ChangesToTextStructuresAreTextBound" : "tok 8/7/2020 17:58", + "testUS38TextStructuresAreLoadedInWithText" : "tok 8/7/2020 18:01", "testUS57ButtonToInspectDocumentExists" : "ls 7/3/2019 17:59", - "testUS57SaveActionPreservesTargetDocumentIdentity" : "MB 7/25/2019 11:41", - "testUS57SaveActionWritesIntoTargetDocument" : "MB 7/25/2019 11:41", - "testUS57SaveAsPutsTargetDocumentInSaver" : "tok 7/8/2020 16:09", - "testUS57openInEditorOpensDocumentInEditor" : "JEH 5/31/2020 15:02", - "testUS63CharCountForText" : "frc 5/25/2020 16:03", - "testUS63CharCountInitiallyZero" : "frc 5/19/2020 22:47", - "testUS63CharCountWithSpacesForText" : "frc 5/25/2020 16:05", - "testUS63CharCountWithoutLetterA" : "frc 5/19/2020 22:47", - "testUS63WordCountForText" : "frc 5/25/2020 16:02", - "testUS63WordCountInitiallyZero" : "frc 5/19/2020 21:58" } } + "testUS57OpenInEditorOpensDocumentInEditor" : "tok 8/7/2020 18:18", + "testUS57SaveActionPreservesTargetDocumentIdentity" : "tok 8/7/2020 18:03", + "testUS57SaveActionWritesIntoTargetDocument" : "tok 8/7/2020 18:05", + "testUS57SaveAsPutsTargetDocumentInSaver" : "tok 8/7/2020 18:06", + "testWordCountForText" : "tok 8/7/2020 18:09", + "testWordCountInitiallyZero" : "tok 8/7/2020 18:09" } } diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/assert.equals.withExport..st b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/assert.equals.withExport..st new file mode 100644 index 0000000..8ebdc2a --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/assert.equals.withExport..st @@ -0,0 +1,9 @@ +utilities +assert: aString equals: aRichTextDocument withExport: aRichTextExportStrategy + + | fileStream | + + fileStream := RichTextMockFileStream new. + aRichTextExportStrategy export: aRichTextDocument on: fileStream. + self assert: aString equals: fileStream contents. + fileStream close \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/createTestFileWithContent.at..st b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/createTestFileWithContent.at..st index 894d406..caf0db4 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/createTestFileWithContent.at..st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/createTestFileWithContent.at..st @@ -1,8 +1,7 @@ utilities createTestFileWithContent: aString at: filePath - | new_file | - new_file := StandardFileStream fileNamed: filePath. - new_file nextPutAll: aString. - self file: new_file. - new_file close \ No newline at end of file + | newFile | + newFile := StandardFileStream fileNamed: filePath. + newFile nextPutAll: aString. + newFile close \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/exampleContent.st b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/exampleContent.st index c38ef82..0ed5de0 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/exampleContent.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/exampleContent.st @@ -1,5 +1,4 @@ constants exampleContent - ^ 'This is the content of the file -This is another line! ÄÖÜ' \ No newline at end of file + ^ 'This is the content of the file' , Character lf asString , 'This is another line! ÄÖÜ' \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/exampleDocument.st b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/exampleDocument.st new file mode 100644 index 0000000..39d6f6d --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/exampleDocument.st @@ -0,0 +1,11 @@ +constants +exampleDocument + + | document | + document := RichTextDocument new. + document text: self exampleExportContent asText. + document addAttribute: document textStructures first + from: 1 + to: self exampleExportContent size. + + ^ document \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/exampleExportContent.st b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/exampleExportContent.st index 13aa258..2173b4c 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/exampleExportContent.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/exampleExportContent.st @@ -1,4 +1,4 @@ constants exampleExportContent - "Due to line endings tests will fail with newlines, even if it works correctly in normal use" + "Due to line endings, some tests will fail with newlines, even if it works correctly in normal use" ^ 'This is the content of the file! ÄÖÜ' \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/exportOptionExists..st b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/exportOptionExists..st new file mode 100644 index 0000000..34e00f9 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/exportOptionExists..st @@ -0,0 +1,7 @@ +utilities +exportOptionExists: aRichTextExportStrategy + + | answer | + + answer := self answer: aRichTextExportStrategy inDialog: [self editorModel selectExportStrategy]. + ^ answer notNil \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/exportVariantExists..st b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/exportVariantExists..st new file mode 100644 index 0000000..5f70374 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/exportVariantExists..st @@ -0,0 +1,5 @@ +utilities +exportVariantExists: aRichTextExportStrategyClass + + ^ (self answer: aRichTextExportStrategyClass + inDialog: [self editorModel selectExportStrategy]) notNil \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/file..st b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/file..st deleted file mode 100644 index 9967a84..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/file..st +++ /dev/null @@ -1,6 +0,0 @@ -accessing -file: aFile - - file := aFile - - \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/file.st b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/file.st deleted file mode 100644 index 847befa..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/file.st +++ /dev/null @@ -1,6 +0,0 @@ -accessing -file - - ^ file - - \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/htmlExampleString.st b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/htmlExampleString.st new file mode 100644 index 0000000..448e47a --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/htmlExampleString.st @@ -0,0 +1,4 @@ +constants +htmlExampleString + + ^ '

    This is a test.

    ' \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/htmlLineFeedDocument.st b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/htmlLineFeedDocument.st new file mode 100644 index 0000000..eb0f546 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/htmlLineFeedDocument.st @@ -0,0 +1,5 @@ +constants +htmlLineFeedDocument + + ^ RichTextDocument fromText: (Text fromString: self exampleContent) + withStructures: RichTextHTMLTemplate textStructures \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/htmlLineFeedString.st b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/htmlLineFeedString.st new file mode 100644 index 0000000..62312a9 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/htmlLineFeedString.st @@ -0,0 +1,4 @@ +constants +htmlLineFeedString + + ^ '

    This is the content of the file
    This is another line! ÄÖÜ

    ' \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/htmlListDocument.st b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/htmlListDocument.st new file mode 100644 index 0000000..d1dfecc --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/htmlListDocument.st @@ -0,0 +1,9 @@ +constants +htmlListDocument + + | runs text | + runs := RunArray runs: #(9 32) values: {#() . {RichTextMarkdownTemplate initialLevel1ListStructure}}. + text := Text fromString: 'My list:', RichTextEditor paragraphCharacter asString, + 'List item1', Character lf asString, 'List item2', Character lf asString, 'List item3'. + text runs: runs. + ^ RichTextDocument fromText: text withStructures: RichTextHTMLTemplate textStructures \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/htmlListString.st b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/htmlListString.st new file mode 100644 index 0000000..496e26a --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/htmlListString.st @@ -0,0 +1,4 @@ +constants +htmlListString + + ^ '

    My list:

    ' \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/htmlParagraphExampleString.st b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/htmlParagraphExampleString.st new file mode 100644 index 0000000..60124c0 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/htmlParagraphExampleString.st @@ -0,0 +1,4 @@ +constants +htmlParagraphExampleString + + ^ '

    hello

    world

    ' \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/paragraphingDocument.st b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/paragraphingDocument.st new file mode 100644 index 0000000..56fdfcf --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/paragraphingDocument.st @@ -0,0 +1,4 @@ +constants +paragraphingDocument + + ^ RichTextDocument fromText: self textWithAttributes withStructures: RichTextHTMLTemplate textStructures \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/plainTextExportLabel.st b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/plainTextExportLabel.st index 5c5aa96..bad29c5 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/plainTextExportLabel.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/plainTextExportLabel.st @@ -1,4 +1,4 @@ utilities plainTextExportLabel - ^ RichTextPlainTextExportStrategy label \ No newline at end of file + ^ RichTextPlainExportStrategy label \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/setUp.st b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/setUp.st index a668243..9389136 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/setUp.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/setUp.st @@ -1,5 +1,5 @@ -resources +running setUp super setUp. - self setupFile \ No newline at end of file + self setupPlainTextFile \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/setupFile.st b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/setupFile.st index bdd19ba..e2e3bc5 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/setupFile.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/setupFile.st @@ -1,4 +1,4 @@ -resources +running setupFile self createTestFileWithContent: self exampleContent at: self exampleImportFilePath. diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/setupPlainTextFile.st b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/setupPlainTextFile.st new file mode 100644 index 0000000..5a1a3e7 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/setupPlainTextFile.st @@ -0,0 +1,5 @@ +running +setupPlainTextFile + + self createTestFileWithContent: self exampleContent at: self exampleImportFilePath. + self fileDirectory: (FileDirectory forFileName: self exampleExportFilePath) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/tearDown.st b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/tearDown.st index ff5a118..f5c35d4 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/tearDown.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/tearDown.st @@ -1,4 +1,4 @@ -resources +running tearDown super tearDown. diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/tearDownFiles.st b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/tearDownFiles.st index dc17e22..98deb4f 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/tearDownFiles.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/tearDownFiles.st @@ -1,4 +1,4 @@ -resources +running tearDownFiles self fileDirectory diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/testHTMLExportHandlesLineFeed.st b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/testHTMLExportHandlesLineFeed.st new file mode 100644 index 0000000..8a413bf --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/testHTMLExportHandlesLineFeed.st @@ -0,0 +1,6 @@ +unit-tests +testHTMLExportHandlesLineFeed + + self assert: self htmlLineFeedString + equals: self htmlLineFeedDocument + withExport: RichTextHTMLExportStrategy \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/testHTMLExportHandlesList.st b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/testHTMLExportHandlesList.st new file mode 100644 index 0000000..861140e --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/testHTMLExportHandlesList.st @@ -0,0 +1,6 @@ +unit-tests +testHTMLExportHandlesList + + self assert: self htmlListString + equals: self htmlListDocument + withExport: RichTextHTMLExportStrategy \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/testHTMLExportHandlesParagraph.st b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/testHTMLExportHandlesParagraph.st new file mode 100644 index 0000000..3b3da72 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/testHTMLExportHandlesParagraph.st @@ -0,0 +1,6 @@ +unit-tests +testHTMLExportHandlesParagraph + + self assert: self htmlParagraphExampleString + equals: self paragraphingDocument + withExport: RichTextHTMLExportStrategy \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/testUS143ExportAsObjectExistsInDialog.st b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/testUS143ExportAsObjectExistsInDialog.st new file mode 100644 index 0000000..057dd54 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/testUS143ExportAsObjectExistsInDialog.st @@ -0,0 +1,4 @@ +acceptance-tests +testUS143ExportAsObjectExistsInDialog + + self assert: (self exportVariantExists: RichTextObjectExportStrategy) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/testUS143ExportImportObjectEqual.st b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/testUS143ExportImportObjectEqual.st new file mode 100644 index 0000000..4329b19 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/testUS143ExportImportObjectEqual.st @@ -0,0 +1,8 @@ +acceptance-tests +testUS143ExportImportObjectEqual + + self editorModel setDocument: self exampleDocument. + self + chooseExportStrategy: RichTextObjectExportStrategy; + answer: self exampleExportFilePath inDialog: [self editorModel importObjectFileWithDialog]; + assert: self exampleDocument equals: self document \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/testUS84ImportFileFromFilesystem.st b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/testUS84ImportFileFromFilesystem.st new file mode 100644 index 0000000..36f789e --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/testUS84ImportFileFromFilesystem.st @@ -0,0 +1,5 @@ +acceptance-tests +testUS84ImportFileFromFilesystem + + self answer: self exampleImportFilePath inDialog: [self editorModel importFileWithDialog]. + self assert: (self exampleContent) equals: (self document asString) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/testUS84importFileFromFilesystem.st b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/testUS84importFileFromFilesystem.st deleted file mode 100644 index e2b0e87..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/testUS84importFileFromFilesystem.st +++ /dev/null @@ -1,5 +0,0 @@ -acceptance-tests -testUS84importFileFromFilesystem - - self answer: self exampleImportFilePath inDialog: [self editorModel importFileWithDialog]. - self assert: (self exampleContent) equals: (self editorModel bufferDocument text string) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/testUS87ExportAsPlainTextExistsInDialog.st b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/testUS87ExportAsPlainTextExistsInDialog.st index 02af142..2ff94aa 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/testUS87ExportAsPlainTextExistsInDialog.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/testUS87ExportAsPlainTextExistsInDialog.st @@ -1,8 +1,4 @@ acceptance-tests testUS87ExportAsPlainTextExistsInDialog - | answer | - answer := self answer: RichTextPlainTextExportStrategy - inDialog: [self editorModel selectExportStrategy]. - - self assert: answer ~= nil \ No newline at end of file + self assert: (self exportVariantExists: RichTextPlainExportStrategy) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/testUS87ExportDocumentAsPlainText.st b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/testUS87ExportDocumentAsPlainText.st index d368d29..7f1c2cf 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/testUS87ExportDocumentAsPlainText.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/testUS87ExportDocumentAsPlainText.st @@ -3,7 +3,7 @@ testUS87ExportDocumentAsPlainText self enterStringOntoTextField: self exampleExportContent. self editorModel saveText. - self chooseExportStrategy: RichTextPlainTextExportStrategy. - - self assert: self exportedFileExists. - self assert: self exportedFileContent equals: self exampleExportContent \ No newline at end of file + self + chooseExportStrategy: RichTextPlainExportStrategy; + assert: self exportedFileExists; + assert: self exportedFileContent equals: self exampleExportContent \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/testUS88ExportAsHTML.st b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/testUS88ExportAsHTML.st new file mode 100644 index 0000000..7023149 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/testUS88ExportAsHTML.st @@ -0,0 +1,6 @@ +acceptance-tests +testUS88ExportAsHTML + + self assert: self htmlExampleString + equals: self htmlFormattedDocument + withExport: RichTextHTMLExportStrategy \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/testUS88ExportAsMarkdown.st b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/testUS88ExportAsMarkdown.st new file mode 100644 index 0000000..f66eacd --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/testUS88ExportAsMarkdown.st @@ -0,0 +1,6 @@ +acceptance-tests +testUS88ExportAsMarkdown + + self assert: self htmlExampleString + equals: self htmlFormattedDocument + withExport: RichTextMarkdownExportStrategy \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/testUS88ExportAsMarkdownExistsInDialog.st b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/testUS88ExportAsMarkdownExistsInDialog.st new file mode 100644 index 0000000..1a9660a --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/instance/testUS88ExportAsMarkdownExistsInDialog.st @@ -0,0 +1,4 @@ +acceptance-tests +testUS88ExportAsMarkdownExistsInDialog + + self assert: (self exportVariantExists: RichTextMarkdownExportStrategy) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/methodProperties.json b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/methodProperties.json index f4e4805..93dc9cd 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/methodProperties.json +++ b/packages/RichTextEditing-Tests.package/RichTextEditorImportExportTests.class/methodProperties.json @@ -2,23 +2,41 @@ "class" : { }, "instance" : { + "assert:equals:withExport:" : "frc 8/7/2020 12:29", "chooseExportStrategy:" : "tok 7/8/2020 20:45", - "createTestFileWithContent:at:" : "frc 6/8/2020 15:03", + "createTestFileWithContent:at:" : "tok 8/7/2020 16:34", "exampleContent" : "tok 7/9/2020 21:47", - "exampleExportContent" : "tok 7/9/2020 22:41", + "exampleDocument" : "kh 8/6/2020 10:40", + "exampleExportContent" : "tok 8/7/2020 16:30", "exampleExportFilePath" : "tok 7/8/2020 20:43", "exampleImportFilePath" : "tok 7/9/2020 21:16", + "exportOptionExists:" : "8/6/2020 19:49:02", + "exportVariantExists:" : "kh 8/6/2020 09:50", "exportedFileContent" : "tok 7/9/2020 22:41", "exportedFileExists" : "tok 7/9/2020 21:44", - "file" : "frc 6/8/2020 15:00", - "file:" : "frc 6/8/2020 14:59", "fileDirectory" : "tok 7/10/2020 11:46", "fileDirectory:" : "tok 7/10/2020 11:46", + "htmlExampleString" : "tok 8/7/2020 16:31", + "htmlLineFeedDocument" : "tok 8/7/2020 16:31", + "htmlLineFeedString" : "tok 8/7/2020 16:31", + "htmlListDocument" : "tok 8/7/2020 16:31", + "htmlListString" : "tok 8/7/2020 16:31", + "htmlParagraphExampleString" : "tok 8/7/2020 16:31", + "paragraphingDocument" : "tok 8/7/2020 16:31", "plainTextExportLabel" : "tok 7/8/2020 16:44", - "setUp" : "frc 6/12/2020 16:55", + "setUp" : "kh 8/6/2020 10:24", "setupFile" : "tok 7/9/2020 21:10", + "setupPlainTextFile" : "kh 8/6/2020 10:24", "tearDown" : "tok 7/8/2020 20:48", "tearDownFiles" : "tok 7/9/2020 21:44", - "testUS84importFileFromFilesystem" : "tok 7/9/2020 21:57", - "testUS87ExportAsPlainTextExistsInDialog" : "tok 7/8/2020 20:17", - "testUS87ExportDocumentAsPlainText" : "tok 7/9/2020 22:41" } } + "testHTMLExportHandlesLineFeed" : "tok 8/7/2020 18:37", + "testHTMLExportHandlesList" : "tok 8/7/2020 18:37", + "testHTMLExportHandlesParagraph" : "tok 8/7/2020 18:37", + "testUS143ExportAsObjectExistsInDialog" : "kh 8/6/2020 09:51", + "testUS143ExportImportObjectEqual" : "tok 8/7/2020 18:34", + "testUS84ImportFileFromFilesystem" : "tok 8/7/2020 17:14", + "testUS87ExportAsPlainTextExistsInDialog" : "frc 7/30/2020 08:38", + "testUS87ExportDocumentAsPlainText" : "tok 8/7/2020 21:00", + "testUS88ExportAsHTML" : "tok 8/7/2020 18:35", + "testUS88ExportAsMarkdown" : "tok 8/7/2020 18:36", + "testUS88ExportAsMarkdownExistsInDialog" : "kh 8/6/2020 09:49" } } diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorSaverTests.class/class/lastStoredRun.st b/packages/RichTextEditing-Tests.package/RichTextEditorSaverTests.class/class/lastStoredRun.st deleted file mode 100644 index 625a6ee..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextEditorSaverTests.class/class/lastStoredRun.st +++ /dev/null @@ -1,3 +0,0 @@ -history -lastStoredRun - ^ ((Dictionary new) add: (#duration->164); add: (#errors->((Set new))); add: (#passed->((Set new) add: #testUS13UnitSavesCanBeAddedAndLoaded; yourself)); add: (#failures->((Set new))); add: (#timeStamp->'12 June 2020 7:50:05.529548 pm' asTimeStamp); add: (#durations->((Dictionary new) add: (#testUS13UnitSavesCanBeAddedAndLoaded->164); yourself)); yourself) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorSaverTests.class/instance/saver.st b/packages/RichTextEditing-Tests.package/RichTextEditorSaverTests.class/instance/saver.st index f249da2..51d282b 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorSaverTests.class/instance/saver.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorSaverTests.class/instance/saver.st @@ -1,4 +1,4 @@ -accessing +utilities saver ^ RichTextEditorModel saverClass current \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorSaverTests.class/instance/testUS13UnitSavesCanBeAddedAndLoaded.st b/packages/RichTextEditing-Tests.package/RichTextEditorSaverTests.class/instance/testUS13UnitSavesCanBeAddedAndLoaded.st index d700309..fb864bb 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorSaverTests.class/instance/testUS13UnitSavesCanBeAddedAndLoaded.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorSaverTests.class/instance/testUS13UnitSavesCanBeAddedAndLoaded.st @@ -1,9 +1,7 @@ acceptance-tests testUS13UnitSavesCanBeAddedAndLoaded - - | saveName text document | - saveName := 'Testname'. - text := 'this is a test' asText. - document := RichTextDocument fromText: text withStructures: Set new. - self saver addSave: document underName: saveName. - self assert: (self saver loadDocumentFromName: saveName) text equals: text \ No newline at end of file + + self saver + addSave: (RichTextDocument fromText: (self exampleString asText) withStructures: Set new) + underName: 'Testname'. + self assert: (self saver loadDocumentFromName: 'Testname') text equals: self exampleString asText \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorSaverTests.class/methodProperties.json b/packages/RichTextEditing-Tests.package/RichTextEditorSaverTests.class/methodProperties.json index 29ec926..6592283 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorSaverTests.class/methodProperties.json +++ b/packages/RichTextEditing-Tests.package/RichTextEditorSaverTests.class/methodProperties.json @@ -1,6 +1,6 @@ { "class" : { - "lastStoredRun" : "frc 6/12/2020 19:59" }, + }, "instance" : { "saver" : "SR 5/8/2019 17:52", - "testUS13UnitSavesCanBeAddedAndLoaded" : "MB 7/25/2019 11:14" } } + "testUS13UnitSavesCanBeAddedAndLoaded" : "tok 8/7/2020 18:40" } } diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorSaverTests.class/properties.json b/packages/RichTextEditing-Tests.package/RichTextEditorSaverTests.class/properties.json index 795f277..f2497b6 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorSaverTests.class/properties.json +++ b/packages/RichTextEditing-Tests.package/RichTextEditorSaverTests.class/properties.json @@ -10,5 +10,5 @@ "name" : "RichTextEditorSaverTests", "pools" : [ ], - "super" : "TestCase", + "super" : "RichTextEditorTestCase", "type" : "normal" } diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/class/lastStoredRun.st b/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/class/lastStoredRun.st deleted file mode 100644 index a1dcee3..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/class/lastStoredRun.st +++ /dev/null @@ -1,3 +0,0 @@ -history -lastStoredRun - ^ ((Dictionary new) add: (#duration->2839); add: (#errors->((Set new))); add: (#passed->((Set new) add: #testUS44SelectedStylesChangeAccordingToSelectedText; add: #testUS18SelectionStyleIsAppliedToSelection; add: #testUS64IndentedStructureIsRendered; add: #testUS32StructureIsRendered; add: #testUS44StructureListExists; add: #testUS44SelectedStructureIsAssigned; add: #testUS18TextStyleIsSelectedInList; add: #testUS44OldButtonsHaveBeenRemoved; yourself)); add: (#failures->((Set new))); add: (#timeStamp->'12 June 2020 7:50:05.529548 pm' asTimeStamp); add: (#durations->((Dictionary new) add: (#testUS44OldButtonsHaveBeenRemoved->334); add: (#testUS18SelectionStyleIsAppliedToSelection->362); add: (#testUS64IndentedStructureIsRendered->358); add: (#testUS44StructureListExists->352); add: (#testUS32StructureIsRendered->334); add: (#testUS44SelectedStructureIsAssigned->356); add: (#testUS44SelectedStylesChangeAccordingToSelectedText->380); add: (#testUS18TextStyleIsSelectedInList->363); yourself)); yourself) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/boldIsSelectedInList.st b/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/boldIsSelectedInList.st index f90c68c..0b102eb 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/boldIsSelectedInList.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/boldIsSelectedInList.st @@ -1,6 +1,5 @@ utilities boldIsSelectedInList - | list | - list := self editorView findByName: 'structureList'. - ^ list listSelectionAt: (self editorModel textStructureSymbols indexOf: #bold) \ No newline at end of file + ^ (self editorView findByName: self structureListLabel) + listSelectionAt: (self editorModel textStructureSymbols indexOf: #bold) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/combinedEmphasisCode.st b/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/combinedEmphasisCode.st index eb681f4..31fb9f5 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/combinedEmphasisCode.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/combinedEmphasisCode.st @@ -1,4 +1,4 @@ -utilities +constants combinedEmphasisCode ^ 1 + 2 + 4 + 16 \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/combinedTextStructure.st b/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/combinedTextStructure.st index 4a87f04..4fc8302 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/combinedTextStructure.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/combinedTextStructure.st @@ -1,8 +1,8 @@ -utilities +constants combinedTextStructure - ^ TextStructure new: #test from: - {TextStructure bold. - TextStructure italic. - TextStructure underlined. - TextStructure struckOut} \ No newline at end of file + ^ RichTextStructure new: #test from: + {RichTextStructure bold. + RichTextStructure italic. + RichTextStructure underlined. + RichTextStructure struckOut} \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/firstStructureIsSelectedInList.st b/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/firstStructureIsSelectedInList.st index 2059515..477ffd8 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/firstStructureIsSelectedInList.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/firstStructureIsSelectedInList.st @@ -1,6 +1,5 @@ utilities firstStructureIsSelectedInList - | list | - list := self editorView findByName: 'structureList'. - ^ list listSelectionAt: 1 \ No newline at end of file + ^ (self editorView findByName: self structureListLabel) + listSelectionAt: 1 \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/listLevel.st b/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/listLevel.st index 2d4d55f..7c1f672 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/listLevel.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/listLevel.st @@ -1,4 +1,4 @@ -utilities +constants listLevel ^ 1 \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/listTextStructure.st b/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/listTextStructure.st index ae9041e..1e3db47 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/listTextStructure.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/listTextStructure.st @@ -1,5 +1,5 @@ utilities listTextStructure - ^ TextStructure new: #list from: {TextStructure listOnLevel: self listLevel} + ^ RichTextStructure new: #list from: {RichTextStructure listOnLevel: self listLevel} \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/listTextStructureStyles.st b/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/listTextStructureStyles.st deleted file mode 100644 index 889e583..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/listTextStructureStyles.st +++ /dev/null @@ -1,5 +0,0 @@ -utilities -listTextStructureStyles - - ^ {#indented} - \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/menu.st b/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/menu.st deleted file mode 100644 index 906d491..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/menu.st +++ /dev/null @@ -1,4 +0,0 @@ -utilities -menu - - ^ (self editorView findByLabel: 'structureList') list \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/setUpHalfBoldTestText.st b/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/setUpHalfBoldTestText.st index f0f7c5f..6919b74 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/setUpHalfBoldTestText.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/setUpHalfBoldTestText.st @@ -1,6 +1,6 @@ -utilities +running setUpHalfBoldTestText - self enterStringOntoTextField: 'test'. + self enterStringOntoTextField: self demoString. self textEditor selectFrom: 1 to: 2. self selectOptionBold \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/structureListLabel.st b/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/structureListLabel.st new file mode 100644 index 0000000..1ff0ac1 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/structureListLabel.st @@ -0,0 +1,4 @@ +constants +structureListLabel + + ^ 'structureList' \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/testUS18SelectionStyleIsAppliedToSelection.st b/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/testUS18SelectionStyleIsAppliedToSelection.st index 990cf70..d5dadac 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/testUS18SelectionStyleIsAppliedToSelection.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/testUS18SelectionStyleIsAppliedToSelection.st @@ -1,8 +1,8 @@ acceptance-tests testUS18SelectionStyleIsAppliedToSelection - self enterStringOntoTextField: 'test'. + self enterExampleStringOntoTextField. self textEditor selectAll. - self selectOptionBold. + self assert: (self editorModel hasStructure: #bold) diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/testUS18TextStyleIsSelectedInList.st b/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/testUS18TextStyleIsSelectedInList.st index a4e02f6..3db76b7 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/testUS18TextStyleIsSelectedInList.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/testUS18TextStyleIsSelectedInList.st @@ -1,8 +1,8 @@ acceptance-tests testUS18TextStyleIsSelectedInList - self enterStringOntoTextField: 'test'. + self enterExampleStringOntoTextField. self textEditor selectAll. - self selectOptionBold. + self assert: self boldIsSelectedInList \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/testUS32StructureIsRendered.st b/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/testUS32StructureIsRendered.st index d600153..7e6a5f2 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/testUS32StructureIsRendered.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/testUS32StructureIsRendered.st @@ -3,5 +3,5 @@ testUS32StructureIsRendered self assert: self textHasNoStyle. self editorText addAttribute: self combinedTextStructure. - self assert: self textHasCombinedStyle + self assert: self textHasCombinedEmphasisCode diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/testUS44OldButtonsHaveBeenRemoved.st b/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/testUS44OldButtonsHaveBeenRemoved.st deleted file mode 100644 index 1652107..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/testUS44OldButtonsHaveBeenRemoved.st +++ /dev/null @@ -1,6 +0,0 @@ -acceptance-tests -testUS44OldButtonsHaveBeenRemoved - - self deny: (self buttonWithLabelExists: 'Add Structure'). - self deny: (self buttonWithLabelExists: 'Remove Structure'). - self deny: (self buttonWithLabelExists: 'Structure') \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/testUS44SelectedStylesChangeAccordingToSelectedText.st b/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/testUS44SelectedStylesChangeAccordingToSelectedText.st index 685f874..945fbaf 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/testUS44SelectedStylesChangeAccordingToSelectedText.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/testUS44SelectedStylesChangeAccordingToSelectedText.st @@ -5,5 +5,6 @@ testUS44SelectedStylesChangeAccordingToSelectedText self textEditor selectFrom: 3 to: 4. self deny: self boldIsSelectedInList. + self textEditor selectFrom: 1 to: 2. self assert: self boldIsSelectedInList \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/testUS44StructureListExists.st b/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/testUS44StructureListExists.st index 73fa41f..3d65ee9 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/testUS44StructureListExists.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/testUS44StructureListExists.st @@ -1,4 +1,4 @@ acceptance-tests testUS44StructureListExists - self editorView findByName: 'structureList' \ No newline at end of file + self assert: (self editorView findByName: self structureListLabel) morphs notEmpty \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/testUS61StructureShortcutIsAppliedToNextText.st b/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/testUS61StructureShortcutIsAppliedToNextText.st index 7fee44b..374f7db 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/testUS61StructureShortcutIsAppliedToNextText.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/testUS61StructureShortcutIsAppliedToNextText.st @@ -3,7 +3,7 @@ testUS61StructureShortcutIsAppliedToNextText self simulateKeyboardShortcutForStructure1; - enterStringOntoTextField: self demoText. + enterExampleStringOntoTextField. self textEditor selectAll. self assert: (self firstStructureIsSelectedInList) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/testUS61StructureShortcutTogglesStructureEndOfText.st b/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/testUS61StructureShortcutTogglesStructureEndOfText.st index 84f6954..1cb0184 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/testUS61StructureShortcutTogglesStructureEndOfText.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/testUS61StructureShortcutTogglesStructureEndOfText.st @@ -2,7 +2,7 @@ acceptance-tests testUS61StructureShortcutTogglesStructureEndOfText self - enterStringOntoTextField: self demoText; + enterExampleStringOntoTextField; simulateKeyboardShortcutForStructure1; assert: (self firstStructureIsSelectedInList); simulateKeyboardShortcutForStructure1; diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/testUS61StructureShortcutTogglesStructureSelectedText.st b/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/testUS61StructureShortcutTogglesStructureSelectedText.st index df9d67e..de555f6 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/testUS61StructureShortcutTogglesStructureSelectedText.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/testUS61StructureShortcutTogglesStructureSelectedText.st @@ -1,7 +1,7 @@ acceptance-tests testUS61StructureShortcutTogglesStructureSelectedText - self enterStringOntoTextField: self demoText. + self enterExampleStringOntoTextField. self textEditor selectAll. self simulateKeyboardShortcutForStructure1; diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/testUS64IndentedStructureIsRendered.st b/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/testUS64IndentedStructureIsRendered.st index d33f969..194008c 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/testUS64IndentedStructureIsRendered.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/testUS64IndentedStructureIsRendered.st @@ -1,7 +1,7 @@ acceptance-tests testUS64IndentedStructureIsRendered - self enterStringOntoTextField: 'test'. - self assert: ((self editorText indentationAmountAt: (1 to: self editorText size)) = 0). + self enterExampleStringOntoTextField. + self assert: (self editorText indentationAmountAt: (1 to: self editorText size)) = 0. self editorText addAttribute: self listTextStructure from: 1 to: self editorText size. - self assert: ((self editorText indentationAmountAt: (1 to: self editorText size)) = self listLevel) \ No newline at end of file + self assert: (self editorText indentationAmountAt: (1 to: self editorText size)) = self listLevel \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/textHasCombinedStyle.st b/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/textHasCombinedEmphasisCode.st similarity index 82% rename from packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/textHasCombinedStyle.st rename to packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/textHasCombinedEmphasisCode.st index 9356a09..8291886 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/textHasCombinedStyle.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/textHasCombinedEmphasisCode.st @@ -1,5 +1,5 @@ utilities -textHasCombinedStyle +textHasCombinedEmphasisCode ^ (1 to: self editorText size) allSatisfy: [:index | (self editorText emphasisAt: index) = self combinedEmphasisCode] \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/methodProperties.json b/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/methodProperties.json index 31979af..cd1fdd9 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/methodProperties.json +++ b/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/methodProperties.json @@ -1,32 +1,23 @@ { "class" : { - "lastStoredRun" : "frc 6/12/2020 19:59" }, + }, "instance" : { - "boldIsSelectedInList" : "MB 7/24/2019 18:54", + "boldIsSelectedInList" : "tok 8/7/2020 16:27", "combinedEmphasisCode" : "MB 5/29/2019 22:04", - "combinedTextStructure" : "kh 6/19/2020 12:25", - "ctrlShiftButtonCode" : "tok 6/13/2020 16:24", - "demoText" : "tok 6/13/2020 12:11", - "emphasisCodeNoStyle" : "AG 6/5/2019 18:56", - "firstStructureIsSelectedInList" : "6/18/2020 19:16:32", + "combinedTextStructure" : "tok 8/7/2020 15:51", + "firstStructureIsSelectedInList" : "tok 8/7/2020 16:27", "listLevel" : "kh 6/19/2020 10:04", - "listTextStructure" : "kh 6/21/2020 16:58", - "listTextStructureStyles" : "tok 6/12/2020 12:12", - "menu" : "ls 6/18/2019 16:37", - "selectOptionBold" : "lh 7/24/2019 21:31", - "setUpHalfBoldTestText" : "lh 7/24/2019 20:04", - "simulateKeyboardEventWithButtons:andKeyValue:" : "tok 6/12/2020 13:21", - "simulateKeyboardShortcutForStructure1" : "tok 6/12/2020 13:17", - "testUS18SelectionStyleIsAppliedToSelection" : "MB 7/25/2019 12:28", - "testUS18TextStyleIsSelectedInList" : "MB 7/25/2019 12:27", - "testUS32StructureIsRendered" : "tok 6/1/2020 13:15", - "testUS44OldButtonsHaveBeenRemoved" : "ls 6/18/2019 15:57", + "listTextStructure" : "tok 8/7/2020 15:51", + "setUpHalfBoldTestText" : "tok 8/7/2020 16:26", + "structureListLabel" : "tok 8/7/2020 16:28", + "testUS18SelectionStyleIsAppliedToSelection" : "tok 8/7/2020 18:41", + "testUS18TextStyleIsSelectedInList" : "tok 8/7/2020 18:41", + "testUS32StructureIsRendered" : "tok 8/7/2020 16:18", "testUS44SelectedStructureIsAssigned" : "ls 6/18/2019 16:00", - "testUS44SelectedStylesChangeAccordingToSelectedText" : "lh 7/24/2019 21:38", - "testUS44StructureListExists" : "AG 6/18/2019 15:22", - "testUS61StructureShortcutIsAppliedToNextText" : "tok 6/13/2020 16:27", - "testUS61StructureShortcutTogglesStructureEndOfText" : "tok 6/13/2020 16:25", - "testUS61StructureShortcutTogglesStructureSelectedText" : "tok 6/13/2020 16:26", - "testUS64IndentedStructureIsRendered" : "kh 6/19/2020 10:04", - "textHasCombinedStyle" : "AG 7/25/2019 13:22", - "textHasNoStyle" : "AG 7/25/2019 13:22" } } + "testUS44SelectedStylesChangeAccordingToSelectedText" : "tok 8/7/2020 18:44", + "testUS44StructureListExists" : "tok 8/7/2020 18:49", + "testUS61StructureShortcutIsAppliedToNextText" : "tok 8/7/2020 17:36", + "testUS61StructureShortcutTogglesStructureEndOfText" : "tok 8/7/2020 18:50", + "testUS61StructureShortcutTogglesStructureSelectedText" : "tok 8/7/2020 18:50", + "testUS64IndentedStructureIsRendered" : "tok 8/7/2020 18:50", + "textHasCombinedEmphasisCode" : "tok 8/7/2020 16:18" } } diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/boldTextStructure.st b/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/boldTextStructure.st index f5fd483..4b7ad13 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/boldTextStructure.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/boldTextStructure.st @@ -1,4 +1,4 @@ constants boldTextStructure - ^ TextStructure bold \ No newline at end of file + ^ RichTextStructure bold \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/closeWindowsWithLabel..st b/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/closeWindowsWithLabel..st new file mode 100644 index 0000000..c4ddb8c --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/closeWindowsWithLabel..st @@ -0,0 +1,4 @@ +utilities +closeWindowsWithLabel: aLabel + + (self windowsWithLabel: aLabel) do: [:each | each abandon] \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/ctrlButtonCode.st b/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/ctrlButtonCode.st similarity index 100% rename from packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/ctrlButtonCode.st rename to packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/ctrlButtonCode.st diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/ctrlShiftButtonCode.st b/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/ctrlShiftButtonCode.st similarity index 86% rename from packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/ctrlShiftButtonCode.st rename to packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/ctrlShiftButtonCode.st index 2d0d051..52edc7c 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/ctrlShiftButtonCode.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/ctrlShiftButtonCode.st @@ -1,4 +1,4 @@ -utilities +constants ctrlShiftButtonCode "ctrlCode bitOr: shiftCode" ^ 16 bitOr: 8 \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/demoText.st b/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/demoString.st similarity index 77% rename from packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/demoText.st rename to packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/demoString.st index fda6c0c..809daa4 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/demoText.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/demoString.st @@ -1,5 +1,5 @@ -utilities -demoText +constants +demoString ^ 'This is a test ÖÜ. Another line;!@#$%^&*()_+=-[]{};: \|/?.>,<''' \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/emphasisCodeNoStyle.st b/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/emphasisCodeNoStyle.st similarity index 100% rename from packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/emphasisCodeNoStyle.st rename to packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/emphasisCodeNoStyle.st diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/enterExampleStringOntoTextField.st b/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/enterExampleStringOntoTextField.st new file mode 100644 index 0000000..0c4e3d7 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/enterExampleStringOntoTextField.st @@ -0,0 +1,4 @@ +utilities +enterExampleStringOntoTextField + + self enterStringOntoTextField: self exampleString \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/enterStringInSaveDialog..st b/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/enterStringInSaveDialog..st index 22e9ef6..5da3616 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/enterStringInSaveDialog..st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/enterStringInSaveDialog..st @@ -1,4 +1,4 @@ utilities enterStringInSaveDialog: aString - ^ self answer: aString inDialog: [self editorModel saveDocumentInSaverWithNamePrompt] \ No newline at end of file + ^ self answer: aString inDialog: [self editorModel saveDocumentWithNamePrompt] \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/text.st b/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/exampleString.st similarity index 72% rename from packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/text.st rename to packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/exampleString.st index 92fc4c2..510d627 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/text.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/exampleString.st @@ -1,4 +1,4 @@ constants -text +exampleString ^ 'This is a test text.' \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/exampleTextStructure.st b/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/exampleTextStructure.st new file mode 100644 index 0000000..1a2bcb2 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/exampleTextStructure.st @@ -0,0 +1,4 @@ +constants +exampleTextStructure + + ^ RichTextStructure new: #example from: {RichTextStructure italic . RichTextStructure bold} \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/flattenTextAttributes..st b/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/flattenTextAttributes..st similarity index 100% rename from packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/flattenTextAttributes..st rename to packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/flattenTextAttributes..st diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/htmlFormattedDocument.st b/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/htmlFormattedDocument.st new file mode 100644 index 0000000..217ff51 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/htmlFormattedDocument.st @@ -0,0 +1,8 @@ +constants +htmlFormattedDocument + + | runs text | + runs := RunArray runs: #(4 6 4 1) values: {{RichTextStructure bold} . #() . {RichTextStructure italic} . #()}. + text := Text fromString: 'This is a test.'. + text runs: runs. + ^ RichTextDocument fromText: text withStructures: RichTextHTMLTemplate textStructures diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/italicTextStructure.st b/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/italicTextStructure.st index ba7798a..3f5c5c8 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/italicTextStructure.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/italicTextStructure.st @@ -1,4 +1,4 @@ constants italicTextStructure - ^ TextStructure italic \ No newline at end of file + ^ RichTextStructure italic \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/selectOptionBold.st b/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/selectOptionBold.st similarity index 90% rename from packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/selectOptionBold.st rename to packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/selectOptionBold.st index 9e580a1..dbfb61f 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/selectOptionBold.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/selectOptionBold.st @@ -3,5 +3,4 @@ selectOptionBold self editorModel structureSelectionAt: (self editorModel textStructureSymbols indexOf: #bold) - put: true - \ No newline at end of file + put: true \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/setUp.st b/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/setUp.st index 96ac04f..f869c27 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/setUp.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/setUp.st @@ -1,4 +1,4 @@ -resources +running setUp super setUp. diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/simulateKeyboardEventWithButtons.andKeyValue..st b/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/simulateKeyboardEventWithButtons.andKeyValue..st similarity index 100% rename from packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/simulateKeyboardEventWithButtons.andKeyValue..st rename to packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/simulateKeyboardEventWithButtons.andKeyValue..st diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/simulateKeyboardShortcutForStructure1.st b/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/simulateKeyboardShortcutForStructure1.st similarity index 65% rename from packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/simulateKeyboardShortcutForStructure1.st rename to packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/simulateKeyboardShortcutForStructure1.st index 39ab79b..6538295 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/simulateKeyboardShortcutForStructure1.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/simulateKeyboardShortcutForStructure1.st @@ -2,4 +2,4 @@ utilities simulateKeyboardShortcutForStructure1 self simulateKeyboardEventWithButtons: self ctrlShiftButtonCode - andKeyValue: (self textEditor class structureKeymap at: 1) asciiValue \ No newline at end of file + andKeyValue: (self textEditor class structureKeymap first) asciiValue \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/tearDown.st b/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/tearDown.st index 04ffdb4..8c52605 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/tearDown.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/tearDown.st @@ -1,4 +1,4 @@ -resources +running tearDown self editorModel diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/textHasNoStyle.st b/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/textHasNoStyle.st similarity index 100% rename from packages/RichTextEditing-Tests.package/RichTextEditorStructureTests.class/instance/textHasNoStyle.st rename to packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/textHasNoStyle.st diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/textHasTextAttribute..st b/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/textHasTextAttribute..st similarity index 100% rename from packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/textHasTextAttribute..st rename to packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/textHasTextAttribute..st diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/textHasTextEmphasis..st b/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/textHasTextEmphasis..st similarity index 100% rename from packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/textHasTextEmphasis..st rename to packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/textHasTextEmphasis..st diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/textIsBold.st b/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/textIsBold.st similarity index 100% rename from packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/textIsBold.st rename to packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/textIsBold.st diff --git a/packages/RichTextEditing-Tests.package/RichTextDocumentReadStreamTests.class/instance/textWithAttributes.st b/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/textWithAttributes.st similarity index 72% rename from packages/RichTextEditing-Tests.package/RichTextDocumentReadStreamTests.class/instance/textWithAttributes.st rename to packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/textWithAttributes.st index 600ade5..dfad78d 100644 --- a/packages/RichTextEditing-Tests.package/RichTextDocumentReadStreamTests.class/instance/textWithAttributes.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/textWithAttributes.st @@ -2,7 +2,7 @@ constants textWithAttributes | text | - text := ('hello', self paragraphCharacter asString, 'world') asText. + text := self textWithParagraph. text := text addAttribute: self boldTextStructure from: 1 to: 6. text := text addAttribute: self italicTextStructure from: 7 to: 11. ^ text \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/textWithParagraph.st b/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/textWithParagraph.st new file mode 100644 index 0000000..2d237e0 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/textWithParagraph.st @@ -0,0 +1,4 @@ +constants +textWithParagraph + + ^ ('hello' , RichTextEditor paragraphCharacter asString , 'world') asText \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/windowsWithLabel..st b/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/windowsWithLabel..st new file mode 100644 index 0000000..5c71cc7 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/instance/windowsWithLabel..st @@ -0,0 +1,4 @@ +utilities +windowsWithLabel: aLabel + + ^ ActiveWorld submorphs select: [:each | (each isKindOf: PluggableSystemWindow) and: [each label contents = aLabel]] \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/methodProperties.json b/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/methodProperties.json index 0a81c60..d97543c 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/methodProperties.json +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTestCase.class/methodProperties.json @@ -4,9 +4,13 @@ "instance" : { "addMorphToEditorView:" : "JEH 5/31/2020 15:03", "answer:inDialog:" : "tok 7/9/2020 21:58", - "boldTextStructure" : "frc 7/13/2020 12:18", + "boldTextStructure" : "tok 8/7/2020 15:51", "buttonWithLabelExists:" : "AG 5/29/2019 22:21", "closeAllMenus" : "frc 6/16/2020 20:46", + "closeWindowsWithLabel:" : "frc 7/30/2020 10:28", + "ctrlButtonCode" : "tok 8/7/2020 19:17", + "ctrlShiftButtonCode" : "tok 8/3/2020 14:49", + "demoString" : "tok 8/7/2020 16:21", "doMenuActionByLabel:" : "frc 6/18/2020 19:00", "document" : "frc 7/13/2020 12:12", "documentMenu" : "frc 6/25/2020 16:24", @@ -16,18 +20,34 @@ "editorText" : "AG 5/30/2019 11:19", "editorView" : "ls 5/8/2019 19:54", "editorView:" : "JEH 5/31/2020 15:01", + "emphasisCodeNoStyle" : "tok 8/3/2020 14:56", + "enterExampleStringOntoTextField" : "tok 8/7/2020 17:30", "enterString:inBackwardsCompatibleDialog:" : "MB 7/24/2019 18:53", "enterString:inBackwardsCompatibleDialog:withAlternativeNumber:" : "tok 7/9/2020 21:57", - "enterStringInSaveDialog:" : "tok 7/9/2020 21:57", + "enterStringInSaveDialog:" : "tok 8/7/2020 19:08", "enterStringOntoTextField:" : "MB 7/24/2019 18:55", - "italicTextStructure" : "frc 7/13/2020 12:19", + "exampleString" : "tok 8/7/2020 16:37", + "exampleTextStructure" : "tok 8/7/2020 15:51", + "flattenTextAttributes:" : "tok 8/4/2020 16:33", + "htmlFormattedDocument" : "tok 8/7/2020 15:51", + "italicTextStructure" : "tok 8/7/2020 15:51", "menuActionByLabel:" : "frc 6/18/2020 19:04", "menuItemWithLabelExists:" : "frc 6/25/2020 16:25", "openNewEditorModel" : "JEH 5/31/2020 13:52", "selectMenuItemByLabel:" : "frc 6/25/2020 16:25", + "selectOptionBold" : "tok 8/3/2020 14:48", "setUp" : "MB 6/12/2019 18:01", + "simulateKeyboardEventWithButtons:andKeyValue:" : "frc 7/16/2020 12:55", + "simulateKeyboardShortcutForStructure1" : "tok 8/7/2020 11:20", "tearDown" : "JEH 5/31/2020 12:45", "textEditor" : "MB 5/22/2019 17:55", + "textHasNoStyle" : "tok 8/3/2020 14:56", + "textHasTextAttribute:" : "tok 8/4/2020 16:34", + "textHasTextEmphasis:" : "tok 8/4/2020 16:34", + "textIsBold" : "tok 8/4/2020 16:41", "textView" : "MB 5/22/2019 17:55", "textViewWrapper" : "MB 5/15/2019 19:08", - "triangleIsVisible" : "lh 6/18/2019 15:20" } } + "textWithAttributes" : "tok 8/7/2020 17:08", + "textWithParagraph" : "tok 8/7/2020 17:08", + "triangleIsVisible" : "lh 6/18/2019 15:20", + "windowsWithLabel:" : "frc 7/30/2020 10:26" } } diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/class/lastStoredRun.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/class/lastStoredRun.st deleted file mode 100644 index 3d4961c..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/class/lastStoredRun.st +++ /dev/null @@ -1,3 +0,0 @@ -history -lastStoredRun - ^ ((Dictionary new) add: (#duration->363); add: (#errors->((Set new))); add: (#passed->((Set new) add: #testInspectDocument; yourself)); add: (#failures->((Set new))); add: (#timeStamp->'12 June 2020 7:59:24.255548 pm' asTimeStamp); add: (#durations->((Dictionary new) add: (#testInspectDocument->363); yourself)); yourself) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/anotherText.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/anotherText.st deleted file mode 100644 index 05865e2..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/anotherText.st +++ /dev/null @@ -1,4 +0,0 @@ -constants -anotherText - - ^ 'This is another test text.' \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/changeStructureKeymap.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/changeStructureKeymap.st new file mode 100644 index 0000000..5899977 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/changeStructureKeymap.st @@ -0,0 +1,4 @@ +utilities +changeStructureKeymap + + self textEditor class structureKeymap: self newStructureKeymap \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/clickRedoButton.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/clickRedoButton.st new file mode 100644 index 0000000..125516a --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/clickRedoButton.st @@ -0,0 +1,4 @@ +utilities +clickRedoButton + + self doMenuActionByLabel: self redoButtonLabel \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/clickUndoButton.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/clickUndoButton.st new file mode 100644 index 0000000..cb1ea7f --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/clickUndoButton.st @@ -0,0 +1,4 @@ +utilities +clickUndoButton + + self doMenuActionByLabel: self undoButtonLabel \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/addStructure.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/createTestStructure.st similarity index 75% rename from packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/addStructure.st rename to packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/createTestStructure.st index efd9b0d..b838470 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/addStructure.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/createTestStructure.st @@ -1,4 +1,4 @@ utilities -addStructure +createTestStructure self editorModel createNewStructure: #testStructure \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/ctrlShiftButtonCode.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/ctrlShiftButtonCode.st deleted file mode 100644 index 3946a0a..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/ctrlShiftButtonCode.st +++ /dev/null @@ -1,4 +0,0 @@ -constants -ctrlShiftButtonCode - - ^ self ctrlButtonCode bitOr: self shiftButtonCode \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/deselectOptionBold.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/deselectOptionBold.st new file mode 100644 index 0000000..757e42f --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/deselectOptionBold.st @@ -0,0 +1,6 @@ +utilities +deselectOptionBold + + self editorModel + structureSelectionAt: (self editorModel textStructureSymbols indexOf: #bold) + put: false \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/editorStructureKeymap.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/editorStructureKeymap.st new file mode 100644 index 0000000..d4f73e5 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/editorStructureKeymap.st @@ -0,0 +1,4 @@ +utilities +editorStructureKeymap + + ^ self textEditor class structureKeymap \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/enableAutocompletion.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/enableAutocompletion.st new file mode 100644 index 0000000..02caa52 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/enableAutocompletion.st @@ -0,0 +1,5 @@ +utilities +enableAutocompletion + + autocompletionPreference := RichTextEditorModel autocompletion. + RichTextEditorModel autocompletion: true. \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/enterSaveNameInSaveAs.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/enterSaveNameInSaveAs.st new file mode 100644 index 0000000..0c100d9 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/enterSaveNameInSaveAs.st @@ -0,0 +1,5 @@ +acceptance-tests +enterSaveNameInSaveAs + + self enterSaveNameInDialog: [self editorModel + perform: (self menuActionByLabel: self saveAsButtonLabel)] \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/helpBrowserLabel.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/helpBrowserLabel.st new file mode 100644 index 0000000..07d816d --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/helpBrowserLabel.st @@ -0,0 +1,4 @@ +constants +helpBrowserLabel + + ^ RichTextHelp bookName , ': ' \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/inspectDocumentWindowLabel.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/inspectDocumentWindowLabel.st new file mode 100644 index 0000000..badb190 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/inspectDocumentWindowLabel.st @@ -0,0 +1,4 @@ +constants +inspectDocumentWindowLabel + + ^ self document class name \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/instance.equals..st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/instance.equals..st deleted file mode 100644 index ba0ec04..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/instance.equals..st +++ /dev/null @@ -1,4 +0,0 @@ -utilities -instance: anObject equals: anotherObject - - ^ anObject ~~ anotherObject \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/manageStructuresLabel.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/manageStructuresLabel.st new file mode 100644 index 0000000..b86e673 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/manageStructuresLabel.st @@ -0,0 +1,4 @@ +constants +manageStructuresLabel + + ^ 'Manage Structures' \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/newStructureKeymap.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/newStructureKeymap.st new file mode 100644 index 0000000..b0d698a --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/newStructureKeymap.st @@ -0,0 +1,4 @@ +constants +newStructureKeymap + + ^ '$=)(/&%§"!' \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/paragraphCharacter.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/paragraphCharacter.st deleted file mode 100644 index e2f7de3..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/paragraphCharacter.st +++ /dev/null @@ -1,4 +0,0 @@ -constants -paragraphCharacter - - ^ Character value: 182 \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/redoButtonLabel.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/redoButtonLabel.st new file mode 100644 index 0000000..ee5dd80 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/redoButtonLabel.st @@ -0,0 +1,4 @@ +constants +redoButtonLabel + + ^ 'Redo (Z)' \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/registeredOpenCommandsOfWorldMenuIncludes..st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/registeredOpenCommandsOfWorldMenuIncludes..st deleted file mode 100644 index 6b79fdd..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/registeredOpenCommandsOfWorldMenuIncludes..st +++ /dev/null @@ -1,4 +0,0 @@ -utilities -registeredOpenCommandsOfWorldMenuIncludes: aOpenCommand - - ^ TheWorldMenu registeredOpenCommands includes: aOpenCommand \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/restoreAutocompletion.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/restoreAutocompletion.st new file mode 100644 index 0000000..8b0f3fb --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/restoreAutocompletion.st @@ -0,0 +1,4 @@ +utilities +restoreAutocompletion + + RichTextEditorModel autocompletion: autocompletionPreference \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/saveAsButtonLabel.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/saveAsButtonLabel.st new file mode 100644 index 0000000..45a92b5 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/saveAsButtonLabel.st @@ -0,0 +1,4 @@ +constants +saveAsButtonLabel + + ^ 'Save as' \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/saveButtonLabel.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/saveButtonLabel.st new file mode 100644 index 0000000..39a5f23 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/saveButtonLabel.st @@ -0,0 +1,4 @@ +constants +saveButtonLabel + + ^ 'Save' \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/setUp.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/setUp.st new file mode 100644 index 0000000..eb28998 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/setUp.st @@ -0,0 +1,5 @@ +running +setUp + + super setUp. + self structureKeymap: self editorStructureKeymap \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/setupBoldText.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/setupBoldText.st new file mode 100644 index 0000000..38f355b --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/setupBoldText.st @@ -0,0 +1,6 @@ +running +setupBoldText + + self enterExampleStringOntoTextField. + self textEditor selectAll. + self selectOptionBold \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/simulateKeyboardEventWithButtons.andKeyValue..st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/simulateKeyboardEventWithButtons.andKeyValue..st deleted file mode 100644 index 6c7d349..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/simulateKeyboardEventWithButtons.andKeyValue..st +++ /dev/null @@ -1,11 +0,0 @@ -utilities -simulateKeyboardEventWithButtons: aButtonValue andKeyValue: aKeyValue - - self textView handleEvent: ( - KeyboardEvent new - setType: #keystroke - buttons: aButtonValue - position: self editorModel textView center - keyValue: aKeyValue - hand: HandMorph new - stamp: Time millisecondClockValue) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/simulateRedoShortcut.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/simulateRedoShortcut.st new file mode 100644 index 0000000..4e67591 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/simulateRedoShortcut.st @@ -0,0 +1,6 @@ +utilities +simulateRedoShortcut + + self + simulateKeyboardEventWithButtons: self ctrlShiftButtonCode + andKeyValue: $z asciiValue \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/simulateUndoShortcut.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/simulateUndoShortcut.st new file mode 100644 index 0000000..bee180e --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/simulateUndoShortcut.st @@ -0,0 +1,6 @@ +utilities +simulateUndoShortcut + + self + simulateKeyboardEventWithButtons: self ctrlButtonCode + andKeyValue: $z asciiValue \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/structureEditorLabel.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/structureEditorLabel.st new file mode 100644 index 0000000..1f59344 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/structureEditorLabel.st @@ -0,0 +1,4 @@ +constants +structureEditorLabel + + ^ 'Structure Editor' \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/structureKeymap..st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/structureKeymap..st new file mode 100644 index 0000000..5b85078 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/structureKeymap..st @@ -0,0 +1,4 @@ +accessing +structureKeymap: aString + + structureKeymap := aString \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/structureKeymap.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/structureKeymap.st new file mode 100644 index 0000000..4accaa6 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/structureKeymap.st @@ -0,0 +1,4 @@ +accessing +structureKeymap + + ^ structureKeymap \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/structureKeymapPreference.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/structureKeymapPreference.st new file mode 100644 index 0000000..ed3662b --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/structureKeymapPreference.st @@ -0,0 +1,4 @@ +constants +structureKeymapPreference + + ^ (self textEditor class asString , '>>', 'structureKeymap') asSymbol \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/tearDown.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/tearDown.st new file mode 100644 index 0000000..962e6c7 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/tearDown.st @@ -0,0 +1,5 @@ +running +tearDown + + self textEditor class structureKeymap: self structureKeymap. + super tearDown \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/templateButtonLabel.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/templateButtonLabel.st new file mode 100644 index 0000000..f29bb4b --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/templateButtonLabel.st @@ -0,0 +1,4 @@ +constants +templateButtonLabel + + ^ 'Template' \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testDocumentInfoContainsWordocunt.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testDocumentInfoContainsWordcount.st similarity index 71% rename from packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testDocumentInfoContainsWordocunt.st rename to packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testDocumentInfoContainsWordcount.st index 0d8ee79..4aceffb 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testDocumentInfoContainsWordocunt.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testDocumentInfoContainsWordcount.st @@ -1,5 +1,5 @@ unit-tests testDocumentInfoContainsWordcount - self enterStringOntoTextField: self anotherText asText. + self enterExampleStringOntoTextField. self assert: (self editorModel infoText includesSubstring: (self document wordcount asString)) diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testInitializeCompletionControllerAddsDependent.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testInitializeCompletionControllerAddsDependent.st new file mode 100644 index 0000000..c6f9de3 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testInitializeCompletionControllerAddsDependent.st @@ -0,0 +1,10 @@ +unit-tests +testInitializeCompletionControllerAddsDependent + + | testModel | + self enableAutocompletion. + testModel := RichTextEditorModel basicNew. + self assert: (testModel dependents isEmpty). + testModel initializeCompletionController. + self deny: (testModel dependents isEmpty). + self restoreAutocompletion \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testInspectDocument.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testInspectDocument.st index 623e47d..a74d93c 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testInspectDocument.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testInspectDocument.st @@ -1,11 +1,7 @@ unit-tests testInspectDocument - | possibleMorphs | self editorModel inspectDocument. - possibleMorphs := Project current world submorphs. - possibleMorphs := possibleMorphs select: [:each | each class = PluggableSystemWindow]. - possibleMorphs := possibleMorphs select: [:each | each label = self document class name]. - possibleMorphs := possibleMorphs select: [:each | each model object = self editorModel targetDocument]. - self assert: (possibleMorphs notEmpty). - possibleMorphs do: [:each | each abandon] \ No newline at end of file + self + assert: (self windowsWithLabel: (self inspectDocumentWindowLabel)) notEmpty; + closeWindowsWithLabel: self inspectDocumentWindowLabel \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testOpenStructureEditor.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testOpenStructureEditor.st index ea257a3..ce19baa 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testOpenStructureEditor.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testOpenStructureEditor.st @@ -3,5 +3,5 @@ testOpenStructureEditor | currentMorphCount | currentMorphCount := ActiveWorld submorphCount. - (self editorView findByLabel: 'Manage Structures') click. + (self editorView findByLabel: self manageStructuresLabel) click. self assert: currentMorphCount + 1 equals: ActiveWorld submorphCount \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testOpenTemplateEditor.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testOpenTemplateEditor.st new file mode 100644 index 0000000..d0add73 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testOpenTemplateEditor.st @@ -0,0 +1,8 @@ +unit-tests +testOpenTemplateEditor + + | windowCount | + windowCount := (self windowsWithLabel: self structureEditorLabel) size. + self doMenuActionByLabel: self templateButtonLabel. + self assert: (self windowsWithLabel: self structureEditorLabel) size > windowCount. + self closeWindowsWithLabel: self structureEditorLabel \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testRedoStructureUnapplyUnappliesStructureWith..st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testRedoStructureUnapplyUnappliesStructureWith..st new file mode 100644 index 0000000..04d906e --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testRedoStructureUnapplyUnappliesStructureWith..st @@ -0,0 +1,9 @@ +utilities +testRedoStructureUnapplyUnappliesStructureWith: aRedoBlock + + self + setupBoldText; + deselectOptionBold. + self editorModel undo. + aRedoBlock value. + self assert: self textHasNoStyle \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testRedoStructureWith..st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testRedoStructureWith..st new file mode 100644 index 0000000..3b9792a --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testRedoStructureWith..st @@ -0,0 +1,9 @@ +utilities +testRedoStructureWith: aRedoBlock + + self enterExampleStringOntoTextField. + self textEditor selectAll. + self selectOptionBold. + self editorModel undo. + aRedoBlock value. + self assert: self textIsBold \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testSaveTextAccessorSavesUnsavedChanges.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testSaveTextAccessorSavesUnsavedChanges.st new file mode 100644 index 0000000..a9433c0 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testSaveTextAccessorSavesUnsavedChanges.st @@ -0,0 +1,7 @@ +unit-tests +testSaveTextAccessorSavesUnsavedChanges + + self enterExampleStringOntoTextField. + self assert: self editorModel hasUnacceptedEdits. + self editorModel saveText: self editorModel text. + self deny: self editorModel hasUnacceptedEdits \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testTargetDocumentSavesTextStructures.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testTargetDocumentSavesTextStructures.st new file mode 100644 index 0000000..2902ff0 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testTargetDocumentSavesTextStructures.st @@ -0,0 +1,9 @@ +unit-tests +testTargetDocumentSavesTextStructures + + self editorModel textStructures: {self exampleTextStructure}. + self deny: (self editorModel targetDocument textStructures allSatisfy: [:each | + each structureIdentifier = self exampleTextStructure structureIdentifier]). + self editorModel saveText. + self assert: (self editorModel targetDocument textStructures allSatisfy: [:each | + each structureIdentifier = self exampleTextStructure structureIdentifier]) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testTextSizeReturnsCorrectSize.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testTextSizeReturnsCorrectSize.st index 69543e4..ca4082e 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testTextSizeReturnsCorrectSize.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testTextSizeReturnsCorrectSize.st @@ -1,5 +1,5 @@ unit-tests testTextSizeReturnsCorrectSize - self enterStringOntoTextField: self anotherText. - self assert: self textEditor textSize equals: self anotherText size \ No newline at end of file + self enterExampleStringOntoTextField. + self assert: self textEditor textSize equals: self exampleString size \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS04loadButtonExists.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS04LoadButtonExists.st similarity index 73% rename from packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS04loadButtonExists.st rename to packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS04LoadButtonExists.st index 8881265..f051ba8 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS04loadButtonExists.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS04LoadButtonExists.st @@ -1,4 +1,4 @@ acceptance-tests -testUS04loadButtonExists +testUS04LoadButtonExists self assert: (self menuItemWithLabelExists: 'Load') \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS04LoadedTextIsInsertedIntoEditor.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS04LoadedTextIsInsertedIntoEditor.st new file mode 100644 index 0000000..c96089d --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS04LoadedTextIsInsertedIntoEditor.st @@ -0,0 +1,11 @@ +acceptance-tests +testUS04LoadedTextIsInsertedIntoEditor + + self editorModel + setText: self exampleString; + saveText. + self enterSaveNameInDialog: [self editorModel saveDocumentWithNamePrompt]. + self editorModel setText: self demoString. + self loadDocumentFromSaver. + + self assert: self editorModel text equals: self exampleString \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS04SaveAsButtonExists.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS04SaveAsButtonExists.st new file mode 100644 index 0000000..8a004d6 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS04SaveAsButtonExists.st @@ -0,0 +1,4 @@ +acceptance-tests +testUS04SaveAsButtonExists + + self assert: (self menuItemWithLabelExists: self saveAsButtonLabel) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS04SaveAsButtonLetsChooseNameAndSavesInImage.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS04SaveAsButtonLetsChooseNameAndSavesInImage.st new file mode 100644 index 0000000..821a765 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS04SaveAsButtonLetsChooseNameAndSavesInImage.st @@ -0,0 +1,5 @@ +acceptance-tests +testUS04SaveAsButtonLetsChooseNameAndSavesInImage + + self enterSaveNameInSaveAs. + self assert: (self editorSavesIncludeKey: self saveName) diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS04SaveButtonExists.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS04SaveButtonExists.st new file mode 100644 index 0000000..0ef4a35 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS04SaveButtonExists.st @@ -0,0 +1,4 @@ +acceptance-tests +testUS04SaveButtonExists + + self assert: (self menuItemWithLabelExists: self saveButtonLabel) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS04SavedTextDoesntChange.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS04SavedTextDoesntChange.st new file mode 100644 index 0000000..7d0aa24 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS04SavedTextDoesntChange.st @@ -0,0 +1,11 @@ +acceptance-tests +testUS04SavedTextDoesntChange + + self editorModel + setText: self demoString; + saveText. + self enterSaveNameInDialog: [self editorModel saveDocumentWithNamePrompt]. + self editorModel setText: self exampleString. + self loadDocumentFromSaver. + + self assert: self demoString = self editorModel text asString \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS04loadedTextIsInsertedIntoEditor.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS04loadedTextIsInsertedIntoEditor.st deleted file mode 100644 index 6c675b8..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS04loadedTextIsInsertedIntoEditor.st +++ /dev/null @@ -1,11 +0,0 @@ -acceptance-tests -testUS04loadedTextIsInsertedIntoEditor - - self editorModel - setText: self text; - saveText. - self enterSaveNameInDialog: [self editorModel saveDocumentInSaverWithNamePrompt]. - self editorModel setText: self anotherText. - self loadDocumentFromSaver. - - self assert: self editorModel text equals: self text \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS04saveAsButtonExists.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS04saveAsButtonExists.st deleted file mode 100644 index aff3711..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS04saveAsButtonExists.st +++ /dev/null @@ -1,4 +0,0 @@ -acceptance-tests -testUS04saveAsButtonExists - - self assert: (self menuItemWithLabelExists: 'Save as') \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS04saveAsButtonLetsChooseNameAndSavesInImage.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS04saveAsButtonLetsChooseNameAndSavesInImage.st deleted file mode 100644 index 388c356..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS04saveAsButtonLetsChooseNameAndSavesInImage.st +++ /dev/null @@ -1,5 +0,0 @@ -acceptance-tests -testUS04saveAsButtonLetsChooseNameAndSavesInImage - - self enterSaveNameInDialog: [self editorModel perform: (self menuActionByLabel: 'Save as')]. - self assert: (self editorSavesIncludeKey: self saveName). \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS04saveButtonExists.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS04saveButtonExists.st deleted file mode 100644 index 93cfb6c..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS04saveButtonExists.st +++ /dev/null @@ -1,4 +0,0 @@ -acceptance-tests -testUS04saveButtonExists - - self assert: (self menuItemWithLabelExists: 'Save') \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS04savedTextDoesntChange.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS04savedTextDoesntChange.st deleted file mode 100644 index 89927fb..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS04savedTextDoesntChange.st +++ /dev/null @@ -1,11 +0,0 @@ -acceptance-tests -testUS04savedTextDoesntChange - - self editorModel - setText: self text; - saveText. - self enterSaveNameInDialog: [self editorModel saveDocumentInSaverWithNamePrompt]. - self editorModel setText: self anotherText. - self loadDocumentFromSaver. - - self assert: (self instance: self text equals: self editorModel text) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS07RedoButtonExists.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS07RedoButtonExists.st index 0f8f1f8..b9ac029 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS07RedoButtonExists.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS07RedoButtonExists.st @@ -1,4 +1,4 @@ acceptance-tests testUS07RedoButtonExists - self assert: (self menuItemWithLabelExists: 'Redo') \ No newline at end of file + self assert: (self menuItemWithLabelExists: self redoButtonLabel) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS07RedoButtonRedoesChanges.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS07RedoButtonRedoesChanges.st index fea95ce..e526ce5 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS07RedoButtonRedoesChanges.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS07RedoButtonRedoesChanges.st @@ -1,8 +1,8 @@ acceptance-tests testUS07RedoButtonRedoesChanges - self enterStringOntoTextField: self anotherText. + self enterExampleStringOntoTextField. self editorModel undo. - self doMenuActionByLabel: 'Redo'. - - self assert: self editorModel text equals: self anotherText \ No newline at end of file + self + clickRedoButton; + assert: self editorModel text equals: self exampleString \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS07RedoKeyboardShortcut.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS07RedoKeyboardShortcut.st index b46c5c7..1eb6f84 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS07RedoKeyboardShortcut.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS07RedoKeyboardShortcut.st @@ -1,11 +1,8 @@ acceptance-tests testUS07RedoKeyboardShortcut - | text | - text := 'test text'. - - self enterStringOntoTextField: text. + self enterExampleStringOntoTextField. self editorModel undo. - self simulateKeyboardEventWithButtons: self ctrlShiftButtonCode andKeyValue: $z asciiValue. + self simulateRedoShortcut. - self assert: self editorText = text \ No newline at end of file + self assert: self editorText = self exampleString \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS07UndoButtonExists.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS07UndoButtonExists.st index 4f1590a..0b1fdb2 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS07UndoButtonExists.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS07UndoButtonExists.st @@ -1,4 +1,4 @@ acceptance-tests testUS07UndoButtonExists - self assert: (self menuItemWithLabelExists: 'Undo') \ No newline at end of file + self assert: (self menuItemWithLabelExists: self undoButtonLabel) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS07UndoButtonUndoesChanges.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS07UndoButtonUndoesChanges.st index dc7cf04..9a2d3a8 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS07UndoButtonUndoesChanges.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS07UndoButtonUndoesChanges.st @@ -1,7 +1,7 @@ acceptance-tests testUS07UndoButtonUndoesChanges - self enterStringOntoTextField: 'Test'. - self doMenuActionByLabel: 'Undo'. - - self assert: self editorText = '' \ No newline at end of file + self + enterExampleStringOntoTextField; + clickUndoButton; + assert: self editorText = '' \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS07UndoChangesText.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS07UndoChangesText.st index 09ba6b0..3d0b68f 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS07UndoChangesText.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS07UndoChangesText.st @@ -1,9 +1,7 @@ acceptance-tests testUS07UndoChangesText - | text | - text := 'test'. - self enterStringOntoTextField: text. + self enterExampleStringOntoTextField. self editorModel undo. - self deny: self editorModel text = text. \ No newline at end of file + self deny: self editorModel text = self exampleString \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS07UndoKeyboardShortcut.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS07UndoKeyboardShortcut.st index 7429a59..5dfa476 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS07UndoKeyboardShortcut.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS07UndoKeyboardShortcut.st @@ -1,8 +1,8 @@ acceptance-tests testUS07UndoKeyboardShortcut - self enterStringOntoTextField: 'Test'. - self simulateKeyboardEventWithButtons: self ctrlButtonCode andKeyValue: $z asciiValue. - - self assert: self editorText = ''. + self + enterExampleStringOntoTextField; + simulateUndoShortcut; + assert: self editorText = '' \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS09CreateNewLine.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS09CreateNewLine.st new file mode 100644 index 0000000..a2aa853 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS09CreateNewLine.st @@ -0,0 +1,8 @@ +acceptance-tests +testUS09CreateNewLine + + self + enterExampleStringOntoTextField; + pressShiftEnter; + assert: self editorModel text equals: (self exampleString, String lf) asText + \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS09CreateNewParagraph.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS09CreateNewParagraph.st new file mode 100644 index 0000000..8725c4d --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS09CreateNewParagraph.st @@ -0,0 +1,8 @@ +acceptance-tests +testUS09CreateNewParagraph + + self + enterExampleStringOntoTextField; + pressEnter; + assert: self editorModel text + equals: (self exampleString, RichTextEditor paragraphCharacter asString) asText \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS09createNewLine.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS09createNewLine.st deleted file mode 100644 index 2e78547..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS09createNewLine.st +++ /dev/null @@ -1,7 +0,0 @@ -acceptance-tests -testUS09createNewLine - - self enterStringOntoTextField: 'hallo'. - self pressShiftEnter. - self assert: self editorModel text equals: ('hallo', String lf) asText - \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS09createNewParagraph.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS09createNewParagraph.st deleted file mode 100644 index fac4ab6..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS09createNewParagraph.st +++ /dev/null @@ -1,6 +0,0 @@ -acceptance-tests -testUS09createNewParagraph - - self enterStringOntoTextField: 'hallo'. - self pressEnter. - self assert: self editorModel text equals: ('hallo', self paragraphCharacter asString) asText \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS142RedoButtonRedoesStructure.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS142RedoButtonRedoesStructure.st new file mode 100644 index 0000000..d338e31 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS142RedoButtonRedoesStructure.st @@ -0,0 +1,4 @@ +acceptance-tests +testUS142RedoButtonRedoesStructure + + self testRedoStructureWith: [self clickRedoButton] \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS142RedoButtonStructureUnapplyUnappliesStructure.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS142RedoButtonStructureUnapplyUnappliesStructure.st new file mode 100644 index 0000000..c95b420 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS142RedoButtonStructureUnapplyUnappliesStructure.st @@ -0,0 +1,4 @@ +acceptance-tests +testUS142RedoButtonStructureUnapplyUnappliesStructure + + self testRedoStructureUnapplyUnappliesStructureWith: [self clickRedoButton] \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS142RedoRedoesStructure.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS142RedoRedoesStructure.st new file mode 100644 index 0000000..e676fea --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS142RedoRedoesStructure.st @@ -0,0 +1,4 @@ +acceptance-tests +testUS142RedoRedoesStructure + + self testRedoStructureWith: [self editorModel redo] \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS142RedoShortcutRedoesStructure.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS142RedoShortcutRedoesStructure.st new file mode 100644 index 0000000..4aaf586 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS142RedoShortcutRedoesStructure.st @@ -0,0 +1,4 @@ +acceptance-tests +testUS142RedoShortcutRedoesStructure + + self testRedoStructureWith: [self simulateRedoShortcut] \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS142RedoShortcutStructureUnapplyUnappliesStructure.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS142RedoShortcutStructureUnapplyUnappliesStructure.st new file mode 100644 index 0000000..8dbc78e --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS142RedoShortcutStructureUnapplyUnappliesStructure.st @@ -0,0 +1,4 @@ +acceptance-tests +testUS142RedoShortcutStructureUnapplyUnappliesStructure + + self testRedoStructureUnapplyUnappliesStructureWith: [self simulateRedoShortcut] \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS142RedoStructureUnapplyUnappliesStructure.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS142RedoStructureUnapplyUnappliesStructure.st new file mode 100644 index 0000000..05ab12e --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS142RedoStructureUnapplyUnappliesStructure.st @@ -0,0 +1,4 @@ +acceptance-tests +testUS142RedoStructureUnapplyUnappliesStructure + + self testRedoStructureUnapplyUnappliesStructureWith: [self editorModel redo] \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS142UndoButtonRestoresPreviousStructures.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS142UndoButtonRestoresPreviousStructures.st new file mode 100644 index 0000000..7822211 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS142UndoButtonRestoresPreviousStructures.st @@ -0,0 +1,4 @@ +acceptance-tests +testUS142UndoButtonRestoresPreviousStructures + + self testUndoRestoresPreviousStructuresWith: [self clickUndoButton] \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS142UndoButtonStructureUnapplyReappliesStructure.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS142UndoButtonStructureUnapplyReappliesStructure.st new file mode 100644 index 0000000..3a9a004 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS142UndoButtonStructureUnapplyReappliesStructure.st @@ -0,0 +1,4 @@ +acceptance-tests +testUS142UndoButtonStructureUnapplyReappliesStructure + + self testUndoStructureUnapplyReappliesStructureWith: [self clickUndoButton] \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS142UndoButtonUndoesStructure.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS142UndoButtonUndoesStructure.st new file mode 100644 index 0000000..dd0acec --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS142UndoButtonUndoesStructure.st @@ -0,0 +1,4 @@ +acceptance-tests +testUS142UndoButtonUndoesStructure + + self testUndoStructureWith: [self clickUndoButton] \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS142UndoRestoresPreviousStructures.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS142UndoRestoresPreviousStructures.st new file mode 100644 index 0000000..ab91e5b --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS142UndoRestoresPreviousStructures.st @@ -0,0 +1,4 @@ +acceptance-tests +testUS142UndoRestoresPreviousStructures + + self testUndoRestoresPreviousStructuresWith: [self editorModel undo] \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS142UndoShortcutRestoresPreviousStructures.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS142UndoShortcutRestoresPreviousStructures.st new file mode 100644 index 0000000..3aa106f --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS142UndoShortcutRestoresPreviousStructures.st @@ -0,0 +1,4 @@ +acceptance-tests +testUS142UndoShortcutRestoresPreviousStructures + + self testUndoRestoresPreviousStructuresWith: [self simulateUndoShortcut] \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS142UndoShortcutStructureUnapplyReappliesStructure.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS142UndoShortcutStructureUnapplyReappliesStructure.st new file mode 100644 index 0000000..8dd8194 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS142UndoShortcutStructureUnapplyReappliesStructure.st @@ -0,0 +1,4 @@ +acceptance-tests +testUS142UndoShortcutStructureUnapplyReappliesStructure + + self testUndoStructureUnapplyReappliesStructureWith: [self simulateUndoShortcut] \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS142UndoShortcutUndoesStructure.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS142UndoShortcutUndoesStructure.st new file mode 100644 index 0000000..97d767b --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS142UndoShortcutUndoesStructure.st @@ -0,0 +1,4 @@ +acceptance-tests +testUS142UndoShortcutUndoesStructure + + self testUndoStructureWith: [self simulateUndoShortcut] \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS142UndoStructureUnapplyReappliesStructure.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS142UndoStructureUnapplyReappliesStructure.st new file mode 100644 index 0000000..97e6b65 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS142UndoStructureUnapplyReappliesStructure.st @@ -0,0 +1,4 @@ +acceptance-tests +testUS142UndoStructureUnapplyReappliesStructure + + self testUndoStructureUnapplyReappliesStructureWith: [self editorModel undo] \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS142UndoUndoesStructure.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS142UndoUndoesStructure.st new file mode 100644 index 0000000..5d6d7b8 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS142UndoUndoesStructure.st @@ -0,0 +1,4 @@ +acceptance-tests +testUS142UndoUndoesStructure + + self testUndoStructureWith: [self editorModel undo] \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS183ChangeStructureKeymap.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS183ChangeStructureKeymap.st new file mode 100644 index 0000000..2b5ac8e --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS183ChangeStructureKeymap.st @@ -0,0 +1,6 @@ +acceptance-tests +testUS183ChangeStructureKeymap + + Preferences setFlag: self structureKeymapPreference + toValue: self newStructureKeymap + during: [self assert: self editorStructureKeymap = self newStructureKeymap] \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS183ChangedStructureKeymapAllowsNewShortcuts.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS183ChangedStructureKeymapAllowsNewShortcuts.st new file mode 100644 index 0000000..f557be2 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS183ChangedStructureKeymapAllowsNewShortcuts.st @@ -0,0 +1,10 @@ +acceptance-tests +testUS183ChangedStructureKeymapAllowsNewShortcuts + + self + changeStructureKeymap; + enterExampleStringOntoTextField. + self textEditor selectAll. + self + simulateKeyboardShortcutForStructure1; + assert: self textIsBold \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS19ButtonInAppsMenuExists.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS19ButtonInAppsMenuExists.st index fe046df..9bf11b0 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS19ButtonInAppsMenuExists.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS19ButtonInAppsMenuExists.st @@ -1,4 +1,5 @@ acceptance-tests testUS19ButtonInAppsMenuExists - - self assert: (self registeredOpenCommandsOfWorldMenuIncludes: self richTextEditorOpenCommand). \ No newline at end of file + + self assert: (TheWorldMenu registeredOpenCommands + includes: self richTextEditorOpenCommand) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS24SaveAsButtonChangesLabel.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS24SaveAsButtonChangesLabel.st new file mode 100644 index 0000000..6230187 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS24SaveAsButtonChangesLabel.st @@ -0,0 +1,6 @@ +acceptance-tests +testUS24SaveAsButtonChangesLabel + + self enterSaveNameInSaveAs. + self assert: self editorModel label + equals: self editorModel class initialLabel , ' - ' , self saveName \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS24SaveButtonSavesInImage.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS24SaveButtonSavesInImage.st new file mode 100644 index 0000000..7ae2395 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS24SaveButtonSavesInImage.st @@ -0,0 +1,7 @@ +acceptance-tests +testUS24SaveButtonSavesInImage + + self + enterSaveNameInSaveAs; + doMenuActionByLabel: self saveButtonLabel; + assert: (self editorSavesIncludeKey: self editorModel currentSaveName) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS24saveAsButtonChangesLabel.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS24saveAsButtonChangesLabel.st deleted file mode 100644 index 63f74c0..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS24saveAsButtonChangesLabel.st +++ /dev/null @@ -1,5 +0,0 @@ -acceptance-tests -testUS24saveAsButtonChangesLabel - - self enterSaveNameInDialog: [self editorModel perform: (self menuActionByLabel: 'Save as')]. - self assert: self editorModel label equals: self editorModel class initialLabel, ' - ' , self saveName \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS24saveButtonSavesInImage.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS24saveButtonSavesInImage.st deleted file mode 100644 index 95a3e32..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS24saveButtonSavesInImage.st +++ /dev/null @@ -1,7 +0,0 @@ -acceptance-tests -testUS24saveButtonSavesInImage - - self enterSaveNameInDialog: [self editorModel perform: (self menuActionByLabel: 'Save as')]. - self doMenuActionByLabel: 'Save'. - - self assert: (self editorSavesIncludeKey: self editorModel currentSaveName) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS46NewEditorIsOpened.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS46NewEditorIsOpened.st index b733084..7a10858 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS46NewEditorIsOpened.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS46NewEditorIsOpened.st @@ -4,6 +4,7 @@ testUS46NewEditorIsOpened | currentMorphCount | self closeAllMenus. currentMorphCount := ActiveWorld submorphCount. - self doMenuActionByLabel: 'New'. - self closeAllMenus. - self assert: currentMorphCount + 1 equals: ActiveWorld submorphCount + self + doMenuActionByLabel: self newButtonLabel; + closeAllMenus; + assert: currentMorphCount + 1 equals: ActiveWorld submorphCount diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS47WhenStructureIsAddedTheTriangleShows.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS47WhenStructureIsAddedTheTriangleShows.st index 3e8db08..85483ed 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS47WhenStructureIsAddedTheTriangleShows.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS47WhenStructureIsAddedTheTriangleShows.st @@ -1,6 +1,7 @@ acceptance-tests testUS47WhenStructureIsAddedTheTriangleShows - self deny: self triangleIsVisible. - self addStructure. - self assert: self triangleIsVisible \ No newline at end of file + self + deny: self triangleIsVisible; + createTestStructure; + assert: self triangleIsVisible \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS47WhenStructureIsRemovedTheTriangleShows.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS47WhenStructureIsRemovedTheTriangleShows.st index d8df34a..9bf7983 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS47WhenStructureIsRemovedTheTriangleShows.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS47WhenStructureIsRemovedTheTriangleShows.st @@ -1,6 +1,7 @@ acceptance-tests testUS47WhenStructureIsRemovedTheTriangleShows - self deny: self triangleIsVisible. - self removeStructure. - self assert: self triangleIsVisible \ No newline at end of file + self + deny: self triangleIsVisible; + removeStructure; + assert: self triangleIsVisible \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS60disableAutocompletion.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS60DisableAutocompletion.st similarity index 82% rename from packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS60disableAutocompletion.st rename to packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS60DisableAutocompletion.st index 5c71be3..aecc17c 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS60disableAutocompletion.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS60DisableAutocompletion.st @@ -1,5 +1,5 @@ acceptance-tests -testUS60disableAutocompletion +testUS60DisableAutocompletion Preferences setFlag: self autocompletionPreference toValue: false diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS60enableAutocompletion.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS60EnableAutocompletion.st similarity index 83% rename from packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS60enableAutocompletion.st rename to packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS60EnableAutocompletion.st index d38320d..6f776a9 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS60enableAutocompletion.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS60EnableAutocompletion.st @@ -1,5 +1,5 @@ acceptance-tests -testUS60enableAutocompletion +testUS60EnableAutocompletion Preferences setFlag: self autocompletionPreference toValue: true diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS63InfoWindowShowsWordcount.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS63InfoWindowShowsWordcount.st index bf08862..a9ef4a2 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS63InfoWindowShowsWordcount.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS63InfoWindowShowsWordcount.st @@ -2,7 +2,7 @@ acceptance-tests testUS63InfoWindowShowsWordcount | infoWindow | - self enterStringOntoTextField: self anotherText asText. + self enterExampleStringOntoTextField. infoWindow := self editorModel showInfo. self assert: (infoWindow messageMorph text string includesSubstring: (self document wordcount asString)). infoWindow abandon \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS67HelpBrowserIsOpended.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS67HelpBrowserIsOpended.st index b2b4c57..68ebdde 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS67HelpBrowserIsOpended.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS67HelpBrowserIsOpended.st @@ -2,8 +2,9 @@ acceptance-tests testUS67HelpBrowserIsOpended | currentHelpEditorNumber helpButton | - currentHelpEditorNumber := HelpBrowser allInstances size. + currentHelpEditorNumber := (self windowsWithLabel: self helpBrowserLabel) size. helpButton := self editorView findByLabel: self helpButtonLabel. helpButton click. - self assert: currentHelpEditorNumber + 1 equals: HelpBrowser allInstances size \ No newline at end of file + self assert: (self windowsWithLabel: self helpBrowserLabel) size > currentHelpEditorNumber. + self closeWindowsWithLabel: self helpBrowserLabel \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS67HelpButtonExists.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS67HelpButtonExists.st index ccaef7f..370a9e2 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS67HelpButtonExists.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS67HelpButtonExists.st @@ -1,4 +1,4 @@ acceptance-tests testUS67HelpButtonExists - self assert: (self buttonWithLabelExists: 'Help') \ No newline at end of file + self assert: (self buttonWithLabelExists: self helpButtonLabel) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS86TimeLastSavedIsUpdatedWhenSaving.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS86TimeLastSavedIsUpdatedWhenSaving.st new file mode 100644 index 0000000..97a8277 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS86TimeLastSavedIsUpdatedWhenSaving.st @@ -0,0 +1,9 @@ +acceptance-tests +testUS86TimeLastSavedIsUpdatedWhenSaving + + | before after documentSaveTime | + before := Time current asSeconds. + self editorModel saveText. + documentSaveTime := self document timeLastSaved asSeconds. + after := Time current asSeconds. + self assert: (before <= documentSaveTime and: [documentSaveTime <= after]) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS86timeLastSavedIsUpdatedWhenSaving.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS86timeLastSavedIsUpdatedWhenSaving.st deleted file mode 100644 index a5a622c..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS86timeLastSavedIsUpdatedWhenSaving.st +++ /dev/null @@ -1,9 +0,0 @@ -acceptance-tests -testUS86timeLastSavedIsUpdatedWhenSaving - - | before after documentSaveTime | - before := Time current asSeconds. - self editorModel saveText. - documentSaveTime := (self document timeLastSaved at: 2) asSeconds. - after := Time current asSeconds. - self assert: (before <= documentSaveTime and: documentSaveTime <= after) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS87ExportAsButtonExists.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS87ExportAsButtonExists.st index 72f33d2..8ae5a29 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS87ExportAsButtonExists.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS87ExportAsButtonExists.st @@ -1,4 +1,4 @@ acceptance-tests testUS87ExportAsButtonExists - self assert: (self menuItemWithLabelExists: 'Export as ...') \ No newline at end of file + self assert: (self menuItemWithLabelExists: self exportAsButtonLabel) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS87ExportAsButtonOpensExportChooser.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS87ExportAsButtonOpensExportChooser.st index 94397f7..411cad2 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS87ExportAsButtonOpensExportChooser.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUS87ExportAsButtonOpensExportChooser.st @@ -3,7 +3,7 @@ testUS87ExportAsButtonOpensExportChooser | notificationName | - [self editorModel perform: (self menuActionByLabel: 'Export as ...')] + [self editorModel perform: (self menuActionByLabel: self exportAsButtonLabel)] on: ProvideAnswerNotification do: [:notification | notificationName := notification messageText. diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUndoRestoresPreviousStructuresWith..st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUndoRestoresPreviousStructuresWith..st new file mode 100644 index 0000000..0c88901 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUndoRestoresPreviousStructuresWith..st @@ -0,0 +1,10 @@ +utilities +testUndoRestoresPreviousStructuresWith: anUndoBlock + + self enterExampleStringOntoTextField. + self textEditor selectFrom: 1 to: 2. + self selectOptionBold. + self textEditor selectAll. + self selectOptionBold. + anUndoBlock value. + self assert: (self editorText rangeOf: RichTextStructure bold startingAt: 1) = (1 to: 2) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUndoStructureUnapplyReappliesStructureWith..st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUndoStructureUnapplyReappliesStructureWith..st new file mode 100644 index 0000000..9c839b9 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUndoStructureUnapplyReappliesStructureWith..st @@ -0,0 +1,8 @@ +utilities +testUndoStructureUnapplyReappliesStructureWith: anUndoBlock + + self + setupBoldText; + deselectOptionBold. + anUndoBlock value. + self assert: self textIsBold \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUndoStructureWith..st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUndoStructureWith..st new file mode 100644 index 0000000..85666ff --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/testUndoStructureWith..st @@ -0,0 +1,6 @@ +utilities +testUndoStructureWith: anUndoBlock + + self setupBoldText. + anUndoBlock value. + self assert: self textHasNoStyle \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/undoButtonLabel.st b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/undoButtonLabel.st new file mode 100644 index 0000000..c7491de --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/undoButtonLabel.st @@ -0,0 +1,4 @@ +constants +undoButtonLabel + + ^ 'Undo (z)' \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/methodProperties.json b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/methodProperties.json index 4da1cf7..2b68381 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/methodProperties.json +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/methodProperties.json @@ -1,70 +1,114 @@ { "class" : { - "lastStoredRun" : "frc 6/12/2020 19:59" }, + }, "instance" : { - "addStructure" : "ls 6/12/2019 17:54", - "anotherText" : "MB 7/25/2019 11:03", "autocompletionPreference" : "kh 5/24/2020 18:57", + "changeStructureKeymap" : "tok 8/7/2020 10:15", + "clickRedoButton" : "tok 8/3/2020 15:04", + "clickUndoButton" : "tok 8/3/2020 15:03", "crKeyCode" : "MB 5/15/2019 20:53", - "ctrlButtonCode" : "MB 5/15/2019 21:04", - "ctrlShiftButtonCode" : "AG 5/29/2019 22:21", + "createTestStructure" : "tok 8/7/2020 16:39", + "deselectOptionBold" : "tok 8/4/2020 16:55", "editorSavesIncludeKey:" : "MB 5/22/2019 18:01", + "editorStructureKeymap" : "tok 8/7/2020 11:17", + "enableAutocompletion" : "frc 7/3/2020 21:45", "enterSaveNameInDialog:" : "tok 7/9/2020 21:57", + "enterSaveNameInSaveAs" : "tok 8/7/2020 19:06", "exportAsButtonLabel" : "tok 7/8/2020 16:28", "footerContainsColNumber" : "JEH 6/14/2020 12:43", "footerContainsLineNumber" : "JEH 6/14/2020 12:43", + "helpBrowserLabel" : "frc 8/7/2020 13:52", "helpButtonLabel" : "kh 5/25/2020 22:42", - "instance:equals:" : "lh 7/24/2019 18:46", + "inspectDocumentWindowLabel" : "frc 8/1/2020 11:27", "loadDocumentFromSaver" : "tok 7/8/2020 16:09", + "manageStructuresLabel" : "frc 8/1/2020 11:36", "newButtonLabel" : "MB 6/12/2019 19:18", + "newStructureKeymap" : "tok 8/7/2020 10:55", "noActiveButtonCode" : "MB 5/15/2019 20:54", - "paragraphCharacter" : "lh 7/24/2019 20:02", "pressEnter" : "MB 5/15/2019 20:55", "pressShiftEnter" : "MB 5/15/2019 20:54", + "redoButtonLabel" : "frc 7/16/2020 13:43", "regExFoundInFooter:" : "JEH 6/14/2020 12:43", - "registeredOpenCommandsOfWorldMenuIncludes:" : "MB 5/15/2019 21:27", "removeStructure" : "ls 7/24/2019 17:24", + "restoreAutocompletion" : "frc 7/3/2020 21:46", "richTextEditorOpenCommand" : "ls 6/22/2019 10:49", + "saveAsButtonLabel" : "frc 8/7/2020 10:55", + "saveButtonLabel" : "tok 8/7/2020 18:54", "saveName" : "MB 7/25/2019 11:02", + "setUp" : "tok 8/7/2020 11:18", + "setupBoldText" : "tok 8/7/2020 17:30", "shiftButtonCode" : "MB 5/15/2019 21:06", - "simulateKeyboardEventWithButtons:andKeyValue:" : "lh 7/24/2019 18:30", - "testDocumentInfoContainsWordocunt" : "frc 7/3/2020 19:40", - "testInspectDocument" : "frc 6/18/2020 20:09", - "testOpenStructureEditor" : "tok 6/21/2020 11:46", - "testTextSizeReturnsCorrectSize" : "6/18/2020 19:22:35", - "testUS04loadButtonExists" : "AG 5/22/2019 18:38", - "testUS04loadedTextIsInsertedIntoEditor" : "tok 7/8/2020 16:09", - "testUS04saveAsButtonExists" : "frc 6/21/2020 20:21", - "testUS04saveAsButtonLetsChooseNameAndSavesInImage" : "frc 6/18/2020 19:05", - "testUS04saveButtonExists" : "frc 6/21/2020 20:21", - "testUS04savedTextDoesntChange" : "tok 7/8/2020 16:09", - "testUS07RedoButtonExists" : "frc 6/16/2020 20:16", - "testUS07RedoButtonRedoesChanges" : "frc 6/21/2020 20:24", - "testUS07RedoKeyboardShortcut" : "MB 7/24/2019 20:23", - "testUS07UndoButtonExists" : "frc 6/21/2020 20:24", - "testUS07UndoButtonUndoesChanges" : "frc 6/21/2020 20:25", - "testUS07UndoChangesText" : "ls 5/22/2019 18:27", - "testUS07UndoKeyboardShortcut" : "MB 7/24/2019 18:26", - "testUS09createNewLine" : "lh 7/24/2019 16:42", - "testUS09createNewParagraph" : "lh 7/24/2019 20:02", - "testUS19ButtonInAppsMenuExists" : "MB 5/15/2019 21:29", + "simulateRedoShortcut" : "tok 8/4/2020 15:23", + "simulateUndoShortcut" : "tok 8/3/2020 14:59", + "structureEditorLabel" : "frc 8/1/2020 11:31", + "structureKeymap" : "8/7/2020 14:44:52", + "structureKeymap:" : "tok 8/7/2020 11:24", + "structureKeymapPreference" : "tok 8/7/2020 10:04", + "tearDown" : "tok 8/7/2020 11:11", + "templateButtonLabel" : "frc 8/1/2020 11:55", + "testDocumentInfoContainsWordcount" : "7/16/2020 10:20:56", + "testInitializeCompletionControllerAddsDependent" : "frc 8/7/2020 15:55", + "testInspectDocument" : "JEH 8/3/2020 15:03", + "testOpenStructureEditor" : "frc 8/1/2020 11:36", + "testOpenTemplateEditor" : "tok 8/7/2020 19:21", + "testRedoStructureUnapplyUnappliesStructureWith:" : "tok 8/6/2020 14:51", + "testRedoStructureWith:" : "tok 8/7/2020 17:30", + "testSaveTextAccessorSavesUnsavedChanges" : "tok 8/7/2020 17:30", + "testTargetDocumentSavesTextStructures" : "frc 8/1/2020 11:56", + "testTextSizeReturnsCorrectSize" : "tok 8/7/2020 17:30", + "testUS04LoadButtonExists" : "frc 8/7/2020 13:11", + "testUS04LoadedTextIsInsertedIntoEditor" : "tok 8/7/2020 19:08", + "testUS04SaveAsButtonExists" : "frc 8/7/2020 13:12", + "testUS04SaveAsButtonLetsChooseNameAndSavesInImage" : "tok 8/7/2020 19:06", + "testUS04SaveButtonExists" : "tok 8/7/2020 18:54", + "testUS04SavedTextDoesntChange" : "tok 8/7/2020 19:08", + "testUS07RedoButtonExists" : "frc 7/16/2020 13:43", + "testUS07RedoButtonRedoesChanges" : "tok 8/7/2020 17:31", + "testUS07RedoKeyboardShortcut" : "tok 8/7/2020 17:31", + "testUS07UndoButtonExists" : "frc 7/16/2020 13:43", + "testUS07UndoButtonUndoesChanges" : "tok 8/7/2020 17:31", + "testUS07UndoChangesText" : "tok 8/7/2020 17:31", + "testUS07UndoKeyboardShortcut" : "tok 8/7/2020 17:31", + "testUS09CreateNewLine" : "tok 8/7/2020 19:11", + "testUS09CreateNewParagraph" : "tok 8/7/2020 19:12", + "testUS142RedoButtonRedoesStructure" : "tok 8/4/2020 17:07", + "testUS142RedoButtonStructureUnapplyUnappliesStructure" : "tok 8/4/2020 17:15", + "testUS142RedoRedoesStructure" : "tok 8/4/2020 17:07", + "testUS142RedoShortcutRedoesStructure" : "tok 8/4/2020 17:08", + "testUS142RedoShortcutStructureUnapplyUnappliesStructure" : "tok 8/4/2020 17:16", + "testUS142RedoStructureUnapplyUnappliesStructure" : "tok 8/4/2020 17:15", + "testUS142UndoButtonRestoresPreviousStructures" : "tok 8/6/2020 14:51", + "testUS142UndoButtonStructureUnapplyReappliesStructure" : "tok 8/4/2020 17:20", + "testUS142UndoButtonUndoesStructure" : "tok 8/4/2020 17:04", + "testUS142UndoRestoresPreviousStructures" : "tok 8/6/2020 14:51", + "testUS142UndoShortcutRestoresPreviousStructures" : "tok 8/6/2020 14:51", + "testUS142UndoShortcutStructureUnapplyReappliesStructure" : "tok 8/4/2020 17:20", + "testUS142UndoShortcutUndoesStructure" : "tok 8/4/2020 17:04", + "testUS142UndoStructureUnapplyReappliesStructure" : "tok 8/4/2020 17:20", + "testUS142UndoUndoesStructure" : "tok 8/4/2020 17:04", + "testUS183ChangeStructureKeymap" : "tok 8/7/2020 11:07", + "testUS183ChangedStructureKeymapAllowsNewShortcuts" : "tok 8/7/2020 17:31", + "testUS19ButtonInAppsMenuExists" : "tok 8/7/2020 18:59", "testUS19WindowsOpensWithoutFailure" : "MB 5/15/2019 21:30", - "testUS24saveAsButtonChangesLabel" : "frc 6/18/2020 19:04", - "testUS24saveButtonSavesInImage" : "frc 6/21/2020 20:25", + "testUS24SaveAsButtonChangesLabel" : "tok 8/7/2020 19:12", + "testUS24SaveButtonSavesInImage" : "tok 8/7/2020 19:06", "testUS46NewButtonExists" : "frc 6/21/2020 20:25", - "testUS46NewEditorIsOpened" : "frc 6/16/2020 20:41", - "testUS47WhenStructureIsAddedTheTriangleShows" : "ls 7/25/2019 13:20", - "testUS47WhenStructureIsRemovedTheTriangleShows" : "ls 7/25/2019 13:20", - "testUS60disableAutocompletion" : "kh 6/15/2020 13:47", - "testUS60enableAutocompletion" : "kh 6/15/2020 13:47", + "testUS46NewEditorIsOpened" : "tok 8/7/2020 19:19", + "testUS47WhenStructureIsAddedTheTriangleShows" : "tok 8/7/2020 19:13", + "testUS47WhenStructureIsRemovedTheTriangleShows" : "tok 8/7/2020 19:13", + "testUS60DisableAutocompletion" : "frc 8/7/2020 13:13", + "testUS60EnableAutocompletion" : "frc 8/7/2020 13:13", "testUS62ColNumberIsShownInFooter" : "JEH 6/14/2020 12:36", "testUS62LineNumberIsShownInFooter" : "JEH 6/14/2020 12:40", "testUS63InfoButtonExists" : "6/1/2020 14:03:20", - "testUS63InfoWindowShowsWordcount" : "frc 6/18/2020 20:51", - "testUS67HelpBrowserIsOpended" : "kh 5/25/2020 22:44", - "testUS67HelpButtonExists" : "kh 5/25/2020 22:35", + "testUS63InfoWindowShowsWordcount" : "tok 8/7/2020 17:31", + "testUS67HelpBrowserIsOpended" : "tok 8/7/2020 19:14", + "testUS67HelpButtonExists" : "tok 8/7/2020 19:16", "testUS84ImportFileButtonExists" : "tok 7/8/2020 16:23", - "testUS86timeLastSavedIsUpdatedWhenSaving" : "OS 6/15/2020 00:10", - "testUS87ExportAsButtonExists" : "tok 7/3/2020 20:15", - "testUS87ExportAsButtonOpensExportChooser" : "tok 7/10/2020 12:07", - "text" : "MB 7/25/2019 11:02" } } + "testUS86TimeLastSavedIsUpdatedWhenSaving" : "frc 8/7/2020 13:14", + "testUS87ExportAsButtonExists" : "tok 8/7/2020 19:16", + "testUS87ExportAsButtonOpensExportChooser" : "tok 8/7/2020 19:16", + "testUndoRestoresPreviousStructuresWith:" : "tok 8/7/2020 17:31", + "testUndoStructureUnapplyReappliesStructureWith:" : "tok 8/6/2020 14:51", + "testUndoStructureWith:" : "tok 8/6/2020 14:52", + "undoButtonLabel" : "frc 7/16/2020 13:43" } } diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/properties.json b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/properties.json index d096303..d7a4afe 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/properties.json +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTests.class/properties.json @@ -6,7 +6,8 @@ ], "commentStamp" : "lh 7/25/2019 12:05", "instvars" : [ - ], + "autocompletionPreference", + "structureKeymap" ], "name" : "RichTextEditorTests", "pools" : [ ], diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/class/lastStoredRun.st b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/class/lastStoredRun.st deleted file mode 100644 index 4f71b2d..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/class/lastStoredRun.st +++ /dev/null @@ -1,3 +0,0 @@ -history -lastStoredRun - ^ ((Dictionary new) add: (#duration->9718); add: (#errors->((Set new))); add: (#passed->((Set new) add: #testUS23TriangleDisappearsAfterSuccesfulSave; add: #testUS23WhenTriangleIsVisibleCtrlSCanBePressedForSaveDialog; add: #testUS49ApplySelectedStructureWithoutASelectionToNextTextMiddle; add: #testUS49NoStructureApplyWhenCaretMovedBeginning; add: #testUS23TriangleIsStillVisibleWhenSaveDialogIsCancelled; add: #testUS36StructureIsNotExtendable; add: #testUS49ApplySelectedStructureWithoutASelectionToNextTextBeginning; add: #testUS49NoStructureApplyWhenCaretMovedEnd; add: #testUS23TriangleReappearsWhenEditing; add: #testUS49ApplySelectedStructureWithoutASelectionToNextTextEnd; add: #testUS49NoStructureApplyWhenCaretMovedMid; yourself)); add: (#failures->((Set new))); add: (#timeStamp->'12 June 2020 7:50:05.529548 pm' asTimeStamp); add: (#durations->((Dictionary new) add: (#testUS23TriangleReappearsWhenEditing->1582); add: (#testUS49ApplySelectedStructureWithoutASelectionToNextTextBeginning->795); add: (#testUS49NoStructureApplyWhenCaretMovedEnd->795); add: (#testUS49NoStructureApplyWhenCaretMovedBeginning->787); add: (#testUS23WhenTriangleIsVisibleCtrlSCanBePressedForSaveDialog->780); add: (#testUS49ApplySelectedStructureWithoutASelectionToNextTextMiddle->783); add: (#testUS36StructureIsNotExtendable->781); add: (#testUS49NoStructureApplyWhenCaretMovedMid->795); add: (#testUS49ApplySelectedStructureWithoutASelectionToNextTextEnd->789); add: (#testUS23TriangleDisappearsAfterSuccesfulSave->932); add: (#testUS23TriangleIsStillVisibleWhenSaveDialogIsCancelled->899); yourself)); yourself) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/activateHeading.st b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/activateHeading.st index a20f7bf..9567871 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/activateHeading.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/activateHeading.st @@ -1,4 +1,6 @@ utilities activateHeading - self editorModel structureSelectionAt: self headingTextStructureIndex put: true \ No newline at end of file + self editorModel + structureSelectionAt: (self editorModel textStructureSymbols indexOf: #heading1) + put: true \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/addMoreText.st b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/addMoreText.st deleted file mode 100644 index 0fc44b6..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/addMoreText.st +++ /dev/null @@ -1,4 +0,0 @@ -utilities -addMoreText - - self enterStringOntoTextField: 'More text' \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/emphasisCodeBold.st b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/emphasisCodeBold.st deleted file mode 100644 index 7c73a66..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/emphasisCodeBold.st +++ /dev/null @@ -1,4 +0,0 @@ -constants -emphasisCodeBold - - ^ 1 \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/enterNothingInSaveDialog.st b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/enterNothingInSaveDialog.st deleted file mode 100644 index d7b0556..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/enterNothingInSaveDialog.st +++ /dev/null @@ -1,4 +0,0 @@ -utilities -enterNothingInSaveDialog - - self enterStringInSaveDialog: ''. \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/headingIsAddedToWrittenText.st b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/headingIsAddedToWrittenText.st index e509060..7d7de6f 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/headingIsAddedToWrittenText.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/headingIsAddedToWrittenText.st @@ -1,9 +1,9 @@ utilities headingIsAddedToWrittenText - self moveCaretToBeginningOfOtherText. - ^ self editorModel bufferDocument + self moveCaretRightBy: self exampleString size. + ^ self document class hasStructure: #heading1 - forText: self editorText + for: self editorText from: self caretPosition + 1 - to: (self caretPosition + self otherText size - 2) \ No newline at end of file + to: (self caretPosition + self exampleString size - 2) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/headingTextStructureIndex.st b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/headingTextStructureIndex.st deleted file mode 100644 index 57f8744..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/headingTextStructureIndex.st +++ /dev/null @@ -1,4 +0,0 @@ -utilities -headingTextStructureIndex - - ^ self editorModel textStructureSymbols indexOf: #heading1 \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/leftArrowKey.st b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/leftArrowKey.st deleted file mode 100644 index 067438e..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/leftArrowKey.st +++ /dev/null @@ -1,4 +0,0 @@ -utilities -leftArrowKey - - ^ Character arrowLeft \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/middleTextOffset.st b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/middleTextOffset.st index 13f590f..c8c12a7 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/middleTextOffset.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/middleTextOffset.st @@ -1,4 +1,4 @@ -utilities +constants middleTextOffset ^ 8 diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/moveCaret.st b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/moveCaret.st index bf2e503..0882fb7 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/moveCaret.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/moveCaret.st @@ -1,5 +1,5 @@ utilities moveCaret - - self moveCaretMultipleTimesRight: 5. - self moveCaretMultipleTimesLeft: 3 \ No newline at end of file + + self moveCaretRightBy: 5. + self moveCaretLeftBy: 3 \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/moveCaretLeftBy..st b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/moveCaretLeftBy..st new file mode 100644 index 0000000..ba49af0 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/moveCaretLeftBy..st @@ -0,0 +1,4 @@ +utilities +moveCaretLeftBy: aNumber + + self enterCharacter: Character arrowLeft times: aNumber \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/moveCaretMultipleTimesLeft..st b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/moveCaretMultipleTimesLeft..st deleted file mode 100644 index e399fb7..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/moveCaretMultipleTimesLeft..st +++ /dev/null @@ -1,4 +0,0 @@ -utilities -moveCaretMultipleTimesLeft: aNumber - - self enterCharacter: self leftArrowKey times: aNumber \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/moveCaretMultipleTimesRight..st b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/moveCaretMultipleTimesRight..st deleted file mode 100644 index 6cf0c91..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/moveCaretMultipleTimesRight..st +++ /dev/null @@ -1,4 +0,0 @@ -utilities -moveCaretMultipleTimesRight: aNumber - - self enterCharacter: self rightArrowKey times: aNumber \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/moveCaretRightBy..st b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/moveCaretRightBy..st new file mode 100644 index 0000000..41b1ae5 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/moveCaretRightBy..st @@ -0,0 +1,4 @@ +utilities +moveCaretRightBy: aNumber + + self enterCharacter: Character arrowRight times: aNumber \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/moveCaretToBeginOfText.st b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/moveCaretToBeginOfText.st new file mode 100644 index 0000000..5867862 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/moveCaretToBeginOfText.st @@ -0,0 +1,6 @@ +utilities +moveCaretToBeginOfText + + self + moveCaretLeftBy: self editorText size; + caretPosition: 1 \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/moveCaretToBeginningOfOtherText.st b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/moveCaretToBeginningOfOtherText.st deleted file mode 100644 index 04fdb03..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/moveCaretToBeginningOfOtherText.st +++ /dev/null @@ -1,5 +0,0 @@ -utilities -moveCaretToBeginningOfOtherText - - self - moveCaretMultipleTimesLeft: self otherText size \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/moveCaretToBeginningOfText.st b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/moveCaretToBeginningOfText.st deleted file mode 100644 index 172eb1c..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/moveCaretToBeginningOfText.st +++ /dev/null @@ -1,6 +0,0 @@ -utilities -moveCaretToBeginningOfText - - self - moveCaretMultipleTimesLeft: self editorText size; - caretPosition: 1 \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/moveCaretToEndOfText.st b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/moveCaretToEndOfText.st index 1a96ad6..b3f964c 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/moveCaretToEndOfText.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/moveCaretToEndOfText.st @@ -2,5 +2,5 @@ utilities moveCaretToEndOfText self - moveCaretMultipleTimesRight: self editorText size; + moveCaretRightBy: self editorText size; caretPosition: self editorText size. \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/moveCaretToMidOfText.st b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/moveCaretToMidOfText.st index 72ee38b..20c056f 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/moveCaretToMidOfText.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/moveCaretToMidOfText.st @@ -2,6 +2,6 @@ utilities moveCaretToMidOfText self - moveCaretToBeginningOfText; - moveCaretMultipleTimesRight: self middleTextOffset; + moveCaretToBeginOfText; + moveCaretRightBy: self middleTextOffset; caretPosition: self middleTextOffset. \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/multipleLineText.st b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/multipleLineString.st similarity index 77% rename from packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/multipleLineText.st rename to packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/multipleLineString.st index 94e9ae9..ae8afc9 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/multipleLineText.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/multipleLineString.st @@ -1,5 +1,5 @@ constants -multipleLineText +multipleLineString ^ 'This is a text diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/otherText.st b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/otherText.st deleted file mode 100644 index 48fe049..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/otherText.st +++ /dev/null @@ -1,5 +0,0 @@ -constants -otherText - - ^ 'This is other Text.' - \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/rightArrowKey.st b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/rightArrowKey.st deleted file mode 100644 index 58d903e..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/rightArrowKey.st +++ /dev/null @@ -1,4 +0,0 @@ -utilities -rightArrowKey - - ^ Character arrowRight \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/setUp.st b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/setUp.st index 245c60d..e510d54 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/setUp.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/setUp.st @@ -1,6 +1,5 @@ -resources +running setUp super setUp. - self - enterStringOntoTextField: self standardText. \ No newline at end of file + self enterExampleStringOntoTextField \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/standardText.st b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/standardText.st deleted file mode 100644 index 9ed63a7..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/standardText.st +++ /dev/null @@ -1,5 +0,0 @@ -constants -standardText - - ^ 'This is standard Text. ' - \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testApplySelectedStructureWithoutASelectionToNextTextWith..st b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testApplySelectedStructureWithoutASelectionToNextTextWith..st new file mode 100644 index 0000000..d0cc1af --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testApplySelectedStructureWithoutASelectionToNextTextWith..st @@ -0,0 +1,10 @@ +acceptance-tests +testApplySelectedStructureWithoutASelectionToNextTextWith: aMoveCaretBlock + + aMoveCaretBlock value. + self + activateHeading; + enterExampleStringOntoTextField; + assert: self headingIsAddedToWrittenText + + \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testCorrectLineColNumberAtArbitraryPositionInText.st b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testCorrectLineColNumberAtArbitraryPositionInText.st index 0ed60f2..c6568e4 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testCorrectLineColNumberAtArbitraryPositionInText.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testCorrectLineColNumberAtArbitraryPositionInText.st @@ -2,7 +2,7 @@ unit-tests testCorrectLineColNumberAtArbitraryPositionInText self - enterStringOntoTextField: self multipleLineText; - moveCaretToBeginningOfText; - moveCaretMultipleTimesRight: (self standardText size + 22); + enterStringOntoTextField: self multipleLineString; + moveCaretToBeginOfText; + moveCaretRightBy: (self exampleString size + 22); assert: (self editorModel currentPositionInText) = (7@3) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testCorrectLineColNumberAtEndOfText.st b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testCorrectLineColNumberAtEndOfText.st index c5b370b..1c3b5a9 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testCorrectLineColNumberAtEndOfText.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testCorrectLineColNumberAtEndOfText.st @@ -2,6 +2,6 @@ unit-tests testCorrectLineColNumberAtEndOfText self - enterStringOntoTextField: self multipleLineText; + enterStringOntoTextField: self multipleLineString; moveCaretToEndOfText; assert: (self editorModel currentPositionInText) = (2@7) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testCorrectLineColNumberAtStartOfText.st b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testCorrectLineColNumberAtStartOfText.st index f9a86bb..1d4f325 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testCorrectLineColNumberAtStartOfText.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testCorrectLineColNumberAtStartOfText.st @@ -2,6 +2,6 @@ unit-tests testCorrectLineColNumberAtStartOfText self - enterStringOntoTextField: self multipleLineText; - moveCaretToBeginningOfText; + enterStringOntoTextField: self multipleLineString; + moveCaretToBeginOfText; assert: (self editorModel currentPositionInText) = (1@1) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testNoStructureApplyWhenCaretMovedWith..st b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testNoStructureApplyWhenCaretMovedWith..st new file mode 100644 index 0000000..2b20278 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testNoStructureApplyWhenCaretMovedWith..st @@ -0,0 +1,9 @@ +acceptance-tests +testNoStructureApplyWhenCaretMovedWith: aMoveCaretBlock + + aMoveCaretBlock value. + self + activateHeading; + moveCaret; + enterExampleStringOntoTextField; + deny: self headingIsAddedToWrittenText \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testPaste.st b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testPaste.st index 90b2a51..6265f72 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testPaste.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testPaste.st @@ -1,6 +1,6 @@ unit-tests testPaste - Clipboard clipboardText: self otherText. + Clipboard clipboardText: self exampleString. self textEditor paste. - self assert: self standardText size + self otherText size = self editorText size \ No newline at end of file + self assert: self exampleString size + self exampleString size = self editorText size \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS23TriangleDisappearsAfterSuccesfulSave.st b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS23TriangleDisappearsAfterSuccesfulSave.st index 5e2ceee..30c3f2d 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS23TriangleDisappearsAfterSuccesfulSave.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS23TriangleDisappearsAfterSuccesfulSave.st @@ -2,7 +2,7 @@ acceptance-tests testUS23TriangleDisappearsAfterSuccesfulSave self - enterStringOntoTextField: 'Test text'; + enterExampleStringOntoTextField; enterStringInSaveDialog: 'Save name'; deny: self triangleIsVisible. diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS23TriangleIsStillVisibleWhenSaveDialogIsCancelled.st b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS23TriangleIsStillVisibleWhenSaveDialogIsCancelled.st index c63fad5..e3b9586 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS23TriangleIsStillVisibleWhenSaveDialogIsCancelled.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS23TriangleIsStillVisibleWhenSaveDialogIsCancelled.st @@ -2,6 +2,6 @@ acceptance-tests testUS23TriangleIsStillVisibleWhenSaveDialogIsCancelled self - enterStringOntoTextField: 'Write text'; - enterNothingInSaveDialog; + enterExampleStringOntoTextField; + enterStringInSaveDialog: ''; assert: self triangleIsVisible. \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS23TriangleReappearsWhenEditing.st b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS23TriangleReappearsWhenEditing.st index f73a289..9d0134c 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS23TriangleReappearsWhenEditing.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS23TriangleReappearsWhenEditing.st @@ -2,7 +2,7 @@ acceptance-tests testUS23TriangleReappearsWhenEditing self - enterStringOntoTextField: 'Start writing text.'; + enterExampleStringOntoTextField; enterStringInSaveDialog: 'Save name'; - enterStringOntoTextField: ' Continue to write text.'; + enterExampleStringOntoTextField; assert: self triangleIsVisible. \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS23WhenTriangleIsVisibleCtrlSCanBePressedForSaveDialog.st b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS23WhenTriangleIsVisibleCtrlSCanBePressedForSaveDialog.st deleted file mode 100644 index 1253f49..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS23WhenTriangleIsVisibleCtrlSCanBePressedForSaveDialog.st +++ /dev/null @@ -1,4 +0,0 @@ -acceptance-tests -testUS23WhenTriangleIsVisibleCtrlSCanBePressedForSaveDialog - - "omitted because this behavior was changed in US57" \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS36StructureIsNotExtendable.st b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS36StructureIsNotExtendable.st index 71b996d..edbd288 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS36StructureIsNotExtendable.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS36StructureIsNotExtendable.st @@ -2,8 +2,8 @@ acceptance-tests testUS36StructureIsNotExtendable self textEditor selectFrom: 1 to: self editorText size. - self editorModel addAttribute: self boldTextStructure. + self editorModel addTextAttribute: self boldTextStructure. self textView textMorph releaseParagraph. - self addMoreText. + self enterExampleStringOntoTextField. self deny: self textIsBold \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS49ApplySelectedStructureWithoutASelectionToNextTextBeginning.st b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS49ApplySelectedStructureWithoutASelectionToNextTextBeginning.st index 60925a9..28aa274 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS49ApplySelectedStructureWithoutASelectionToNextTextBeginning.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS49ApplySelectedStructureWithoutASelectionToNextTextBeginning.st @@ -1,10 +1,7 @@ acceptance-tests testUS49ApplySelectedStructureWithoutASelectionToNextTextBeginning - self moveCaretToBeginningOfText; - activateHeading; - enterStringOntoTextField: self otherText. - - self assert: self headingIsAddedToWrittenText + self testApplySelectedStructureWithoutASelectionToNextTextWith: [ + self moveCaretToBeginOfText] \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS49ApplySelectedStructureWithoutASelectionToNextTextEnd.st b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS49ApplySelectedStructureWithoutASelectionToNextTextEnd.st index 77ec785..02ab7b2 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS49ApplySelectedStructureWithoutASelectionToNextTextEnd.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS49ApplySelectedStructureWithoutASelectionToNextTextEnd.st @@ -1,8 +1,5 @@ acceptance-tests testUS49ApplySelectedStructureWithoutASelectionToNextTextEnd - self moveCaretToEndOfText; - activateHeading; - enterStringOntoTextField: self otherText. - - self assert: self headingIsAddedToWrittenText \ No newline at end of file + self testApplySelectedStructureWithoutASelectionToNextTextWith: [ + self moveCaretToEndOfText] \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS49ApplySelectedStructureWithoutASelectionToNextTextMiddle.st b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS49ApplySelectedStructureWithoutASelectionToNextTextMiddle.st index 33753ca..174c34f 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS49ApplySelectedStructureWithoutASelectionToNextTextMiddle.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS49ApplySelectedStructureWithoutASelectionToNextTextMiddle.st @@ -1,10 +1,7 @@ acceptance-tests testUS49ApplySelectedStructureWithoutASelectionToNextTextMiddle - self moveCaretToMidOfText; - activateHeading; - enterStringOntoTextField: self otherText. - - self assert: self headingIsAddedToWrittenText + self testApplySelectedStructureWithoutASelectionToNextTextWith: [ + self moveCaretToMidOfText] \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS49NoStructureApplyWhenCaretMovedBeginning.st b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS49NoStructureApplyWhenCaretMovedBeginning.st index 184be58..73e113d 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS49NoStructureApplyWhenCaretMovedBeginning.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS49NoStructureApplyWhenCaretMovedBeginning.st @@ -1,9 +1,4 @@ acceptance-tests testUS49NoStructureApplyWhenCaretMovedBeginning - self moveCaretToBeginningOfText; - activateHeading; - moveCaret; - enterStringOntoTextField: self otherText. - - self deny: self headingIsAddedToWrittenText \ No newline at end of file + self testNoStructureApplyWhenCaretMovedWith: [self moveCaretToBeginOfText] \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS49NoStructureApplyWhenCaretMovedEnd.st b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS49NoStructureApplyWhenCaretMovedEnd.st index 3b0355a..75978bb 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS49NoStructureApplyWhenCaretMovedEnd.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS49NoStructureApplyWhenCaretMovedEnd.st @@ -1,9 +1,4 @@ acceptance-tests testUS49NoStructureApplyWhenCaretMovedEnd - self moveCaretToEndOfText; - activateHeading; - moveCaret; - enterStringOntoTextField: self otherText. - - self deny: self headingIsAddedToWrittenText \ No newline at end of file + self testNoStructureApplyWhenCaretMovedWith: [self moveCaretToEndOfText] \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS49NoStructureApplyWhenCaretMovedMid.st b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS49NoStructureApplyWhenCaretMovedMid.st index 9c0e68a..4b65a16 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS49NoStructureApplyWhenCaretMovedMid.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS49NoStructureApplyWhenCaretMovedMid.st @@ -1,9 +1,4 @@ acceptance-tests testUS49NoStructureApplyWhenCaretMovedMid - self moveCaretToMidOfText; - activateHeading; - moveCaret; - enterStringOntoTextField: self otherText. - - self deny: self headingIsAddedToWrittenText \ No newline at end of file + self testNoStructureApplyWhenCaretMovedWith: [self moveCaretToMidOfText] \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS69LinkGetsPasted.st b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS69LinkGetsPasted.st index 46336f2..3af0ce3 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS69LinkGetsPasted.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS69LinkGetsPasted.st @@ -3,4 +3,4 @@ testUS69LinkGetsPasted Clipboard clipboardText: self url. self textEditor paste. - self assert: self standardText size + self url size = self editorText size \ No newline at end of file + self assert: self exampleString size + self url size = self editorText size \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS69NormalTextDoesNotConvertToClickableLink.st b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS69NormalTextDoesNotConvertToClickableLink.st index cc2cc71..6ed5893 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS69NormalTextDoesNotConvertToClickableLink.st +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/instance/testUS69NormalTextDoesNotConvertToClickableLink.st @@ -1,7 +1,7 @@ acceptance-tests testUS69NormalTextDoesNotConvertToClickableLink - Clipboard clipboardText: self standardText. + Clipboard clipboardText: self exampleString. self textEditor selectAll. self textEditor paste. self deny: self textIsLink \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/methodProperties.json b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/methodProperties.json index fb1c876..a42f347 100644 --- a/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/methodProperties.json +++ b/packages/RichTextEditing-Tests.package/RichTextEditorTextTests.class/methodProperties.json @@ -1,53 +1,41 @@ { "class" : { - "lastStoredRun" : "frc 6/12/2020 19:59" }, + }, "instance" : { - "activateHeading" : "ls 6/21/2019 16:34", - "addMoreText" : "lh 6/5/2019 18:17", + "activateHeading" : "tok 8/7/2020 19:37", "caretPosition" : "ls 6/21/2019 16:34", "caretPosition:" : "ls 6/21/2019 16:34", - "emphasisCodeBold" : "lh 6/5/2019 18:20", "enterCharacter:times:" : "ls 6/21/2019 17:12", - "enterNothingInSaveDialog" : "ls 5/10/2019 01:37", "enterSaveNameInDialog:" : "tok 7/9/2020 21:57", - "flattenTextAttributes:" : "kh 6/19/2020 17:03", - "headingIsAddedToWrittenText" : "JEH 6/14/2020 14:00", - "headingTextStructureIndex" : "ls 6/26/2019 22:25", - "leftArrowKey" : "MB 6/19/2019 18:08", + "headingIsAddedToWrittenText" : "tok 8/7/2020 20:02", "middleTextOffset" : "MB 6/19/2019 18:06", - "moveCaret" : "JEH 6/14/2020 14:04", - "moveCaretMultipleTimesLeft:" : "JEH 6/14/2020 14:04", - "moveCaretMultipleTimesRight:" : "JEH 6/14/2020 14:04", - "moveCaretToBeginningOfOtherText" : "JEH 6/14/2020 14:04", - "moveCaretToBeginningOfText" : "JEH 6/14/2020 14:04", - "moveCaretToEndOfText" : "JEH 6/14/2020 14:04", - "moveCaretToMidOfText" : "JEH 6/14/2020 14:04", - "multipleLineText" : "JEH 6/14/2020 18:12", - "otherText" : "ls 6/21/2019 17:14", - "rightArrowKey" : "JEH 6/14/2020 13:07", - "setUp" : "MB 7/25/2019 12:15", - "standardText" : "ls 6/21/2019 17:14", - "testCorrectLineColNumberAtArbitraryPositionInText" : "JEH 6/14/2020 18:12", - "testCorrectLineColNumberAtEndOfText" : "JEH 6/14/2020 18:11", - "testCorrectLineColNumberAtStartOfText" : "JEH 6/14/2020 18:11", - "testPaste" : "kh 6/15/2020 20:48", + "moveCaret" : "tok 8/7/2020 19:39", + "moveCaretLeftBy:" : "tok 8/7/2020 19:38", + "moveCaretRightBy:" : "tok 8/7/2020 19:46", + "moveCaretToBeginOfText" : "tok 8/7/2020 19:54", + "moveCaretToEndOfText" : "tok 8/7/2020 19:39", + "moveCaretToMidOfText" : "tok 8/7/2020 19:39", + "multipleLineString" : "tok 8/7/2020 16:53", + "setUp" : "tok 8/7/2020 17:32", + "testApplySelectedStructureWithoutASelectionToNextTextWith:" : "tok 8/7/2020 19:31", + "testCorrectLineColNumberAtArbitraryPositionInText" : "tok 8/7/2020 19:46", + "testCorrectLineColNumberAtEndOfText" : "tok 8/7/2020 16:53", + "testCorrectLineColNumberAtStartOfText" : "tok 8/7/2020 19:39", + "testNoStructureApplyWhenCaretMovedWith:" : "tok 8/7/2020 19:31", + "testPaste" : "tok 8/7/2020 16:57", "testPasteDetectsURL" : "frc 7/3/2020 19:33", - "testUS23TriangleDisappearsAfterSuccesfulSave" : "ls 7/25/2019 13:20", - "testUS23TriangleIsStillVisibleWhenSaveDialogIsCancelled" : "AG 6/21/2019 14:16", - "testUS23TriangleReappearsWhenEditing" : "AG 6/21/2019 14:33", - "testUS23WhenTriangleIsVisibleCtrlSCanBePressedForSaveDialog" : "lh 7/24/2019 16:19", - "testUS36StructureIsNotExtendable" : "lh 6/5/2019 22:03", - "testUS49ApplySelectedStructureWithoutASelectionToNextTextBeginning" : "JEH 6/14/2020 14:00", - "testUS49ApplySelectedStructureWithoutASelectionToNextTextEnd" : "JEH 6/14/2020 13:56", - "testUS49ApplySelectedStructureWithoutASelectionToNextTextMiddle" : "MB 7/25/2019 10:33", - "testUS49NoStructureApplyWhenCaretMovedBeginning" : "MB 7/25/2019 10:32", - "testUS49NoStructureApplyWhenCaretMovedEnd" : "MB 7/25/2019 10:32", - "testUS49NoStructureApplyWhenCaretMovedMid" : "MB 7/25/2019 10:32", - "testUS69LinkGetsPasted" : "kh 6/15/2020 20:13", - "testUS69NormalTextDoesNotConvertToClickableLink" : "kh 6/15/2020 20:08", + "testUS23TriangleDisappearsAfterSuccesfulSave" : "tok 8/7/2020 17:37", + "testUS23TriangleIsStillVisibleWhenSaveDialogIsCancelled" : "tok 8/7/2020 19:24", + "testUS23TriangleReappearsWhenEditing" : "tok 8/7/2020 17:37", + "testUS36StructureIsNotExtendable" : "tok 8/7/2020 17:32", + "testUS49ApplySelectedStructureWithoutASelectionToNextTextBeginning" : "tok 8/7/2020 19:39", + "testUS49ApplySelectedStructureWithoutASelectionToNextTextEnd" : "tok 8/7/2020 19:29", + "testUS49ApplySelectedStructureWithoutASelectionToNextTextMiddle" : "tok 8/7/2020 19:29", + "testUS49NoStructureApplyWhenCaretMovedBeginning" : "tok 8/7/2020 19:39", + "testUS49NoStructureApplyWhenCaretMovedEnd" : "tok 8/7/2020 19:27", + "testUS49NoStructureApplyWhenCaretMovedMid" : "tok 8/7/2020 19:27", + "testUS69LinkGetsPasted" : "tok 8/7/2020 16:57", + "testUS69NormalTextDoesNotConvertToClickableLink" : "tok 8/7/2020 16:57", "testUS69PastedLinkConvertsToClickableLink" : "kh 6/15/2020 20:16", - "textHasTextAttribute:" : "kh 6/19/2020 17:07", - "textHasTextEmphasis:" : "kh 6/15/2020 20:10", - "textIsBold" : "kh 6/15/2020 20:04", "textIsLink" : "kh 6/15/2020 20:10", "url" : "kh 6/15/2020 19:25" } } diff --git a/packages/RichTextEditing-Tests.package/RichTextFormattingTests.class/class/lastStoredRun.st b/packages/RichTextEditing-Tests.package/RichTextFormattingTests.class/class/lastStoredRun.st deleted file mode 100644 index 1d3a839..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextFormattingTests.class/class/lastStoredRun.st +++ /dev/null @@ -1,3 +0,0 @@ -history -lastStoredRun - ^ ((Dictionary new) add: (#duration->0); add: (#errors->((Set new))); add: (#passed->((Set new) add: #testUS25ParagraphBreaksNewLine; add: #testUS25NewLineHasEqualLineSpacing; add: #testUS25ParagraphLineHasLargerLineSpacing; yourself)); add: (#failures->((Set new))); add: (#timeStamp->'12 June 2020 7:50:05.529548 pm' asTimeStamp); add: (#durations->((Dictionary new) add: (#testUS25ParagraphBreaksNewLine->0); add: (#testUS25NewLineHasEqualLineSpacing->0); add: (#testUS25ParagraphLineHasLargerLineSpacing->0); yourself)); yourself) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextFormattingTests.class/instance/loadTextIntoScanner..st b/packages/RichTextEditing-Tests.package/RichTextFormattingTests.class/instance/loadTextIntoScanner..st index f542ccf..115f84a 100644 --- a/packages/RichTextEditing-Tests.package/RichTextFormattingTests.class/instance/loadTextIntoScanner..st +++ b/packages/RichTextEditing-Tests.package/RichTextFormattingTests.class/instance/loadTextIntoScanner..st @@ -1,4 +1,4 @@ utilities loadTextIntoScanner: aText - self scanner text: aText textStyle: TextStyle default. \ No newline at end of file + self scanner text: aText textStyle: TextStyle default \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextFormattingTests.class/instance/modifiedLineHeight..st b/packages/RichTextEditing-Tests.package/RichTextFormattingTests.class/instance/modifiedLineHeightFor..st similarity index 76% rename from packages/RichTextEditing-Tests.package/RichTextFormattingTests.class/instance/modifiedLineHeight..st rename to packages/RichTextEditing-Tests.package/RichTextFormattingTests.class/instance/modifiedLineHeightFor..st index f3f121d..d217287 100644 --- a/packages/RichTextEditing-Tests.package/RichTextFormattingTests.class/instance/modifiedLineHeight..st +++ b/packages/RichTextEditing-Tests.package/RichTextFormattingTests.class/instance/modifiedLineHeightFor..st @@ -1,4 +1,4 @@ utilities -modifiedLineHeight: textLine +modifiedLineHeightFor: textLine ^ (textLine lineHeight - self extraSpacing) * self paragraphLineExtraHeight + self extraSpacing \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextFormattingTests.class/instance/paragraphCharacter.st b/packages/RichTextEditing-Tests.package/RichTextFormattingTests.class/instance/paragraphCharacter.st deleted file mode 100644 index e2f7de3..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextFormattingTests.class/instance/paragraphCharacter.st +++ /dev/null @@ -1,4 +0,0 @@ -constants -paragraphCharacter - - ^ Character value: 182 \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextFormattingTests.class/instance/setUp.st b/packages/RichTextEditing-Tests.package/RichTextFormattingTests.class/instance/setUp.st index 8ac0dee..4e86559 100644 --- a/packages/RichTextEditing-Tests.package/RichTextFormattingTests.class/instance/setUp.st +++ b/packages/RichTextEditing-Tests.package/RichTextFormattingTests.class/instance/setUp.st @@ -1,6 +1,6 @@ -resources +running setUp super setUp. - self scanner: CompositionScanner new. + self scanner: CompositionScanner new \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextFormattingTests.class/instance/testUS25ParagraphBreaksNewLine.st b/packages/RichTextEditing-Tests.package/RichTextFormattingTests.class/instance/testUS25ParagraphBreaksNewLine.st index 09a199a..56c49a4 100644 --- a/packages/RichTextEditing-Tests.package/RichTextFormattingTests.class/instance/testUS25ParagraphBreaksNewLine.st +++ b/packages/RichTextEditing-Tests.package/RichTextFormattingTests.class/instance/testUS25ParagraphBreaksNewLine.st @@ -3,4 +3,5 @@ testUS25ParagraphBreaksNewLine self loadTextIntoScanner: self textWithParagraph. - self assert: (self textWithParagraph at: self firstLine last) asString equals: self paragraphCharacter asString \ No newline at end of file + self assert: (self textWithParagraph at: self firstLine last) asString + equals: RichTextEditor paragraphCharacter asString \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextFormattingTests.class/instance/testUS25ParagraphLineHasLargerLineSpacing.st b/packages/RichTextEditing-Tests.package/RichTextFormattingTests.class/instance/testUS25ParagraphLineHasLargerLineSpacing.st index 16c8abc..0cc6236 100644 --- a/packages/RichTextEditing-Tests.package/RichTextFormattingTests.class/instance/testUS25ParagraphLineHasLargerLineSpacing.st +++ b/packages/RichTextEditing-Tests.package/RichTextFormattingTests.class/instance/testUS25ParagraphLineHasLargerLineSpacing.st @@ -7,4 +7,4 @@ testUS25ParagraphLineHasLargerLineSpacing textLine1 := self lineBeginningAt: self firstLineFirstIndex. textLine2 := self lineBeginningAt: textLine1 last + 1. - self assert: textLine1 lineHeight equals: (self modifiedLineHeight: textLine2) \ No newline at end of file + self assert: textLine1 lineHeight equals: (self modifiedLineHeightFor: textLine2) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextFormattingTests.class/instance/textWithParagraph.st b/packages/RichTextEditing-Tests.package/RichTextFormattingTests.class/instance/textWithParagraph.st deleted file mode 100644 index 60546fa..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextFormattingTests.class/instance/textWithParagraph.st +++ /dev/null @@ -1,4 +0,0 @@ -constants -textWithParagraph - - ^ ('foo', self paragraphCharacter asString , 'bar.') asText \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextFormattingTests.class/methodProperties.json b/packages/RichTextEditing-Tests.package/RichTextFormattingTests.class/methodProperties.json index 557eb67..3390c1c 100644 --- a/packages/RichTextEditing-Tests.package/RichTextFormattingTests.class/methodProperties.json +++ b/packages/RichTextEditing-Tests.package/RichTextFormattingTests.class/methodProperties.json @@ -1,22 +1,20 @@ { "class" : { - "lastStoredRun" : "frc 6/12/2020 19:59" }, + }, "instance" : { "extraSpacing" : "lh 7/24/2019 16:09", "firstLine" : "tok 7/10/2020 11:52", "firstLineFirstIndex" : "MB 6/10/2019 17:33", "lineBeginningAt:" : "tok 7/10/2020 11:52", - "loadTextIntoScanner:" : "MB 6/12/2019 20:52", - "modifiedLineHeight:" : "lh 7/24/2019 16:09", + "loadTextIntoScanner:" : "tok 8/7/2020 17:09", + "modifiedLineHeightFor:" : "tok 8/7/2020 19:41", "newLineCharacter" : "MB 6/12/2019 20:50", - "paragraphCharacter" : "MB 7/25/2019 11:22", "paragraphLineExtraHeight" : "ls 7/3/2019 22:39", "scanner" : "MB 5/29/2019 18:00", "scanner:" : "MB 5/29/2019 18:00", - "setUp" : "MB 6/12/2019 20:55", + "setUp" : "tok 8/7/2020 17:09", "sufficientLargeRectangle" : "MB 6/10/2019 17:36", "testUS25NewLineHasEqualLineSpacing" : "tok 7/10/2020 11:52", - "testUS25ParagraphBreaksNewLine" : "lh 7/24/2019 21:02", - "testUS25ParagraphLineHasLargerLineSpacing" : "tok 7/10/2020 11:52", - "textWithNewLine" : "MB 6/12/2019 22:15", - "textWithParagraph" : "MB 6/12/2019 20:54" } } + "testUS25ParagraphBreaksNewLine" : "tok 8/7/2020 19:42", + "testUS25ParagraphLineHasLargerLineSpacing" : "tok 8/7/2020 19:41", + "textWithNewLine" : "MB 6/12/2019 22:15" } } diff --git a/packages/RichTextEditing-Tests.package/RichTextFormattingTests.class/properties.json b/packages/RichTextEditing-Tests.package/RichTextFormattingTests.class/properties.json index d8bbde8..8145b7d 100644 --- a/packages/RichTextEditing-Tests.package/RichTextFormattingTests.class/properties.json +++ b/packages/RichTextEditing-Tests.package/RichTextFormattingTests.class/properties.json @@ -10,5 +10,5 @@ "name" : "RichTextFormattingTests", "pools" : [ ], - "super" : "TestCase", + "super" : "RichTextEditorTestCase", "type" : "normal" } diff --git a/packages/RichTextEditing-Tests.package/RichTextMockFileStream.class/README.md b/packages/RichTextEditing-Tests.package/RichTextMockFileStream.class/README.md new file mode 100644 index 0000000..2f2c98e --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextMockFileStream.class/README.md @@ -0,0 +1 @@ +I am a RTEMockFileStream. I mock certain behaviors of StandardFileStream, used to test different Export Strategies of SquidWord, a RichtTextEditor. \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextMockFileStream.class/instance/close.st b/packages/RichTextEditing-Tests.package/RichTextMockFileStream.class/instance/close.st new file mode 100644 index 0000000..e65eb2b --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextMockFileStream.class/instance/close.st @@ -0,0 +1,2 @@ +file open/close +close \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextMockFileStream.class/instance/contents.st b/packages/RichTextEditing-Tests.package/RichTextMockFileStream.class/instance/contents.st new file mode 100644 index 0000000..637dc8b --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextMockFileStream.class/instance/contents.st @@ -0,0 +1,4 @@ +accessing +contents + + ^ self result \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextMockFileStream.class/instance/nextPutAll..st b/packages/RichTextEditing-Tests.package/RichTextMockFileStream.class/instance/nextPutAll..st new file mode 100644 index 0000000..44561dd --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextMockFileStream.class/instance/nextPutAll..st @@ -0,0 +1,4 @@ +accessing +nextPutAll: aCollection + + self result: aCollection \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextMockFileStream.class/instance/result..st b/packages/RichTextEditing-Tests.package/RichTextMockFileStream.class/instance/result..st new file mode 100644 index 0000000..a6a8ad8 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextMockFileStream.class/instance/result..st @@ -0,0 +1,4 @@ +accessing +result: anObject + + result := anObject \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextMockFileStream.class/instance/result.st b/packages/RichTextEditing-Tests.package/RichTextMockFileStream.class/instance/result.st new file mode 100644 index 0000000..ce82001 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextMockFileStream.class/instance/result.st @@ -0,0 +1,4 @@ +accessing +result + + ^ result \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextMockFileStream.class/methodProperties.json b/packages/RichTextEditing-Tests.package/RichTextMockFileStream.class/methodProperties.json new file mode 100644 index 0000000..36ca07d --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextMockFileStream.class/methodProperties.json @@ -0,0 +1,9 @@ +{ + "class" : { + }, + "instance" : { + "close" : "frc 8/4/2020 14:36", + "contents" : "frc 8/4/2020 14:40", + "nextPutAll:" : "frc 8/4/2020 14:41", + "result" : "frc 8/4/2020 14:36", + "result:" : "frc 8/4/2020 14:36" } } diff --git a/packages/RichTextEditing-Tests.package/RichTextMockFileStream.class/properties.json b/packages/RichTextEditing-Tests.package/RichTextMockFileStream.class/properties.json new file mode 100644 index 0000000..9782576 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextMockFileStream.class/properties.json @@ -0,0 +1,14 @@ +{ + "category" : "RichTextEditing-Tests-Utilities", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "frc 8/4/2020 14:43", + "instvars" : [ + "result" ], + "name" : "RichTextMockFileStream", + "pools" : [ + ], + "super" : "Object", + "type" : "normal" } diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/class/lastStoredRun.st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/class/lastStoredRun.st deleted file mode 100644 index 7d073c1..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/class/lastStoredRun.st +++ /dev/null @@ -1,3 +0,0 @@ -history -lastStoredRun - ^ ((Dictionary new) add: (#duration->2812); add: (#errors->((Set new))); add: (#passed->((Set new) add: #testUS43PreviewTextfieldHasSelectedStructureApplied; add: #testUS58StructureWithHighestPriorityWins; add: #testUS64IndentationStyleAvailable; add: #testUS32CheckAllStylesAreAvailable; add: #testUS43PreviewTextfieldExists; add: #testUS58StructurePriorityCanBeIncreased; add: #testUS58StructurePriorityCanBeDecreased; yourself)); add: (#failures->((Set new))); add: (#timeStamp->'12 June 2020 7:50:05.529548 pm' asTimeStamp); add: (#durations->((Dictionary new) add: (#testUS58StructureWithHighestPriorityWins->372); add: (#testUS64IndentationStyleAvailable->347); add: (#testUS43PreviewTextfieldHasSelectedStructureApplied->358); add: (#testUS32CheckAllStylesAreAvailable->370); add: (#testUS43PreviewTextfieldExists->355); add: (#testUS58StructurePriorityCanBeIncreased->504); add: (#testUS58StructurePriorityCanBeDecreased->506); yourself)); yourself) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/bufferDocument.st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/bufferDocument.st deleted file mode 100644 index fcb07b0..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/bufferDocument.st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -bufferDocument - - ^ self editorModel bufferDocument \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/firstIndex.st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/firstIndex.st deleted file mode 100644 index 4770d79..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/firstIndex.st +++ /dev/null @@ -1,4 +0,0 @@ -constants -firstIndex - - ^ 1 \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/hasNoStructureFor..st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/hasNoStructureFor..st new file mode 100644 index 0000000..2e813ce --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/hasNoStructureFor..st @@ -0,0 +1,6 @@ +utilities +hasNoStructureFor: aText + + ^ (aText runs copyFrom: 0 to: aText size) + allSatisfy: [:attributes | attributes + noneSatisfy: [:attribute | (attribute isTextStructure) and: [attribute isNullObject not]]] \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/hasNoStructureForText..st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/hasNoStructureForText..st deleted file mode 100644 index 7cba6b4..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/hasNoStructureForText..st +++ /dev/null @@ -1,7 +0,0 @@ -utilities -hasNoStructureForText: aText - - ^ (aText runs copyFrom: 0 to: aText size) - allSatisfy: [:attributes | attributes - noneSatisfy: [:attribute | attribute isTextStructure]] - \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/hasStructure.for..st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/hasStructure.for..st new file mode 100644 index 0000000..26450b4 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/hasStructure.for..st @@ -0,0 +1,10 @@ +utilities +hasStructure: aSymbol for: aText + + ^ self document class + hasStructure: aSymbol + for: aText + from: 1 + to: aText size + + \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/hasStructure.forText..st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/hasStructure.forText..st deleted file mode 100644 index 09b6b7b..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/hasStructure.forText..st +++ /dev/null @@ -1,10 +0,0 @@ -utilities -hasStructure: aSymbol forText: aText - - ^ self editorModel bufferDocument - hasStructure: aSymbol - forText: aText - from: 1 - to: aText size - - \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/initialTextStructures.st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/initialTextStructures.st index bf93f03..a20d4d0 100644 --- a/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/initialTextStructures.st +++ b/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/initialTextStructures.st @@ -1,5 +1,5 @@ utilities initialTextStructures - ^ self bufferDocument class initialTextStructures collect: [:each | + ^ self document class initialTextStructures collect: [:each | each structureIdentifier] \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/moveDownButton.st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/moveDownButton.st new file mode 100644 index 0000000..853f77e --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/moveDownButton.st @@ -0,0 +1,4 @@ +constants +moveDownButton + + ^ self structureEditorView findByLabel: 'Down' \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/moveUpButton.st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/moveUpButton.st new file mode 100644 index 0000000..e976535 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/moveUpButton.st @@ -0,0 +1,4 @@ +constants +moveUpButton + + ^ self structureEditorView findByLabel: 'Up' \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/previewText.st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/previewText.st index 5bb8c52..2f4a556 100644 --- a/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/previewText.st +++ b/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/previewText.st @@ -1,4 +1,4 @@ -accessing +utilities previewText ^ (self structureEditorView findByName: self textPreviewLabel) text \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/secondIndex.st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/secondIndex.st deleted file mode 100644 index 1314403..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/secondIndex.st +++ /dev/null @@ -1,4 +0,0 @@ -constants -secondIndex - - ^ 2 \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/styleList.st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/styleList.st new file mode 100644 index 0000000..d018ba1 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/styleList.st @@ -0,0 +1,4 @@ +acceptance-tests +styleList + + ^ (self structureEditorView findByClass: PluggableListMorphOfMany) list \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/testUS32CheckAllStylesAreAvailable.st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/testUS32CheckAllStylesAreAvailable.st index ca3ab65..85cf208 100644 --- a/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/testUS32CheckAllStylesAreAvailable.st +++ b/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/testUS32CheckAllStylesAreAvailable.st @@ -1,9 +1,5 @@ acceptance-tests testUS32CheckAllStylesAreAvailable - - | styleList essentialStyles | - styleList := self structureEditorView findByClass: PluggableListMorphOfMany. - essentialStyles := {#bold . #italic . #underlined . #struckOut . #notExtendable} asSet. - - self assert: (essentialStyles allSatisfy: [:each | styleList list asSet includes: each]) - \ No newline at end of file + + self assert: (RichTextStructureEditor allStyleIdentifiers + allSatisfy: [:each | self styleList includes: each]) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/testUS43PreviewTextfieldHasSelectedStructureApplied.st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/testUS43PreviewTextfieldHasSelectedStructureApplied.st index 9da49e3..b5adb58 100644 --- a/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/testUS43PreviewTextfieldHasSelectedStructureApplied.st +++ b/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/testUS43PreviewTextfieldHasSelectedStructureApplied.st @@ -1,8 +1,8 @@ acceptance-tests testUS43PreviewTextfieldHasSelectedStructureApplied - self assert: (self hasNoStructureForText: self previewText). + self assert: (self hasNoStructureFor: self previewText). self structureEditor currentStructureSymbol: #bold. - self assert: (self hasStructure: #bold forText: self previewText) + self assert: (self hasStructure: #bold for: self previewText) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/testUS58StructurePriorityCanBeDecreased.st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/testUS58StructurePriorityCanBeDecreased.st index f8249dd..a18cb42 100644 --- a/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/testUS58StructurePriorityCanBeDecreased.st +++ b/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/testUS58StructurePriorityCanBeDecreased.st @@ -1,12 +1,11 @@ acceptance-tests testUS58StructurePriorityCanBeDecreased - | moveDownButton structure | + | structure | self assert: self initialTextStructures size >= 2. - structure := self symbolAt: self firstIndex. + structure := self symbolAt: 1. self structureEditor currentStructureSymbol: structure. - moveDownButton := self structureEditorView findByLabel: 'Down'. - moveDownButton click. - self assert: (self symbolAt: self secondIndex) equals: structure. \ No newline at end of file + self moveDownButton click. + self assert: (self symbolAt: 2) equals: structure \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/testUS58StructurePriorityCanBeIncreased.st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/testUS58StructurePriorityCanBeIncreased.st index 288a4b6..a9603e6 100644 --- a/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/testUS58StructurePriorityCanBeIncreased.st +++ b/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/testUS58StructurePriorityCanBeIncreased.st @@ -1,12 +1,11 @@ acceptance-tests testUS58StructurePriorityCanBeIncreased - | moveUpButton structure | + | structure | self assert: self initialTextStructures size >= 2. - structure := self symbolAt: self secondIndex. + structure := self symbolAt: 2. self structureEditor currentStructureSymbol: structure. - moveUpButton := self structureEditorView findByLabel: 'Up'. - moveUpButton click. - self assert: (self symbolAt: self firstIndex) equals: structure. \ No newline at end of file + self moveUpButton click. + self assert: (self symbolAt: 1) equals: structure \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/testUS58StructureWithHighestPriorityWins.st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/testUS58StructureWithHighestPriorityWins.st index eede7cd..d088222 100644 --- a/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/testUS58StructureWithHighestPriorityWins.st +++ b/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/testUS58StructureWithHighestPriorityWins.st @@ -2,11 +2,11 @@ acceptance-tests testUS58StructureWithHighestPriorityWins self - enterStringOntoTextField: 'test'; - setStructureAt: self firstIndex toColor: Color green; - setStructureAt: self secondIndex toColor: Color blue; - addAttributeAt: self firstIndex; - addAttributeAt: self secondIndex; + enterExampleStringOntoTextField; + setStructureAt: 1 toColor: Color green; + setStructureAt: 2 toColor: Color blue; + addAttributeAt: 1; + addAttributeAt: 2; assert: (self textHasColor: Color green); - removeAttributeAt: self firstIndex; + removeAttributeAt: 1; assert: (self textHasColor: Color blue) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/testUS64IndentationStyleAvailable.st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/testUS64IndentationStyleAvailable.st index 3e5150f..5606431 100644 --- a/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/testUS64IndentationStyleAvailable.st +++ b/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/instance/testUS64IndentationStyleAvailable.st @@ -1,8 +1,4 @@ acceptance-tests testUS64IndentationStyleAvailable - - | styleList | - styleList := self structureEditorView findByClass: PluggableListMorphOfMany. - self assert: (styleList list asSet includes: #indented) - \ No newline at end of file + self assert: (self styleList includes: #indented) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/methodProperties.json b/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/methodProperties.json index 7f12027..4ac92e9 100644 --- a/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/methodProperties.json +++ b/packages/RichTextEditing-Tests.package/RichTextStructureEditorStructureTests.class/methodProperties.json @@ -1,23 +1,23 @@ { "class" : { - "lastStoredRun" : "frc 6/12/2020 19:59" }, + }, "instance" : { - "addAttributeAt:" : "kh 6/21/2020 10:04", - "bufferDocument" : "lh 7/3/2019 22:16", - "firstIndex" : "lh 7/24/2019 20:06", - "hasNoStructureForText:" : "lh 7/24/2019 17:46", - "hasStructure:forText:" : "lh 7/24/2019 17:41", - "initialTextStructures" : "lh 7/3/2019 22:25", + "addAttributeAt:" : "frc 8/7/2020 14:11", + "hasNoStructureFor:" : "tok 8/7/2020 20:01", + "hasStructure:for:" : "tok 8/7/2020 20:02", + "initialTextStructures" : "tok 8/7/2020 17:14", + "moveDownButton" : "frc 8/7/2020 10:29", + "moveUpButton" : "frc 8/7/2020 10:29", "previewText" : "lh 7/24/2019 17:48", "removeAttributeAt:" : "kh 6/21/2020 10:04", - "secondIndex" : "lh 7/24/2019 20:06", "setStructureAt:toColor:" : "kh 6/21/2020 15:41", + "styleList" : "tok 8/7/2020 20:12", "symbolAt:" : "lh 7/3/2019 22:46", - "testUS32CheckAllStylesAreAvailable" : "kh 6/19/2020 17:31", + "testUS32CheckAllStylesAreAvailable" : "tok 8/7/2020 20:11", "testUS43PreviewTextfieldExists" : "ls 6/6/2019 00:27", - "testUS43PreviewTextfieldHasSelectedStructureApplied" : "kh 6/19/2020 10:46", - "testUS58StructurePriorityCanBeDecreased" : "lh 7/24/2019 20:07", - "testUS58StructurePriorityCanBeIncreased" : "lh 7/24/2019 20:07", - "testUS58StructureWithHighestPriorityWins" : "ls 7/25/2019 12:53", - "testUS64IndentationStyleAvailable" : "tok 6/1/2020 13:10", + "testUS43PreviewTextfieldHasSelectedStructureApplied" : "tok 8/7/2020 20:01", + "testUS58StructurePriorityCanBeDecreased" : "tok 8/7/2020 20:08", + "testUS58StructurePriorityCanBeIncreased" : "tok 8/7/2020 20:08", + "testUS58StructureWithHighestPriorityWins" : "tok 8/7/2020 20:08", + "testUS64IndentationStyleAvailable" : "tok 8/7/2020 20:12", "textPreviewLabel" : "MB 6/12/2019 20:29" } } diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTestCase.class/instance/setUp.st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTestCase.class/instance/setUp.st index 25a469d..2629845 100644 --- a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTestCase.class/instance/setUp.st +++ b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTestCase.class/instance/setUp.st @@ -1,8 +1,8 @@ -resources +running setUp super setUp. self richTextEditorMorph: self editorView; - wantsToTest: (RichTextStructureEditor openWith: self editorModel bufferDocument); + wantsToTest: (RichTextStructureEditor open: self document); structureEditor: self structureEditorView model \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTestCase.class/instance/tearDown.st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTestCase.class/instance/tearDown.st index 97600c0..f136a5a 100644 --- a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTestCase.class/instance/tearDown.st +++ b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTestCase.class/instance/tearDown.st @@ -1,4 +1,4 @@ -resources +running tearDown self richTextEditorMorph abandon. diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTestCase.class/methodProperties.json b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTestCase.class/methodProperties.json index 0254c98..fd32074 100644 --- a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTestCase.class/methodProperties.json +++ b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTestCase.class/methodProperties.json @@ -4,7 +4,7 @@ "instance" : { "richTextEditorMorph" : "ls 6/6/2019 00:24", "richTextEditorMorph:" : "MB 7/25/2019 12:04", - "setUp" : "JEH 5/31/2020 12:35", + "setUp" : "tok 8/7/2020 17:14", "structureEditor" : "ls 6/6/2019 00:23", "structureEditor:" : "ls 6/6/2019 00:24", "structureEditorView" : "ls 6/6/2019 00:24", diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/class/lastStoredRun.st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/class/lastStoredRun.st deleted file mode 100644 index 87e14c2..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/class/lastStoredRun.st +++ /dev/null @@ -1,3 +0,0 @@ -history -lastStoredRun - ^ ((Dictionary new) add: (#duration->2997); add: (#errors->((Set new))); add: (#passed->((Set new) add: #testUS29AddNewStructure; add: #testUS29DisplayAllStructures; add: #testUS41ColorIsAssignedToStructure; add: #testUS42FontCanBeReset; add: #testUS29RemoveNewStructure; add: #testUS42FontSizeCanBeAssigned; add: #testUS42FontIsAppliedToStructure; add: #testUS41ColorCanBeReset; yourself)); add: (#failures->((Set new))); add: (#timeStamp->'12 June 2020 7:50:05.529548 pm' asTimeStamp); add: (#durations->((Dictionary new) add: (#testUS29AddNewStructure->362); add: (#testUS29DisplayAllStructures->415); add: (#testUS41ColorIsAssignedToStructure->376); add: (#testUS42FontCanBeReset->365); add: (#testUS42FontSizeCanBeAssigned->376); add: (#testUS29RemoveNewStructure->355); add: (#testUS42FontIsAppliedToStructure->374); add: (#testUS41ColorCanBeReset->374); yourself)); yourself) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/acceptCurrentTemplate.st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/acceptCurrentTemplate.st index 3eb3703..c21ea67 100644 --- a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/acceptCurrentTemplate.st +++ b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/acceptCurrentTemplate.st @@ -1,4 +1,5 @@ utilities acceptCurrentTemplate - self enterString: 'Accept Template' inBackwardsCompatibleDialog: [(self structureEditorView findByLabel: 'Accept Template') click]. \ No newline at end of file + self enterString: 'Select Template' inBackwardsCompatibleDialog: [ + (self structureEditorView findByLabel: 'Accept Template') click] diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/allStructuresAreDisplayed.st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/allStructuresAreDisplayed.st index 57323da..1c87a67 100644 --- a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/allStructuresAreDisplayed.st +++ b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/allStructuresAreDisplayed.st @@ -1,7 +1,5 @@ utilities allStructuresAreDisplayed - | structureSymbols | - structureSymbols := self document textStructureSymbols. - - ^ (structureSymbols allSatisfy: [:structure | self structureIsDisplayed: structure]) \ No newline at end of file + ^ (self document textStructureSymbols + allSatisfy: [:structure | self structureIsDisplayed: structure]) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/colorPickerLabel.st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/colorPickerLabel.st new file mode 100644 index 0000000..525cd49 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/colorPickerLabel.st @@ -0,0 +1,4 @@ +constants +colorPickerLabel + + ^ 'Color' \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/coloredStructureName.st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/coloredStructureName.st deleted file mode 100644 index c358c5d..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/coloredStructureName.st +++ /dev/null @@ -1,4 +0,0 @@ -utilities -coloredStructureName - - ^ 'coloredStructure' \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/coloredStructureSymbol.st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/coloredStructureSymbol.st index 141fbbb..eac7606 100644 --- a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/coloredStructureSymbol.st +++ b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/coloredStructureSymbol.st @@ -1,4 +1,4 @@ utilities coloredStructureSymbol - ^ self coloredStructureName asSymbol \ No newline at end of file + ^ #coloredStructure \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/displayedStructuresEqualInitialStructuresOf..st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/displayedStructuresEqualInitialStructuresOf..st index f4f3b16..0d13bb2 100644 --- a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/displayedStructuresEqualInitialStructuresOf..st +++ b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/displayedStructuresEqualInitialStructuresOf..st @@ -1,4 +1,5 @@ utilities displayedStructuresEqualInitialStructuresOf: aRichTextTemplate - ^ (self structureEditorView findByName: 'structureField') getList = aRichTextTemplate initialStructureIdentifiers \ No newline at end of file + ^ (self structureEditorView findByName: 'structureField') getList = + aRichTextTemplate initialStructureIdentifiers \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/exampleTemplate.st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/exampleTemplate.st new file mode 100644 index 0000000..4e17b82 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/exampleTemplate.st @@ -0,0 +1,4 @@ +constants +exampleTemplate + + ^ RichTextMarkdownTemplate \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/fontChooserLabel.st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/fontChooserLabel.st new file mode 100644 index 0000000..2282c29 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/fontChooserLabel.st @@ -0,0 +1,4 @@ +constants +fontChooserLabel + + ^ 'Font' \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/fontStructureName.st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/fontStructureName.st deleted file mode 100644 index 8cdf03c..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/fontStructureName.st +++ /dev/null @@ -1,4 +0,0 @@ -utilities -fontStructureName - - ^ 'fontStructure' \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/fontStructureSymbol.st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/fontStructureSymbol.st index 1cb79c9..432739c 100644 --- a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/fontStructureSymbol.st +++ b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/fontStructureSymbol.st @@ -1,4 +1,4 @@ utilities fontStructureSymbol - ^ self fontStructureName asSymbol \ No newline at end of file + ^ #fontStructure \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/resetColorButton.st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/resetColorButton.st new file mode 100644 index 0000000..cf7ee53 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/resetColorButton.st @@ -0,0 +1,4 @@ +constants +resetColorButton + + ^ self structureEditorView findByLabel: self resetColorLabel \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/resetColorLabel.st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/resetColorLabel.st new file mode 100644 index 0000000..551cff5 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/resetColorLabel.st @@ -0,0 +1,4 @@ +constants +resetColorLabel + + ^ 'Reset color' \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/resetFontButton.st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/resetFontButton.st new file mode 100644 index 0000000..653ce3c --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/resetFontButton.st @@ -0,0 +1,4 @@ +constants +resetFontButton + + ^ self structureEditorView findByLabel: self resetFontLabel \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/resetFontLabel.st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/resetFontLabel.st new file mode 100644 index 0000000..aebeccf --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/resetFontLabel.st @@ -0,0 +1,4 @@ +constants +resetFontLabel + + ^ 'Reset font' \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/setUp.st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/setUp.st index bcf826c..468b664 100644 --- a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/setUp.st +++ b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/setUp.st @@ -1,7 +1,8 @@ -resources +running setUp super setUp. + self exampleTemplate clearCachedDictionaries. self oldStructures: self document textStructureSymbols copy; removeAllTextStructures \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/structureIsNotDisplayed..st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/structureIsNotDisplayed..st deleted file mode 100644 index d40a6b3..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/structureIsNotDisplayed..st +++ /dev/null @@ -1,4 +0,0 @@ -utilities -structureIsNotDisplayed: aSymbol - - ^ (self structureIsDisplayed: aSymbol) not \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/tearDown.st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/tearDown.st index 29ae2b5..58e28b5 100644 --- a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/tearDown.st +++ b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/tearDown.st @@ -1,4 +1,4 @@ -resources +running tearDown self diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/testNewNullTextStructureReturnsNullTextStructure.st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/testNewNullTextStructureReturnsNullTextStructure.st index 60428ac..89df95e 100644 --- a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/testNewNullTextStructureReturnsNullTextStructure.st +++ b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/testNewNullTextStructureReturnsNullTextStructure.st @@ -1,4 +1,5 @@ unit-tests testNewNullTextStructureReturnsNullTextStructure - self assert: self structureEditorView model newNullTextStructure class equals: NullTextStructure \ No newline at end of file + self assert: self structureEditorView model newNullTextStructure class + equals: RichTextNullStructure \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/testNoSelectedStructureDoesntAllowColor.st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/testNoSelectedStructureDoesntAllowColor.st new file mode 100644 index 0000000..6fb23a2 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/testNoSelectedStructureDoesntAllowColor.st @@ -0,0 +1,5 @@ +unit-tests +testNoSelectedStructureDoesntAllowColor + + self should: [(self structureEditorView findByLabel: self colorPickerLabel) click] + raise: ProvideAnswerNotification \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/testNoSelectedStructureDoesntAllowColorReset.st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/testNoSelectedStructureDoesntAllowColorReset.st new file mode 100644 index 0000000..b2d9721 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/testNoSelectedStructureDoesntAllowColorReset.st @@ -0,0 +1,4 @@ +unit-tests +testNoSelectedStructureDoesntAllowColorReset + + self should: [self resetColorButton click] raise: ProvideAnswerNotification \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/testNoSelectedStructureDoesntAllowFont.st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/testNoSelectedStructureDoesntAllowFont.st new file mode 100644 index 0000000..e92a93d --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/testNoSelectedStructureDoesntAllowFont.st @@ -0,0 +1,5 @@ +unit-tests +testNoSelectedStructureDoesntAllowFont + + self should: [(self structureEditorView findByLabel: self fontChooserLabel) click] + raise: ProvideAnswerNotification \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/testNoSelectedStructureDoesntAllowFontReset.st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/testNoSelectedStructureDoesntAllowFontReset.st new file mode 100644 index 0000000..3c4ed55 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/testNoSelectedStructureDoesntAllowFontReset.st @@ -0,0 +1,4 @@ +unit-tests +testNoSelectedStructureDoesntAllowFontReset + + self should: [self resetFontButton click] raise: ProvideAnswerNotification \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/testUS29RemoveNewStructure.st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/testUS29RemoveNewStructure.st index 2d5ac80..a0cec3c 100644 --- a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/testUS29RemoveNewStructure.st +++ b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/testUS29RemoveNewStructure.st @@ -6,4 +6,4 @@ testUS29RemoveNewStructure self editorModel createNewStructure: self newStructureName asSymbol. self enterStructureNameInRemoveDialog: [removeStructureButton click]. - self assert: (self structureIsNotDisplayed: self newStructureName asSymbol) \ No newline at end of file + self deny: (self structureIsDisplayed: self newStructureName asSymbol) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/testUS37TemplateCanBeSelected.st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/testUS37TemplateCanBeSelected.st index 5ef3f15..692cab6 100644 --- a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/testUS37TemplateCanBeSelected.st +++ b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/testUS37TemplateCanBeSelected.st @@ -1,6 +1,6 @@ -tests +acceptance-tests testUS37TemplateCanBeSelected - - self structureEditor currentTemplateSymbol: (self newTemplate identifier). + + self structureEditor currentTemplateSymbol: (self exampleTemplate identifier). self acceptCurrentTemplate. - self assert: [self displayedStructuresEqualInitialStructuresOf: self newTemplate] \ No newline at end of file + self assert: (self displayedStructuresEqualInitialStructuresOf: self exampleTemplate) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/testUS37TemplateChangeButtonExists.st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/testUS37TemplateChangeButtonExists.st index ba827b4..46b1746 100644 --- a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/testUS37TemplateChangeButtonExists.st +++ b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/testUS37TemplateChangeButtonExists.st @@ -1,4 +1,4 @@ -tests +acceptance-tests testUS37TemplateChangeButtonExists self assert: (self buttonWithLabelExists: 'Accept Template') \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/testUS41ColorCanBeReset.st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/testUS41ColorCanBeReset.st index 3a21005..5a0ca00 100644 --- a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/testUS41ColorCanBeReset.st +++ b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/testUS41ColorCanBeReset.st @@ -1,13 +1,11 @@ acceptance-tests testUS41ColorCanBeReset - | resetColorButton | self - enterStringOntoTextField: 'test'; + enterExampleStringOntoTextField; addColoredStructureToText; setGreenColor; deny: (self textHasColor: self structureEditor defaultColor). - resetColorButton := self structureEditorView findByLabel: 'Reset color'. - resetColorButton click. + self resetColorButton click. self assert: self textHasNoColor \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/testUS41ColorIsAssignedToStructure.st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/testUS41ColorIsAssignedToStructure.st index e78d60d..82c35a0 100644 --- a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/testUS41ColorIsAssignedToStructure.st +++ b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/testUS41ColorIsAssignedToStructure.st @@ -2,7 +2,7 @@ acceptance-tests testUS41ColorIsAssignedToStructure self - enterStringOntoTextField: 'test'; + enterExampleStringOntoTextField; deny: (self textHasColor: Color green); addColoredStructureToText; setGreenColor; diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/testUS42FontCanBeReset.st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/testUS42FontCanBeReset.st index 561a86f..c3513ee 100644 --- a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/testUS42FontCanBeReset.st +++ b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/testUS42FontCanBeReset.st @@ -1,13 +1,11 @@ acceptance-tests testUS42FontCanBeReset - | resetFontButton | self - enterStringOntoTextField: 'test'; + enterExampleStringOntoTextField; addFontStructureToText; setFont: self fontAtlanta22; deny: (self textHasFont: self structureEditor defaultFont). - resetFontButton := self structureEditorView findByLabel: 'Reset font'. - resetFontButton click. + self resetFontButton click. self assert: self textHasNoFont \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/testUS42FontIsAppliedToStructure.st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/testUS42FontIsAppliedToStructure.st index 7fe783a..83cd93e 100644 --- a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/testUS42FontIsAppliedToStructure.st +++ b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/testUS42FontIsAppliedToStructure.st @@ -2,7 +2,7 @@ acceptance-tests testUS42FontIsAppliedToStructure self - enterStringOntoTextField: 'test'; + enterExampleStringOntoTextField; deny: (self textHasFontSize: 22); addFontStructureToText; setFont: self fontAtlanta22; diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/testUS42FontSizeCanBeAssigned.st b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/testUS42FontSizeCanBeAssigned.st index 32f69b9..eab228a 100644 --- a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/testUS42FontSizeCanBeAssigned.st +++ b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/instance/testUS42FontSizeCanBeAssigned.st @@ -2,7 +2,7 @@ acceptance-tests testUS42FontSizeCanBeAssigned self - enterStringOntoTextField: 'test'; + enterExampleStringOntoTextField; addFontStructureToText; setFont: self fontAtlanta11; assert: (self textHasFont: self fontAtlanta11); diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/methodProperties.json b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/methodProperties.json index e11ca12..4b6eb0b 100644 --- a/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/methodProperties.json +++ b/packages/RichTextEditing-Tests.package/RichTextStructureEditorTests.class/methodProperties.json @@ -1,41 +1,47 @@ { "class" : { - "lastStoredRun" : "frc 6/12/2020 19:59" }, + }, "instance" : { - "acceptCurrentTemplate" : "JEH 7/9/2020 15:05", - "addColoredStructureToText" : "kh 6/21/2020 10:04", - "addFontStructureToText" : "kh 6/21/2020 10:04", - "allStructuresAreDisplayed" : "AG 7/25/2019 13:24", - "coloredStructureName" : "AG 6/21/2019 14:02", - "coloredStructureSymbol" : "lh 6/26/2019 19:08", - "displayedStructuresEqualInitialStructuresOf:" : "JEH 7/9/2020 15:12", - "document" : "ls 7/24/2019 17:32", + "acceptCurrentTemplate" : "frc 8/1/2020 12:44", + "addColoredStructureToText" : "frc 8/7/2020 14:11", + "addFontStructureToText" : "frc 8/7/2020 14:11", + "allStructuresAreDisplayed" : "tok 8/7/2020 17:20", + "colorPickerLabel" : "frc 7/30/2020 11:51", + "coloredStructureSymbol" : "tok 8/7/2020 17:20", + "displayedStructuresEqualInitialStructuresOf:" : "tok 8/7/2020 20:15", "enterStructureNameInRemoveDialog:" : "ls 7/24/2019 17:32", + "exampleTemplate" : "tok 8/7/2020 17:22", "fontAtlanta11" : "lh 6/26/2019 21:20", "fontAtlanta22" : "lh 6/26/2019 19:18", - "fontStructureName" : "lh 6/26/2019 19:10", - "fontStructureSymbol" : "lh 6/26/2019 19:09", + "fontChooserLabel" : "frc 7/30/2020 11:51", + "fontStructureSymbol" : "tok 8/7/2020 17:22", "newStructureName" : "AG 6/18/2019 16:02", - "newTemplate" : "JEH 7/9/2020 15:06", "nullTextStructure" : "frc 6/13/2020 11:12", "oldStructures" : "ls 5/31/2019 15:08", "oldStructures:" : "ls 5/31/2019 15:06", "removeAllTextStructures" : "ls 7/24/2019 17:32", + "resetColorButton" : "frc 8/1/2020 10:50", + "resetColorLabel" : "frc 7/30/2020 11:52", + "resetFontButton" : "frc 8/1/2020 10:48", + "resetFontLabel" : "frc 7/30/2020 11:52", "restoreTextStructures" : "ls 7/24/2019 17:32", "setFont:" : "kh 6/21/2020 15:45", "setGreenColor" : "kh 6/21/2020 15:41", - "setUp" : "ls 7/24/2019 17:32", + "setUp" : "tok 8/7/2020 17:22", "structureIsDisplayed:" : "ls 6/18/2019 16:27", - "structureIsNotDisplayed:" : "AG 6/18/2019 16:00", "tearDown" : "ls 6/12/2019 18:04", - "testNewNullTextStructureReturnsNullTextStructure" : "tok 6/13/2020 11:00", + "testNewNullTextStructureReturnsNullTextStructure" : "tok 8/7/2020 20:17", + "testNoSelectedStructureDoesntAllowColor" : "tok 8/7/2020 20:17", + "testNoSelectedStructureDoesntAllowColorReset" : "frc 8/1/2020 10:50", + "testNoSelectedStructureDoesntAllowFont" : "tok 8/7/2020 20:18", + "testNoSelectedStructureDoesntAllowFontReset" : "frc 8/1/2020 10:50", "testUS29AddNewStructure" : "tok 7/9/2020 21:57", "testUS29DisplayAllStructures" : "ls 6/18/2019 16:22", - "testUS29RemoveNewStructure" : "ls 6/18/2019 16:22", - "testUS37TemplateCanBeSelected" : "JEH 7/10/2020 14:57", + "testUS29RemoveNewStructure" : "tok 8/7/2020 17:23", + "testUS37TemplateCanBeSelected" : "tok 8/7/2020 17:22", "testUS37TemplateChangeButtonExists" : "JEH 7/10/2020 14:57", - "testUS41ColorCanBeReset" : "kh 6/19/2020 11:24", - "testUS41ColorIsAssignedToStructure" : "AG 6/21/2019 13:59", - "testUS42FontCanBeReset" : "kh 6/19/2020 18:10", - "testUS42FontIsAppliedToStructure" : "kh 6/19/2020 18:10", - "testUS42FontSizeCanBeAssigned" : "kh 6/19/2020 18:10" } } + "testUS41ColorCanBeReset" : "tok 8/7/2020 17:33", + "testUS41ColorIsAssignedToStructure" : "tok 8/7/2020 17:37", + "testUS42FontCanBeReset" : "tok 8/7/2020 17:33", + "testUS42FontIsAppliedToStructure" : "tok 8/7/2020 17:33", + "testUS42FontSizeCanBeAssigned" : "tok 8/7/2020 17:33" } } diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureTemplateTests.class/instance/markdownLikeStructure.st b/packages/RichTextEditing-Tests.package/RichTextStructureTemplateTests.class/instance/markdownLikeStructure.st new file mode 100644 index 0000000..19fd6bb --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextStructureTemplateTests.class/instance/markdownLikeStructure.st @@ -0,0 +1,4 @@ +utilities +markdownLikeStructure +"Markdown template contains a structure named heading4" + ^ RichTextStructure new: #heading4 \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureTemplateTests.class/instance/markdownTemplateContainsStructureWithName..st b/packages/RichTextEditing-Tests.package/RichTextStructureTemplateTests.class/instance/markdownTemplateContainsStructureWithName..st index 6f13679..778533d 100644 --- a/packages/RichTextEditing-Tests.package/RichTextStructureTemplateTests.class/instance/markdownTemplateContainsStructureWithName..st +++ b/packages/RichTextEditing-Tests.package/RichTextStructureTemplateTests.class/instance/markdownTemplateContainsStructureWithName..st @@ -1,5 +1,6 @@ utilities markdownTemplateContainsStructureWithName: aStructureName - ^ RichTextMarkdownTemplate class canUnderstand: (self expectedMethodSymbolForStructure: aStructureName) + ^ RichTextMarkdownTemplate class canUnderstand: + (self expectedMethodSymbolForStructure: aStructureName) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureTemplateTests.class/instance/testUS37MarkdownTemplateContainsRequiredStructures.st b/packages/RichTextEditing-Tests.package/RichTextStructureTemplateTests.class/instance/testUS37MarkdownTemplateContainsRequiredStructures.st index 4e740d4..bc76f6b 100644 --- a/packages/RichTextEditing-Tests.package/RichTextStructureTemplateTests.class/instance/testUS37MarkdownTemplateContainsRequiredStructures.st +++ b/packages/RichTextEditing-Tests.package/RichTextStructureTemplateTests.class/instance/testUS37MarkdownTemplateContainsRequiredStructures.st @@ -1,5 +1,6 @@ acceptance tests testUS37MarkdownTemplateContainsRequiredStructures - self requiredMarkdownStructures do: [:each | self assert: (self markdownTemplateContainsStructureWithName: each)] + self requiredMarkdownStructures do: [:each | + self assert: (self markdownTemplateContainsStructureWithName: each)] \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureTemplateTests.class/instance/testUS37MarkdownTemplateExists.st b/packages/RichTextEditing-Tests.package/RichTextStructureTemplateTests.class/instance/testUS37MarkdownTemplateExists.st index 2a777eb..65454d9 100644 --- a/packages/RichTextEditing-Tests.package/RichTextStructureTemplateTests.class/instance/testUS37MarkdownTemplateExists.st +++ b/packages/RichTextEditing-Tests.package/RichTextStructureTemplateTests.class/instance/testUS37MarkdownTemplateExists.st @@ -1,4 +1,5 @@ acceptance tests testUS37MarkdownTemplateExists - self assert: (RichTextStructureTemplate availableTemplates contains: [:each | each identifier = #markdown]) \ No newline at end of file + self assert: (RichTextStructureTemplate availableTemplates + anySatisfy: [:each | each identifier = RichTextMarkdownTemplate identifier]) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureTemplateTests.class/instance/testUS88CustomStructureIsConvertedOnTemplate.st b/packages/RichTextEditing-Tests.package/RichTextStructureTemplateTests.class/instance/testUS88CustomStructureIsConvertedOnTemplate.st new file mode 100644 index 0000000..7f490cb --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextStructureTemplateTests.class/instance/testUS88CustomStructureIsConvertedOnTemplate.st @@ -0,0 +1,10 @@ +acceptance tests +testUS88CustomStructureIsConvertedOnTemplate + + self document initializeStructure: (self markdownLikeStructure structureIdentifier). + self assert: (self document textStructureSymbols + includes: (self markdownLikeStructure structureIdentifier)). + + self document setNewTemplate: RichTextMarkdownTemplate. + self assert: (self document textStructureSymbols + includes: (self markdownLikeStructure structureIdentifier)) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureTemplateTests.class/instance/testUS88ExampleStructureIsDeletedOnTemplate.st b/packages/RichTextEditing-Tests.package/RichTextStructureTemplateTests.class/instance/testUS88ExampleStructureIsDeletedOnTemplate.st new file mode 100644 index 0000000..59057a3 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextStructureTemplateTests.class/instance/testUS88ExampleStructureIsDeletedOnTemplate.st @@ -0,0 +1,10 @@ +acceptance tests +testUS88ExampleStructureIsDeletedOnTemplate + + self document initializeStructure: (self exampleTextStructure structureIdentifier). + self assert: (self document textStructureSymbols + includes: (self exampleTextStructure structureIdentifier)). + + self document setNewTemplate: RichTextMarkdownTemplate. + self deny: (self document textStructureSymbols + includes: (self exampleTextStructure structureIdentifier)) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureTemplateTests.class/instance/testUS88TextRemainsStructured.st b/packages/RichTextEditing-Tests.package/RichTextStructureTemplateTests.class/instance/testUS88TextRemainsStructured.st new file mode 100644 index 0000000..50d83a6 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextStructureTemplateTests.class/instance/testUS88TextRemainsStructured.st @@ -0,0 +1,9 @@ +acceptance tests +testUS88TextRemainsStructured + + self enterExampleStringOntoTextField. + self textEditor selectAll. + self selectOptionBold. + self document setNewTemplate: RichTextMarkdownTemplate. + self textEditor selectAll. + self assert: (self editorModel hasStructure: #bold) diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureTemplateTests.class/methodProperties.json b/packages/RichTextEditing-Tests.package/RichTextStructureTemplateTests.class/methodProperties.json index 2d842c3..f31d90d 100644 --- a/packages/RichTextEditing-Tests.package/RichTextStructureTemplateTests.class/methodProperties.json +++ b/packages/RichTextEditing-Tests.package/RichTextStructureTemplateTests.class/methodProperties.json @@ -3,8 +3,12 @@ }, "instance" : { "expectedMethodSymbolForStructure:" : "JEH 7/9/2020 14:25", - "markdownTemplateContainsStructureWithName:" : "JEH 7/9/2020 14:29", + "markdownLikeStructure" : "tok 8/7/2020 17:25", + "markdownTemplateContainsStructureWithName:" : "tok 8/7/2020 20:20", "requiredMarkdownStructures" : "JEH 7/9/2020 14:20", "testUS37AtLeastOneTemplateIsAvailable" : "JEH 7/9/2020 14:13", - "testUS37MarkdownTemplateContainsRequiredStructures" : "JEH 7/10/2020 15:00", - "testUS37MarkdownTemplateExists" : "JEH 7/10/2020 15:00" } } + "testUS37MarkdownTemplateContainsRequiredStructures" : "tok 8/7/2020 17:27", + "testUS37MarkdownTemplateExists" : "tok 8/7/2020 20:21", + "testUS88CustomStructureIsConvertedOnTemplate" : "tok 8/7/2020 17:28", + "testUS88ExampleStructureIsDeletedOnTemplate" : "tok 8/7/2020 17:29", + "testUS88TextRemainsStructured" : "tok 8/7/2020 17:30" } } diff --git a/packages/RichTextEditing-Core.package/DocumentReadStream.class/README.md b/packages/RichTextEditing-Tests.package/RichTextStructureTests.class/README.md similarity index 100% rename from packages/RichTextEditing-Core.package/DocumentReadStream.class/README.md rename to packages/RichTextEditing-Tests.package/RichTextStructureTests.class/README.md diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureTests.class/instance/linkTextStructure.st b/packages/RichTextEditing-Tests.package/RichTextStructureTests.class/instance/linkTextStructure.st new file mode 100644 index 0000000..9e0751b --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextStructureTests.class/instance/linkTextStructure.st @@ -0,0 +1,4 @@ +constants +linkTextStructure + + ^ RichTextStructure hyperlinkTo: 'https://github.com/hpi-swa-teaching/RichTextEditing' \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureTests.class/instance/listTextStructure.st b/packages/RichTextEditing-Tests.package/RichTextStructureTests.class/instance/listTextStructure.st new file mode 100644 index 0000000..a5a5ff8 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextStructureTests.class/instance/listTextStructure.st @@ -0,0 +1,4 @@ +constants +listTextStructure + + ^ RichTextStructure listOnLevel: 1 \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureTests.class/instance/nullTextStructure.st b/packages/RichTextEditing-Tests.package/RichTextStructureTests.class/instance/nullTextStructure.st new file mode 100644 index 0000000..35b19f4 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextStructureTests.class/instance/nullTextStructure.st @@ -0,0 +1,4 @@ +constants +nullTextStructure + + ^ RichTextNullStructure new \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureTests.class/instance/testAddMultipleTextStructures.st b/packages/RichTextEditing-Tests.package/RichTextStructureTests.class/instance/testAddMultipleTextStructures.st new file mode 100644 index 0000000..d9094c7 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextStructureTests.class/instance/testAddMultipleTextStructures.st @@ -0,0 +1,9 @@ +unit-tests +testAddMultipleTextStructures + + | structure | + structure := RichTextStructure new: #testingStructure. + self deny: (structure includes: (RichTextStructure bold)). + structure addAll: {RichTextStructure bold . RichTextStructure italic}. + self assert: (structure includes: (RichTextStructure bold)). + self assert: (structure includes: (RichTextStructure italic)) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextTextStructureTests.class/instance/testExampleStructureIsNotKern.st b/packages/RichTextEditing-Tests.package/RichTextStructureTests.class/instance/testExampleStructureIsNotKern.st similarity index 100% rename from packages/RichTextEditing-Tests.package/RichTextTextStructureTests.class/instance/testExampleStructureIsNotKern.st rename to packages/RichTextEditing-Tests.package/RichTextStructureTests.class/instance/testExampleStructureIsNotKern.st diff --git a/packages/RichTextEditing-Tests.package/RichTextTextStructureTests.class/instance/testLinkTextStructureCanNotDeriveFromPrettyPrint.st b/packages/RichTextEditing-Tests.package/RichTextStructureTests.class/instance/testLinkTextStructureCanNotDeriveFromPrettyPrint.st similarity index 100% rename from packages/RichTextEditing-Tests.package/RichTextTextStructureTests.class/instance/testLinkTextStructureCanNotDeriveFromPrettyPrint.st rename to packages/RichTextEditing-Tests.package/RichTextStructureTests.class/instance/testLinkTextStructureCanNotDeriveFromPrettyPrint.st diff --git a/packages/RichTextEditing-Tests.package/RichTextTextStructureTests.class/instance/testLinkTextStructureMayActOnClick.st b/packages/RichTextEditing-Tests.package/RichTextStructureTests.class/instance/testLinkTextStructureMayActOnClick.st similarity index 100% rename from packages/RichTextEditing-Tests.package/RichTextTextStructureTests.class/instance/testLinkTextStructureMayActOnClick.st rename to packages/RichTextEditing-Tests.package/RichTextStructureTests.class/instance/testLinkTextStructureMayActOnClick.st diff --git a/packages/RichTextEditing-Tests.package/RichTextTextStructureTests.class/instance/testListTextStructureIsNotAlignment.st b/packages/RichTextEditing-Tests.package/RichTextStructureTests.class/instance/testListTextStructureIsNotAlignment.st similarity index 100% rename from packages/RichTextEditing-Tests.package/RichTextTextStructureTests.class/instance/testListTextStructureIsNotAlignment.st rename to packages/RichTextEditing-Tests.package/RichTextStructureTests.class/instance/testListTextStructureIsNotAlignment.st diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureTests.class/instance/testNullTextStructureCantAddAttributes.st b/packages/RichTextEditing-Tests.package/RichTextStructureTests.class/instance/testNullTextStructureCantAddAttributes.st new file mode 100644 index 0000000..3a2e684 --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextStructureTests.class/instance/testNullTextStructureCantAddAttributes.st @@ -0,0 +1,9 @@ +unit-tests +testNullTextStructureCantAddAttributes + + | textStructure | + textStructure := self nullTextStructure + add: self exampleTextStructure; + yourself. + + self deny: (textStructure includes: (self exampleTextStructure)) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextTextStructureTests.class/instance/testNullTextStructureCantRemoveAttributes.st b/packages/RichTextEditing-Tests.package/RichTextStructureTests.class/instance/testNullTextStructureCantRemoveAttributes.st similarity index 100% rename from packages/RichTextEditing-Tests.package/RichTextTextStructureTests.class/instance/testNullTextStructureCantRemoveAttributes.st rename to packages/RichTextEditing-Tests.package/RichTextStructureTests.class/instance/testNullTextStructureCantRemoveAttributes.st diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureTests.class/instance/testNullTextStructurestructureIdentifierCanNotBeChanged.st b/packages/RichTextEditing-Tests.package/RichTextStructureTests.class/instance/testNullTextStructurestructureIdentifierCanNotBeChanged.st new file mode 100644 index 0000000..bcec9dd --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextStructureTests.class/instance/testNullTextStructurestructureIdentifierCanNotBeChanged.st @@ -0,0 +1,5 @@ +unit-tests +testNullTextStructurestructureIdentifierCanNotBeChanged + + self assert: (self nullTextStructure structureIdentifier: #test) structureIdentifier + equals: #null \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureTests.class/instance/testNullTextStructurestructureIdentifierIsNull.st b/packages/RichTextEditing-Tests.package/RichTextStructureTests.class/instance/testNullTextStructurestructureIdentifierIsNull.st new file mode 100644 index 0000000..8c49ebe --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextStructureTests.class/instance/testNullTextStructurestructureIdentifierIsNull.st @@ -0,0 +1,4 @@ +unit-tests +testNullTextStructurestructureIdentifierIsNull + + self assert: self nullTextStructure structureIdentifier equals: #null \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextTextStructureTests.class/instance/testSerializeExampleStructure.st b/packages/RichTextEditing-Tests.package/RichTextStructureTests.class/instance/testSerializeExampleStructure.st similarity index 100% rename from packages/RichTextEditing-Tests.package/RichTextTextStructureTests.class/instance/testSerializeExampleStructure.st rename to packages/RichTextEditing-Tests.package/RichTextStructureTests.class/instance/testSerializeExampleStructure.st diff --git a/packages/RichTextEditing-Tests.package/RichTextStructureTests.class/methodProperties.json b/packages/RichTextEditing-Tests.package/RichTextStructureTests.class/methodProperties.json new file mode 100644 index 0000000..ede750b --- /dev/null +++ b/packages/RichTextEditing-Tests.package/RichTextStructureTests.class/methodProperties.json @@ -0,0 +1,17 @@ +{ + "class" : { + }, + "instance" : { + "linkTextStructure" : "tok 8/7/2020 15:53", + "listTextStructure" : "tok 8/7/2020 15:53", + "nullTextStructure" : "tok 8/7/2020 15:53", + "testAddMultipleTextStructures" : "tok 8/7/2020 15:53", + "testExampleStructureIsNotKern" : "frc 7/3/2020 18:50", + "testLinkTextStructureCanNotDeriveFromPrettyPrint" : "frc 7/3/2020 19:12", + "testLinkTextStructureMayActOnClick" : "frc 7/3/2020 19:05", + "testListTextStructureIsNotAlignment" : "frc 7/3/2020 20:36", + "testNullTextStructureCantAddAttributes" : "frc 7/30/2020 12:33", + "testNullTextStructureCantRemoveAttributes" : "kh 6/21/2020 11:19", + "testNullTextStructurestructureIdentifierCanNotBeChanged" : "tok 8/7/2020 20:25", + "testNullTextStructurestructureIdentifierIsNull" : "tok 8/7/2020 20:25", + "testSerializeExampleStructure" : "frc 7/3/2020 20:45" } } diff --git a/packages/RichTextEditing-Tests.package/RichTextTextStructureTests.class/properties.json b/packages/RichTextEditing-Tests.package/RichTextStructureTests.class/properties.json similarity index 84% rename from packages/RichTextEditing-Tests.package/RichTextTextStructureTests.class/properties.json rename to packages/RichTextEditing-Tests.package/RichTextStructureTests.class/properties.json index 3a05a90..cf45457 100644 --- a/packages/RichTextEditing-Tests.package/RichTextTextStructureTests.class/properties.json +++ b/packages/RichTextEditing-Tests.package/RichTextStructureTests.class/properties.json @@ -7,7 +7,7 @@ "commentStamp" : "", "instvars" : [ ], - "name" : "RichTextTextStructureTests", + "name" : "RichTextStructureTests", "pools" : [ ], "super" : "RichTextEditorTestCase", diff --git a/packages/RichTextEditing-Tests.package/RichTextTextStructureTests.class/README.md b/packages/RichTextEditing-Tests.package/RichTextTextStructureTests.class/README.md deleted file mode 100644 index e69de29..0000000 diff --git a/packages/RichTextEditing-Tests.package/RichTextTextStructureTests.class/instance/exampleTextStructure.st b/packages/RichTextEditing-Tests.package/RichTextTextStructureTests.class/instance/exampleTextStructure.st deleted file mode 100644 index 3d977a3..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextTextStructureTests.class/instance/exampleTextStructure.st +++ /dev/null @@ -1,4 +0,0 @@ -utilities -exampleTextStructure - - ^ TextStructure new: #example from: {TextStructure italic . TextStructure bold} \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextTextStructureTests.class/instance/linkTextStructure.st b/packages/RichTextEditing-Tests.package/RichTextTextStructureTests.class/instance/linkTextStructure.st deleted file mode 100644 index 1bb5727..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextTextStructureTests.class/instance/linkTextStructure.st +++ /dev/null @@ -1,4 +0,0 @@ -utilities -linkTextStructure - - ^ TextStructure hyperlinkTo: 'https://github.com/hpi-swa-teaching/RichTextEditing' \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextTextStructureTests.class/instance/listTextStructure.st b/packages/RichTextEditing-Tests.package/RichTextTextStructureTests.class/instance/listTextStructure.st deleted file mode 100644 index 3d6681c..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextTextStructureTests.class/instance/listTextStructure.st +++ /dev/null @@ -1,4 +0,0 @@ -utilities -listTextStructure - - ^ TextStructure listOnLevel: 1 \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextTextStructureTests.class/instance/nullTextStructure.st b/packages/RichTextEditing-Tests.package/RichTextTextStructureTests.class/instance/nullTextStructure.st deleted file mode 100644 index 20a2de6..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextTextStructureTests.class/instance/nullTextStructure.st +++ /dev/null @@ -1,4 +0,0 @@ -utilities -nullTextStructure - - ^ NullTextStructure new \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextTextStructureTests.class/instance/testAddMultipleTextStructures.st b/packages/RichTextEditing-Tests.package/RichTextTextStructureTests.class/instance/testAddMultipleTextStructures.st deleted file mode 100644 index a38c0e3..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextTextStructureTests.class/instance/testAddMultipleTextStructures.st +++ /dev/null @@ -1,9 +0,0 @@ -unit-tests -testAddMultipleTextStructures - - | structure | - structure := TextStructure new: #testingStructure. - self deny: (structure includes: (TextStructure bold)). - structure addAll: {TextStructure bold . TextStructure italic}. - self assert: (structure includes: (TextStructure bold)). - self assert: (structure includes: (TextStructure italic)) \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextTextStructureTests.class/instance/testNullTextStructureCantAddAttributes.st b/packages/RichTextEditing-Tests.package/RichTextTextStructureTests.class/instance/testNullTextStructureCantAddAttributes.st deleted file mode 100644 index 98a3829..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextTextStructureTests.class/instance/testNullTextStructureCantAddAttributes.st +++ /dev/null @@ -1,7 +0,0 @@ -unit-tests -testNullTextStructureCantAddAttributes - - | textStructure | - textStructure := self nullTextStructure add: self exampleTextStructure. - - self assert: textStructure attributes size = 0 \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextTextStructureTests.class/instance/testNullTextStructurestructureIdentifierCanNotBeChanged.st b/packages/RichTextEditing-Tests.package/RichTextTextStructureTests.class/instance/testNullTextStructurestructureIdentifierCanNotBeChanged.st deleted file mode 100644 index a45e0c1..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextTextStructureTests.class/instance/testNullTextStructurestructureIdentifierCanNotBeChanged.st +++ /dev/null @@ -1,7 +0,0 @@ -unit-tests -testNullTextStructurestructureIdentifierCanNotBeChanged - - | textStructure | - textStructure := self nullTextStructure structureIdentifier: #test. - - self assert: textStructure structureIdentifier equals: #null \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextTextStructureTests.class/instance/testNullTextStructurestructureIdentifierIsNull.st b/packages/RichTextEditing-Tests.package/RichTextTextStructureTests.class/instance/testNullTextStructurestructureIdentifierIsNull.st deleted file mode 100644 index 40e4369..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextTextStructureTests.class/instance/testNullTextStructurestructureIdentifierIsNull.st +++ /dev/null @@ -1,7 +0,0 @@ -unit-tests -testNullTextStructurestructureIdentifierIsNull - - | textStructure | - textStructure := self nullTextStructure. - - self assert: textStructure structureIdentifier equals: #null \ No newline at end of file diff --git a/packages/RichTextEditing-Tests.package/RichTextTextStructureTests.class/methodProperties.json b/packages/RichTextEditing-Tests.package/RichTextTextStructureTests.class/methodProperties.json deleted file mode 100644 index 6935bfb..0000000 --- a/packages/RichTextEditing-Tests.package/RichTextTextStructureTests.class/methodProperties.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "class" : { - }, - "instance" : { - "exampleTextStructure" : "frc 7/3/2020 19:00", - "linkTextStructure" : "frc 7/3/2020 19:04", - "listTextStructure" : "frc 7/3/2020 18:56", - "nullTextStructure" : "tok 6/12/2020 13:12", - "testAddMultipleTextStructures" : "frc 7/3/2020 20:35", - "testExampleStructureIsNotKern" : "frc 7/3/2020 18:50", - "testLinkTextStructureCanNotDeriveFromPrettyPrint" : "frc 7/3/2020 19:12", - "testLinkTextStructureMayActOnClick" : "frc 7/3/2020 19:05", - "testListTextStructureIsNotAlignment" : "frc 7/3/2020 20:36", - "testNullTextStructureCantAddAttributes" : "kh 6/21/2020 11:16", - "testNullTextStructureCantRemoveAttributes" : "kh 6/21/2020 11:19", - "testNullTextStructurestructureIdentifierCanNotBeChanged" : "kh 6/19/2020 17:43", - "testNullTextStructurestructureIdentifierIsNull" : "tok 6/13/2020 11:01", - "testSerializeExampleStructure" : "frc 7/3/2020 20:45" } }