Skip to content

Commit

Permalink
Merge 5880590 into c045276
Browse files Browse the repository at this point in the history
  • Loading branch information
odanivan committed Jul 3, 2018
2 parents c045276 + 5880590 commit c0ab01d
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 32 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
as yet unclassified
highlightSpellingMistakes: aCollection in: aText

aCollection keysAndValuesDo: [ :aKey :aValue | aText
addAttribute: (TextEmphasis bold) from: aKey to: aValue ]

addAttribute: TextEmphasis underlined from: aKey to: aValue;
addAttribute: (TextColor color: Color orange) from: aKey to: aValue ]
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"class" : {
},
"instance" : {
"highlightSpellingMistakes:in:" : "II 6/12/2018 13:30:43",
"highlightSpellingMistakes:in:" : "II 7/2/2018 22:52",
"initialize" : "II 6/9/2018 16:09:03",
"privateStyle:" : "II 6/9/2018 16:11:59",
"spellChecker" : "ow 6/14/2018 17:31:08" } }
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
toolbuilder
buildWith: builder

| windowSpec wrongWordSpec alternativesListSpec ignoreButtonSpec ignoreAllButtonSpec addButtonSpec leftButtonSpec rightButtonSpec |
| windowSpec wrongWordSpec alternativesListSpec ignoreButtonSpec ignoreAllButtonSpec addButtonSpec leftButtonSpec rightButtonSpec |

windowSpec := builder pluggableWindowSpec new.
windowSpec
model: self;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
as yet unclassified
displayCurrentWrongWord


keyArray ifEmpty: [self clear. ^self].
self wrongWordText: (parser getSentenceContextOfWordAt: self startIndex within: inputText string).

self wrongWordText: (parser getSentenceContextOfWordAt: self startIndex within: inputText string).
self wrongWordText: (self wrongWordText asText addAttribute: TextEmphasis bold from: self startIndex to: self endIndex)
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
"addToDict" : "ow 6/21/2018 00:21:46",
"alternatives" : "ow 6/1/2018 11:22:08",
"alternatives:" : "ow 6/1/2018 13:42:46",
"buildWith:" : "RS 6/27/2018 15:28:55",
"buildWith:" : "II 7/2/2018 22:49",
"clear" : "ow 6/21/2018 00:23:04",
"currentWord" : "RS 6/27/2018 15:32:42",
"dismissCurrentDisplayedWord" : "ow 6/15/2018 12:23:52",
"displayCurrentWrongWord" : "RS 6/27/2018 15:35:12",
"displayCurrentWrongWord" : "II 7/2/2018 22:51",
"displayNextWord" : "ow 6/28/2018 17:10",
"displayPreviousWord" : "ow 6/28/2018 17:10",
"endIndex" : "RS 6/27/2018 14:48:15",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"instance" : {
"highlightSpellingMistakes:in:" : "loading 5/18/2018 10:43:21",
"initialize" : "yk 5/30/2018 17:13:15",
"privateStyle:" : "ow 6/11/2018 01:07:56",
"privateStyle:" : "II 7/2/2018 23:07",
"spellChecker" : "ow 5/28/2018 23:06:26",
"unstyle:" : "ow 6/11/2018 00:38:48",
"workspace" : "ow 6/8/2018 17:07:53" } }
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
*Spellcheck-Core
openSpellcheckerUI
| spellchecker |
spellchecker := SpellcheckCorrectionUI new.
spellchecker open.
spellchecker input: self.
| correctionUI |
correctionUI := SpellcheckCorrectionUI new.
correctionUI open.
correctionUI input: self.
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
"aboutToStyle:" : "ow 6/8/2018 13:43:54",
"addModelItemsToWindowMenu:" : "6/17/2018 22:28:06",
"addOriginalModelItemsToWindowMenu:" : "6/17/2018 22:28:06",
"openSpellcheckerUI" : "6/17/2018 22:28:06" } }
"openSpellcheckerUI" : "II 7/2/2018 22:26" } }
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
as yet unclassified
testPrivateStyle

| text runs |
| text runArray |

text := 'There is a miscake in the text' asText.
spellingStyler privateStyle: text.
runs := text runs.
runArray := text runs.

self assert: ((runs at: 12) includes: TextEmphasis underlined).
self assert: ((runs at: 12) includes: (TextColor color: Color orange)).

runs := nil.
self assert: ((runArray at: 12) includes: TextEmphasis underlined).
self assert: ((runArray at: 12) includes: (TextColor color: Color orange)).

correctionStyler privateStyle: text.
runs := text runs.
runArray := text runs.

self assert: ((runs at: 12) includes: (TextEmphasis bold)).
self deny: ((runs at: 1) includes: (TextEmphasis bold))
self assert: ((runArray at: 12) includes: TextEmphasis underlined).
self assert: ((runArray at: 12) includes: (TextColor color: Color orange)).
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
as yet unclassified
testUnstyle

| text runs |
| text runArray |

text := 'There is a miscake in the text' asText.

spellingStyler privateStyle: text.
runs := text runs.
runArray := text runs.
self assert: ((runArray at: 12) includes: (TextColor color: Color orange)).

self assert: ((runs at: 12) includes: (TextColor color: Color orange)).
spellingStyler unstyle: text.
runs := text runs.

self deny: ((runs at: 12) includes: (TextColor color: Color orange))
runArray := text runs.
self deny: ((runArray at: 12) includes: (TextColor color: Color orange))
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
},
"instance" : {
"setUp" : "6/17/2018 22:28:04",
"testPrivateStyle" : "6/17/2018 22:28:04",
"testUnstyle" : "ow 6/21/2018 00:46:27" } }
"testPrivateStyle" : "II 7/3/2018 11:49",
"testUnstyle" : "II 7/3/2018 11:50" } }

0 comments on commit c0ab01d

Please sign in to comment.