Skip to content

Commit

Permalink
🚀 Final release 2020 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
sirkrypt0 authored Aug 7, 2020
2 parents 5c2fdb2 + 9b67bd1 commit e2c9ebc
Show file tree
Hide file tree
Showing 850 changed files with 3,235 additions and 1,641 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@ jobs:
with:
smalltalk-version: ${{ matrix.smalltalk }}
- run: smalltalkci -s ${{ matrix.smalltalk }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
timeout-minutes: 15
2 changes: 1 addition & 1 deletion .smalltalk.ston
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ SmalltalkCISpec {
#packages : [ 'RichTextEditing-Core' ]
}
}
}
}
14 changes: 14 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -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
1 change: 0 additions & 1 deletion Klassendiagramm_SoSe19.svg

This file was deleted.

7 changes: 7 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -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.
27 changes: 6 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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).
1 change: 1 addition & 0 deletions meta/ClassDiagram2020.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added meta/Presentation2020.pdf
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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" } }

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*RichTextEditing-Core
selectedPointSizeIndex
^ self pointSizeList indexOf: (self pointSize reduce asString padded: #left to: 3 with: $ )

^ self pointSizeList indexOf: (self pointSize reduce asString padded: #left to: 3 with: $ )
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"class" : {
},
"instance" : {
"selectedPointSizeIndex" : "lh 6/26/2019 18:30" } }
"selectedPointSizeIndex" : "frc 7/29/2020 09:11" } }
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
resetting
clearCachedDictionaries

textStructures := nil
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
initial structures
initialBoldStructure

^ TextStructure
^ RichTextStructure
new: #bold
from: {TextStructure bold}
from: {RichTextStructure bold}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
initial structures
initialFootnoteStructure

^ TextStructure
^ RichTextStructure
new: #footnote
from: {TextStructure fromFont: (StrikeFont createDejaVuDark: 9)}
from: {RichTextStructure fromFont: (StrikeFont createDejaVuDark: 9)}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
initial structures
initialHeading1Structure

^ TextStructure
^ RichTextStructure
new: #heading1
from: {TextStructure fromFont: (StrikeFont createDejaVuDark: 20). TextStructure bold}
from: {RichTextStructure fromFont: (StrikeFont createDejaVuDark: 20).
RichTextStructure bold}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
initial structures
initialHeading2Structure

^ TextStructure
^ RichTextStructure
new: #heading2
from: {TextStructure fromFont: (StrikeFont createDejaVuDark: 17). TextStructure bold}
from: {RichTextStructure fromFont: (StrikeFont createDejaVuDark: 17).
RichTextStructure bold}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
initial structures
initialHeading3Structure

^ TextStructure
^ RichTextStructure
new: #heading3
from: {TextStructure fromFont: (StrikeFont createDejaVuDark: 14). TextStructure bold}
from: {RichTextStructure fromFont: (StrikeFont createDejaVuDark: 14).
RichTextStructure bold}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
initial structures
initialItalicStructure

^ TextStructure
^ RichTextStructure
new: #italic
from: {TextStructure italic}
from: {RichTextStructure italic}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
initial structures
initialListStructure

^ TextStructure
^ RichTextStructure
new: #list
from: {TextStructure indented}
from: {RichTextStructure indented}
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
initial structures
initialURLStructure

^ TextStructure
^ RichTextStructure
new: #url
from: {TextStructure autohyperlink. TextStructure underlined. TextStructure notExtendable}
from: {RichTextStructure autohyperlink.
RichTextStructure underlined.
RichTextStructure notExtendable}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
initial structures
initialUnderlinedStructure

^ TextStructure
^ RichTextStructure
new: #underlined
from: {TextStructure underlined}
from: {RichTextStructure underlined}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
text structures
textStructures

textStructures ifNil: [textStructures := self initialTextStructures].
^ textStructures
Original file line number Diff line number Diff line change
@@ -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" : {
} }
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ My instance variables are:
name - aString
text - aText
textStructures - anOrderedCollection
timeLastSaved - aDateAndTime
timestampLastSaved - aDateAndTime

Original file line number Diff line number Diff line change
@@ -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]]]
Original file line number Diff line number Diff line change
@@ -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]
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
converting
asByteArray

^ self asString asByteArray
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
converting
asString

^ self text string
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ count
charcountExcept: aListOfBytecodes

| byteString |
byteString := self text string asByteArray.
byteString := self asByteArray.

^ byteString count: [:each | (aListOfBytecodes includes: each) not]

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
dateLastSaved

^ self timestampLastSaved first

This file was deleted.

Loading

0 comments on commit e2c9ebc

Please sign in to comment.