From dd28135d14c64ff9ac71ec29bb0090b4887f9b89 Mon Sep 17 00:00:00 2001 From: hellerve Date: Wed, 18 Dec 2019 22:33:36 +0100 Subject: [PATCH] editor: add simple carp editor --- Pond.package/CarpEditor.class/README.md | 1 + Pond.package/CarpEditor.class/instance/gtCheck.st | 8 ++++++++ .../CarpEditor.class/instance/gtContent..st | 6 ++++++ .../CarpEditor.class/instance/initialize.st | 5 +++++ Pond.package/CarpEditor.class/instance/text.st | 3 +++ Pond.package/CarpEditor.class/properties.json | 14 ++++++++++++++ 6 files changed, 37 insertions(+) create mode 100644 Pond.package/CarpEditor.class/README.md create mode 100644 Pond.package/CarpEditor.class/instance/gtCheck.st create mode 100644 Pond.package/CarpEditor.class/instance/gtContent..st create mode 100644 Pond.package/CarpEditor.class/instance/initialize.st create mode 100644 Pond.package/CarpEditor.class/instance/text.st create mode 100644 Pond.package/CarpEditor.class/properties.json diff --git a/Pond.package/CarpEditor.class/README.md b/Pond.package/CarpEditor.class/README.md new file mode 100644 index 0000000..9d612dc --- /dev/null +++ b/Pond.package/CarpEditor.class/README.md @@ -0,0 +1 @@ +I’m a simple editor with Carp code in it. \ No newline at end of file diff --git a/Pond.package/CarpEditor.class/instance/gtCheck.st b/Pond.package/CarpEditor.class/instance/gtCheck.st new file mode 100644 index 0000000..1342688 --- /dev/null +++ b/Pond.package/CarpEditor.class/instance/gtCheck.st @@ -0,0 +1,8 @@ +initialization +gtCheck + + "TODO: make carp checker configurable" + ^ GLMGenericAction new + action: [ GTInspector openOn: (CarpCheckExample new succeedingCarpChecker file: editor text asString; check) ]; + icon: GLMUIThemeExtraIcons glamorousRefresh; + title: 'Check' \ No newline at end of file diff --git a/Pond.package/CarpEditor.class/instance/gtContent..st b/Pond.package/CarpEditor.class/instance/gtContent..st new file mode 100644 index 0000000..b107deb --- /dev/null +++ b/Pond.package/CarpEditor.class/instance/gtContent..st @@ -0,0 +1,6 @@ +initialization +gtContent: aView + + (aView custom: editor) + title: 'Editor'; + display: text \ No newline at end of file diff --git a/Pond.package/CarpEditor.class/instance/initialize.st b/Pond.package/CarpEditor.class/instance/initialize.st new file mode 100644 index 0000000..80cf32f --- /dev/null +++ b/Pond.package/CarpEditor.class/instance/initialize.st @@ -0,0 +1,5 @@ +initialization +initialize + text := ''. + "TODO: find out how to override the mode properly" + editor := GLMRubricHighlightedTextPresentation new withLineNumbers: true; editingMode: RubPlainTextMode new \ No newline at end of file diff --git a/Pond.package/CarpEditor.class/instance/text.st b/Pond.package/CarpEditor.class/instance/text.st new file mode 100644 index 0000000..885aff6 --- /dev/null +++ b/Pond.package/CarpEditor.class/instance/text.st @@ -0,0 +1,3 @@ +initialization +text + ^ text \ No newline at end of file diff --git a/Pond.package/CarpEditor.class/properties.json b/Pond.package/CarpEditor.class/properties.json new file mode 100644 index 0000000..afd6e74 --- /dev/null +++ b/Pond.package/CarpEditor.class/properties.json @@ -0,0 +1,14 @@ +{ + "commentStamp" : "VeitHeller 12/18/2019 21:39", + "super" : "Object", + "category" : "Pond", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ + "text", + "editor" + ], + "name" : "CarpEditor", + "type" : "normal" +} \ No newline at end of file