-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
188 changed files
with
971 additions
and
258 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: CI | ||
|
||
# Controls when the action will run. Triggers the workflow on push or pull request | ||
# events but only for the master branch | ||
on: | ||
push | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build": | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [macos-latest, ubuntu-18.04] | ||
smalltalk: [ Squeak64-trunk ] | ||
name: ${{ matrix.smalltalk }} on ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: hpi-swa/setup-smalltalkCI@v1 | ||
with: | ||
smalltalk-version: ${{ matrix.smalltalk }} | ||
- run: smalltalkci -s ${{ matrix.smalltalk }} | ||
timeout-minutes: 15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,5 +6,5 @@ os: | |
- osx | ||
|
||
smalltalk: | ||
- Squeak-5.2 | ||
- Squeak-5.1 | ||
- Squeak64-trunk | ||
- Squeak64-5.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
packages/RichTextEditing-Core.package/NullTextStructure.class/class/warningText.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
as yet unclassified | ||
warningText | ||
|
||
^ 'Please select a structure' |
2 changes: 1 addition & 1 deletion
2
...ichTextEditing-Core.package/NullTextStructure.class/instance/noCurrentStructureWarning.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
warning | ||
noCurrentStructureWarning | ||
|
||
UIManager default inform: 'Please select a structure' | ||
UIManager default inform: self class warningText |
4 changes: 2 additions & 2 deletions
4
packages/RichTextEditing-Core.package/NullTextStructure.class/methodProperties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/RichTextEditing-Core.package/RichTextDocument.class/class/defaultStyles.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
constants | ||
defaultStyles | ||
|
||
^ {#extendable} asSet | ||
^ {TextStructure extendableStyle} asSet |
6 changes: 6 additions & 0 deletions
6
packages/RichTextEditing-Core.package/RichTextDocument.class/class/initialBoldStructure.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
constants | ||
initialBoldStructure | ||
|
||
^ TextStructure | ||
newWith: #bold | ||
withStyles: (self defaultStyles union: {TextStructure boldStyle}) |
7 changes: 7 additions & 0 deletions
7
...ges/RichTextEditing-Core.package/RichTextDocument.class/class/initialFootnoteStructure.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
constants | ||
initialFootnoteStructure | ||
|
||
^ (TextStructure | ||
newWith: #footnote | ||
withStyles: self defaultStyles) | ||
font: (StrikeFont createDejaVuDark: 9) |
7 changes: 7 additions & 0 deletions
7
...ges/RichTextEditing-Core.package/RichTextDocument.class/class/initialHeading1Structure.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
constants | ||
initialHeading1Structure | ||
|
||
^ (TextStructure | ||
newWith: #heading1 | ||
withStyles: (self defaultStyles union: {TextStructure boldStyle})) | ||
font: (StrikeFont createDejaVuDark: 20) |
7 changes: 7 additions & 0 deletions
7
...ges/RichTextEditing-Core.package/RichTextDocument.class/class/initialHeading2Structure.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
constants | ||
initialHeading2Structure | ||
|
||
^ (TextStructure | ||
newWith: #heading2 | ||
withStyles: (self defaultStyles union: {TextStructure boldStyle})) | ||
font: (StrikeFont createDejaVuDark: 17) |
7 changes: 7 additions & 0 deletions
7
...ges/RichTextEditing-Core.package/RichTextDocument.class/class/initialHeading3Structure.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
constants | ||
initialHeading3Structure | ||
|
||
^ (TextStructure | ||
newWith: #heading3 | ||
withStyles: (self defaultStyles union: {TextStructure boldStyle})) | ||
font: (StrikeFont createDejaVuDark: 14) |
6 changes: 6 additions & 0 deletions
6
packages/RichTextEditing-Core.package/RichTextDocument.class/class/initialItalicStructure.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
constants | ||
initialItalicStructure | ||
|
||
^ TextStructure | ||
newWith: #italic | ||
withStyles: (self defaultStyles union: {TextStructure italicStyle}) |
6 changes: 6 additions & 0 deletions
6
packages/RichTextEditing-Core.package/RichTextDocument.class/class/initialListStructure.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
constants | ||
initialListStructure | ||
|
||
^ TextStructure | ||
newWith: #list | ||
withStyles: (self defaultStyles union: {TextStructure indentedStyle}) |
15 changes: 8 additions & 7 deletions
15
packages/RichTextEditing-Core.package/RichTextDocument.class/class/initialTextStructures.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
constants | ||
initialTextStructures | ||
|
||
^ {TextStructure newWith: #bold withEmphasis: (self defaultStyles union: {#bold}). | ||
TextStructure newWith: #italic withEmphasis: (self defaultStyles union: {#italic}). | ||
TextStructure newWith: #underlined withEmphasis: (self defaultStyles union: {#underlined}). | ||
TextStructure newWith: #footnote withEmphasis: self defaultStyles. | ||
TextStructure newWith: #heading1 withEmphasis: self defaultStyles. | ||
TextStructure newWith: #heading2 withEmphasis: self defaultStyles. | ||
TextStructure newWith: #heading3 withEmphasis: self defaultStyles} asOrderedCollection | ||
^ {self initialBoldStructure. | ||
self initialItalicStructure. | ||
self initialUnderlinedStructure. | ||
self initialFootnoteStructure. | ||
self initialHeading1Structure. | ||
self initialHeading2Structure. | ||
self initialHeading3Structure. | ||
self initialListStructure} asOrderedCollection |
6 changes: 6 additions & 0 deletions
6
...s/RichTextEditing-Core.package/RichTextDocument.class/class/initialUnderlinedStructure.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
constants | ||
initialUnderlinedStructure | ||
|
||
^ TextStructure | ||
newWith: #underlined | ||
withStyles: (self defaultStyles union: {TextStructure underlinedStyle}) |
4 changes: 4 additions & 0 deletions
4
packages/RichTextEditing-Core.package/RichTextDocument.class/instance/charcount.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
count | ||
charcount | ||
|
||
^ self charcountExcept: self emptyChars |
7 changes: 7 additions & 0 deletions
7
packages/RichTextEditing-Core.package/RichTextDocument.class/instance/charcountExcept..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
count | ||
charcountExcept: aListOfBytecodes | ||
|
||
| byteString | | ||
byteString := self text string asByteArray. | ||
|
||
^ byteString count: [:each | (aListOfBytecodes includes: each) not] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
packages/RichTextEditing-Core.package/RichTextDocument.class/instance/emptyChars.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
count | ||
emptyChars | ||
"9: Horizontal tab, 10: Line Feed, 13: Carriage return, 32: Space" | ||
|
||
^ #(9 10 13 32) |
2 changes: 1 addition & 1 deletion
2
...Editing-Core.package/RichTextDocument.class/instance/initializeStructure.withEmphasis..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
text structures | ||
initializeStructure: aSymbol withEmphasis: aSet | ||
|
||
self textStructures add: (TextStructure newWith: aSymbol withEmphasis: aSet) | ||
self textStructures add: (TextStructure newWith: aSymbol withStyles: aSet) |
4 changes: 4 additions & 0 deletions
4
packages/RichTextEditing-Core.package/RichTextDocument.class/instance/isUnsavedDocument.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
isUnsavedDocument | ||
|
||
^ self timeLastSaved = nil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
packages/RichTextEditing-Core.package/RichTextDocument.class/instance/timeLastSaved..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
timeLastSaved: aDateAndTime | ||
|
||
timeLastSaved := aDateAndTime |
4 changes: 4 additions & 0 deletions
4
packages/RichTextEditing-Core.package/RichTextDocument.class/instance/timeLastSaved.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
timeLastSaved | ||
|
||
^ timeLastSaved |
7 changes: 7 additions & 0 deletions
7
packages/RichTextEditing-Core.package/RichTextDocument.class/instance/wordcount.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
count | ||
wordcount | ||
|
||
| prev bool byteString| | ||
byteString := self text string asByteArray. | ||
prev := self emptyChars first. | ||
^ (byteString count: [:each | bool := ((self emptyChars includes: each) not and: (self emptyChars includes: prev)). prev := each. bool ]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 5 additions & 1 deletion
6
...RichTextEditing-Core.package/RichTextEditor.class/class/initializeShiftCmdKeyShortcuts.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
instance creation | ||
initializeShiftCmdKeyShortcuts | ||
|
||
super initializeShiftCmdKeyShortcuts | ||
super initializeShiftCmdKeyShortcuts. | ||
self structureKeymap do: | ||
[:char | shiftCmdActions at: char asciiValue + 1 put: #toggleStructureSelectionAt: ] | ||
|
||
|
4 changes: 4 additions & 0 deletions
4
packages/RichTextEditing-Core.package/RichTextEditor.class/class/structureKeymap.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
instance creation | ||
structureKeymap | ||
"adjust this to your keyboard layout" | ||
^ '!@#$%^&*()' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
packages/RichTextEditing-Core.package/RichTextEditor.class/instance/isSpecialCharacter..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
input events | ||
isSpecialCharacter: aCharacter | ||
|
||
^ aCharacter isSpecial or: [self specialCharacters includes: aCharacter] |
6 changes: 6 additions & 0 deletions
6
packages/RichTextEditing-Core.package/RichTextEditor.class/instance/isStructureShortcut..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
input events | ||
isStructureShortcut: aKeyboardEvent | ||
|
||
^aKeyboardEvent controlKeyPressed and: [ | ||
aKeyboardEvent shiftPressed] and: [ | ||
self class structureKeymap includes: aKeyboardEvent keyCharacter] |
6 changes: 6 additions & 0 deletions
6
packages/RichTextEditing-Core.package/RichTextEditor.class/instance/isValidCharacter..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
input events | ||
isValidCharacter: aCharacter | ||
|
||
^ aCharacter isAlphaNumeric | ||
or: [self isSpecialCharacter: aCharacter] | ||
or: [Character separators includes: aCharacter] |
Oops, something went wrong.