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
+
+ ^ '