glimmer-cs-gladiator 0.10.0 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/README.md +19 -6
- data/VERSION +1 -1
- data/bin/gladiator +0 -0
- data/bin/gladiator-setup +0 -0
- data/bin/glimmer-cs-gladiator +0 -0
- data/glimmer-cs-gladiator.gemspec +6 -9
- data/lib/models/glimmer/gladiator/command.rb +13 -5
- data/lib/models/glimmer/gladiator/dir.rb +2 -1
- data/lib/models/glimmer/gladiator/file.rb +87 -6
- metadata +5 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d2be1b2aad1f764036be0f36a95a217e51f93609c05855b48c9574144872f9da
|
4
|
+
data.tar.gz: c494f9e2ed2d472d5c600d82a6116f993253381cd20bad5983584f2d67bc7440
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bcc7bedfde90a8288dd733c388d04c6aa265cc19caf11055b8ec6449a0cf5d27cbad85939c6eee8536485fc29ebabea39b928400364b28fd5a5dcd0af72a5da1
|
7
|
+
data.tar.gz: 8da78ae7dcea093e2357d42bf0dee6fa0bf0e5d423a2264e3f9e08da8b5230d86d7967c02637b5c290eac37ab0892513ef9c689c8308cd3a210ea2d883fc42d2
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## 0.11.0
|
4
|
+
|
5
|
+
- Support new file formats: 'ts' (TypeScript), 'rs' (Rust), and 'cs' (C#)
|
6
|
+
- Use the correct single line comment prefix for each programming language (e.g. `//` in JS/Java/C and `#` in Ruby/Perl/Python)
|
7
|
+
- Improve Undo/Redo support by storing data for in-progress text entry every 1 second (or ENV['UNDO_TIME_INTERVAL_SECONDS'] if specified) while typing to enable undoing partial text instead of everything
|
8
|
+
- File Lookup ignores `:` in filename search terms to enable looking up files for namespaced Ruby class (e.g. `Glimmer::Gladiator::Command` will find `lib/models/glimmer/gladiator/command.rb`)
|
9
|
+
- Upgrade to JRuby 9.3.4.0
|
10
|
+
- Upgrade to Glimmer DSL for SWT 4.24.3.1
|
11
|
+
|
3
12
|
## 0.10.0
|
4
13
|
|
5
14
|
- Upgrade to glimmer-dsl-swt 4.23.0.0
|
data/README.md
CHANGED
@@ -1,7 +1,11 @@
|
|
1
|
-
# <img src='https://raw.githubusercontent.com/AndyObtiva/glimmer-cs-gladiator/master/images/glimmer-cs-gladiator-logo.svg' height=85 /> Gladiator 0.
|
1
|
+
# <img src='https://raw.githubusercontent.com/AndyObtiva/glimmer-cs-gladiator/master/images/glimmer-cs-gladiator-logo.svg' height=85 /> Gladiator 0.11.0 - [Ugliest Text Editor Ever!](https://www.reddit.com/r/ruby/comments/hgve8k/gladiator_glimmer_editor_ugliest_text_editor_ever/)
|
2
2
|
## [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=40 /> Glimmer Custom Shell](https://github.com/AndyObtiva/glimmer-dsl-swt#custom-shell-gem)
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/glimmer-cs-gladiator.svg)](http://badge.fury.io/rb/glimmer-cs-gladiator)
|
4
4
|
|
5
|
+
(**[***Montreal.rb Talk - How I Built My Code Editor in Ruby***](https://andymaleh.blogspot.com/2022/07/montrealrb-2022-07-07-talk-how-i-built.html)**)
|
6
|
+
|
7
|
+
![rapid prototyping of desktop app GUI with Gladiator](https://raw.githubusercontent.com/AndyObtiva/glimmer-dsl-swt/master/images/glimmer-dsl-swt-demo-hello-world.gif)
|
8
|
+
|
5
9
|
Mac
|
6
10
|
|
7
11
|
![Gladiator](images/glimmer-gladiator.png)
|
@@ -10,12 +14,12 @@ Windows
|
|
10
14
|
|
11
15
|
![Gladiator](images/glimmer-gladiator-windows.png)
|
12
16
|
|
13
|
-
[Gladiator](https://rubygems.org/gems/glimmer-cs-gladiator) (short for Glimmer Editor) is a [Glimmer DSL for SWT](https://github.com/AndyObtiva/glimmer-dsl-swt)
|
17
|
+
[Gladiator](https://rubygems.org/gems/glimmer-cs-gladiator) (short for Glimmer Editor) is a [Glimmer DSL for SWT](https://github.com/AndyObtiva/glimmer-dsl-swt) beta project under on-going development that explores how to build a text editor in Ruby using [Glimmer DSL for SWT](https://github.com/AndyObtiva/glimmer-dsl-swt) (JRuby Desktop Development GUI Library).
|
14
18
|
It is not intended to be a full-fledged editor by any means, yet mostly a fun educational exercise in using [Glimmer](https://github.com/AndyObtiva/glimmer).
|
15
19
|
[Gladiator](https://rubygems.org/gems/glimmer-cs-gladiator) is also a personal tool for shaping an editor exactly the way I like, with all the keyboard shortcuts I prefer.
|
16
20
|
I leave building truly professional text editors to software tooling experts who would hopefully use [Glimmer](https://github.com/AndyObtiva/glimmer) one day. Otherwise, I have been happily using [Gladiator](https://rubygems.org/gems/glimmer-cs-gladiator) to develop all my [projects](https://github.com/AndyObtiva) since May of 2020.
|
17
21
|
|
18
|
-
You may now
|
22
|
+
[<img src='https://raw.githubusercontent.com/AndyObtiva/glimmer-cs-gladiator/master/images/glimmer-cs-gladiator-logo.svg' height=40 /> You may now download a packaged version of Gladiator, including new support for Mac ARM64](#download)
|
19
23
|
|
20
24
|
## Features
|
21
25
|
|
@@ -87,6 +91,7 @@ You may now [download](#download) a packaged version of [Gladiator](https://ruby
|
|
87
91
|
Here is an exhaustive list of the file formats supported by [Gladiator](https://rubygems.org/gems/glimmer-cs-gladiator):
|
88
92
|
1. C (`'c', 'h'`)
|
89
93
|
1. C++ (`'cpp', 'cc', 'C', 'cxx', 'c++', 'hpp', 'hh', 'H', 'hxx', 'h++'`)
|
94
|
+
1. C# (`'cs'`)
|
90
95
|
1. Crystal (`'cr'`)
|
91
96
|
1. CSS (`'css'`)
|
92
97
|
1. Conf (`'conf'`)
|
@@ -114,12 +119,14 @@ Here is an exhaustive list of the file formats supported by [Gladiator](https://
|
|
114
119
|
1. PowerShell (`'ps1'`)
|
115
120
|
1. Python (`'py'`)
|
116
121
|
1. Ruby (`'rb'`, `'rake'`)
|
122
|
+
1. Rust (`'rs'`)
|
117
123
|
1. SASS (`'sass'`)
|
118
124
|
1. Scheme (`'scm', 'sps', 'sls', 'sld'`)
|
119
125
|
1. SCSS (`'scss'`)
|
120
126
|
1. Shell (`'sh'`)
|
121
127
|
1. SQL (`'sql'`)
|
122
128
|
1. Tcl (`'tcl'`)
|
129
|
+
1. TypeScript (`'ts'`)
|
123
130
|
1. Yaml (`'yaml', 'yml'`)
|
124
131
|
1. XML (`'xml'`)
|
125
132
|
|
@@ -137,7 +144,9 @@ Here is an exhaustive list of the file formats supported by [Gladiator](https://
|
|
137
144
|
|
138
145
|
## Download
|
139
146
|
|
140
|
-
[<img src='https://raw.githubusercontent.com/AndyObtiva/glimmer-cs-gladiator/master/images/glimmer-cs-gladiator-logo.svg' height=40 /> Download Gladiator 0.
|
147
|
+
[<img src='https://raw.githubusercontent.com/AndyObtiva/glimmer-cs-gladiator/master/images/glimmer-cs-gladiator-logo.svg' height=40 /> Download Gladiator 0.11.0 Mac DMG Installer (ARM64 Ventura 13.4.1 & Older)](https://www.dropbox.com/scl/fi/b6t41tw0oqirbishtcncm/Gladiator-0.11.0-arm64-ventura-13.4.1.dmg?rlkey=3vq3ifq84tfjiglnttcbtgcmm&dl=1) (this version starts in about 2.5 seconds)
|
148
|
+
|
149
|
+
[<img src='https://raw.githubusercontent.com/AndyObtiva/glimmer-cs-gladiator/master/images/glimmer-cs-gladiator-logo.svg' height=40 /> Download Gladiator 0.10.0 Mac DMG Installer (x64 Monterey & Big Sur)](https://www.dropbox.com/s/6155qdxv7j6hnsi/Gladiator-0.10.0-x64-monterey.dmg?dl=1)
|
141
150
|
|
142
151
|
[<img src='https://raw.githubusercontent.com/AndyObtiva/glimmer-cs-gladiator/master/images/glimmer-cs-gladiator-logo.svg' height=40 /> Download Gladiator 0.10.0 Mac DMG Installer (x64 Catalina & Older)](https://www.dropbox.com/s/rxta4yio71mei8f/Gladiator-0.10.0.dmg?dl=1)
|
143
152
|
|
@@ -154,7 +163,7 @@ Note: if you encounter any issues, check if they are documented in [TODO.md](TOD
|
|
154
163
|
Install [Gladiator](https://rubygems.org/gems/glimmer-cs-gladiator) gem by running (`jgem`, `jruby -S gem`, or `gem` directly if you have [RVM](https://rvm.io/)):
|
155
164
|
|
156
165
|
```
|
157
|
-
jgem install glimmer-cs-gladiator -v0.
|
166
|
+
jgem install glimmer-cs-gladiator -v0.11.0
|
158
167
|
```
|
159
168
|
|
160
169
|
Or add to a JRuby project Bundler `Gemfile` under the `:developement` group:
|
@@ -218,7 +227,7 @@ To reuse [Gladiator](https://rubygems.org/gems/glimmer-cs-gladiator) as a Glimme
|
|
218
227
|
following to the application's `Gemfile`:
|
219
228
|
|
220
229
|
```
|
221
|
-
gem 'glimmer-cs-gladiator', '~> 0.
|
230
|
+
gem 'glimmer-cs-gladiator', '~> 0.11.0'
|
222
231
|
```
|
223
232
|
|
224
233
|
Run:
|
@@ -291,6 +300,10 @@ Also, if you encounter this issue with projects that contain a lot of extra file
|
|
291
300
|
could later open the generated `.gladiator` file at the root of the project directory and add unnecessary subdirectories
|
292
301
|
to the `ignore_paths` array.
|
293
302
|
|
303
|
+
### Freezing in large projects
|
304
|
+
|
305
|
+
Gladiator right now assumes smaller projects with a few files only as it always opens all file contents in memory for better searching. So, when a file is updated externally (e.g. change git branch), it reloads its entire tree, including all the file contents too, which causes a temporary freeze. This may get fixed in the future, but it is not annoying enough in smaller projects to be fixed right away. The change might include diffing the tree to avoid refreshing file contents for unchanged files, and perhaps multi-threaded loading of file contents to avoid freezing the GUI.
|
306
|
+
|
294
307
|
## TODO
|
295
308
|
|
296
309
|
[TODO.md](TODO.md)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.11.0
|
data/bin/gladiator
CHANGED
File without changes
|
data/bin/gladiator-setup
CHANGED
File without changes
|
data/bin/glimmer-cs-gladiator
CHANGED
File without changes
|
@@ -2,21 +2,20 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: glimmer-cs-gladiator 0.
|
5
|
+
# stub: glimmer-cs-gladiator 0.11.0 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "glimmer-cs-gladiator".freeze
|
9
|
-
s.version = "0.
|
9
|
+
s.version = "0.11.0"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib".freeze]
|
13
13
|
s.authors = ["Andy Maleh".freeze]
|
14
|
-
s.date = "
|
15
|
-
s.description = "Gladiator (short for Glimmer Editor) is a Glimmer
|
14
|
+
s.date = "2023-08-14"
|
15
|
+
s.description = "Gladiator (short for Glimmer Editor) is a Glimmer beta project under on-going development. It is not intended to be a full-fledged editor by any means, yet mostly a fun educational exercise in using Glimmer to build a text editor. Gladiator is also a personal tool for shaping an editor exactly the way I like. I leave building truly professional text editors to software tooling experts who would hopefully use Glimmer one day.".freeze
|
16
16
|
s.email = "andy.am@gmail.com".freeze
|
17
17
|
s.executables = ["glimmer-cs-gladiator".freeze, "gladiator".freeze, "gladiator-setup".freeze]
|
18
18
|
s.extra_rdoc_files = [
|
19
|
-
"CHANGELOG.md",
|
20
19
|
"LICENSE.txt",
|
21
20
|
"README.md"
|
22
21
|
]
|
@@ -54,22 +53,20 @@ Gem::Specification.new do |s|
|
|
54
53
|
end
|
55
54
|
|
56
55
|
if s.respond_to? :add_runtime_dependency then
|
57
|
-
s.add_runtime_dependency(%q<glimmer-dsl-swt>.freeze, ["~> 4.24.
|
56
|
+
s.add_runtime_dependency(%q<glimmer-dsl-swt>.freeze, ["~> 4.24.3.1"])
|
58
57
|
s.add_runtime_dependency(%q<filewatcher>.freeze, ["~> 1.1.1"])
|
59
58
|
s.add_runtime_dependency(%q<clipboard>.freeze, ["~> 1.3.5"])
|
60
59
|
s.add_development_dependency(%q<rspec>.freeze, ["~> 3.5.0"])
|
61
60
|
s.add_development_dependency(%q<jeweler>.freeze, ["= 2.3.9"])
|
62
61
|
s.add_development_dependency(%q<warbler>.freeze, ["= 2.0.5"])
|
63
|
-
s.add_development_dependency(%q<jruby-jars>.freeze, ["= 9.2.19.0"])
|
64
62
|
s.add_development_dependency(%q<simplecov>.freeze, [">= 0"])
|
65
63
|
else
|
66
|
-
s.add_dependency(%q<glimmer-dsl-swt>.freeze, ["~> 4.24.
|
64
|
+
s.add_dependency(%q<glimmer-dsl-swt>.freeze, ["~> 4.24.3.1"])
|
67
65
|
s.add_dependency(%q<filewatcher>.freeze, ["~> 1.1.1"])
|
68
66
|
s.add_dependency(%q<clipboard>.freeze, ["~> 1.3.5"])
|
69
67
|
s.add_dependency(%q<rspec>.freeze, ["~> 3.5.0"])
|
70
68
|
s.add_dependency(%q<jeweler>.freeze, ["= 2.3.9"])
|
71
69
|
s.add_dependency(%q<warbler>.freeze, ["= 2.0.5"])
|
72
|
-
s.add_dependency(%q<jruby-jars>.freeze, ["= 9.2.19.0"])
|
73
70
|
s.add_dependency(%q<simplecov>.freeze, [">= 0"])
|
74
71
|
end
|
75
72
|
end
|
@@ -38,13 +38,12 @@ module Glimmer
|
|
38
38
|
|
39
39
|
def do(file, method = nil, *args, command: nil)
|
40
40
|
if command.nil?
|
41
|
-
command
|
41
|
+
command = Command.new(file, method, *args)
|
42
42
|
command.previous_command = command_history_for(file).last
|
43
|
-
|
44
|
-
|
45
|
-
end
|
43
|
+
save_new_command = command_history_for(file).last.method == :change_content! && method == :change_content! && !time_for_new_command?
|
44
|
+
command_history_for(file).last.next_command = command unless save_new_command
|
46
45
|
command.do
|
47
|
-
command_history_for(file) << command unless
|
46
|
+
command_history_for(file) << command unless save_new_command
|
48
47
|
else
|
49
48
|
command_history_for(file) << command
|
50
49
|
end
|
@@ -64,7 +63,16 @@ module Glimmer
|
|
64
63
|
def clear(file)
|
65
64
|
command_history[file] = [Command.new(file)]
|
66
65
|
end
|
66
|
+
|
67
|
+
def time_for_new_command?
|
68
|
+
@time ||= Time.now
|
69
|
+
time_for_new_command = (Time.now - @time) > TIME_INTERVAL_SECONDS_NEW_COMMAND
|
70
|
+
@time = Time.now if time_for_new_command
|
71
|
+
time_for_new_command
|
72
|
+
end
|
67
73
|
end
|
74
|
+
|
75
|
+
TIME_INTERVAL_SECONDS_NEW_COMMAND = (ENV['UNDO_TIME_INTERVAL_SECONDS'] || 1).to_f # seconds
|
68
76
|
|
69
77
|
attr_accessor :file, :method, :args, :previous_command, :next_command,
|
70
78
|
:file_dirty_content, :file_caret_position, :file_selection_count, :previous_file_dirty_content, :previous_file_caret_position, :previous_file_selection_count
|
@@ -28,6 +28,7 @@ module Glimmer
|
|
28
28
|
include Glimmer::DataBinding::ObservableModel
|
29
29
|
|
30
30
|
IGNORE_PATHS = ['.gladiator', '.gladiator-scratchpad', '.git', 'coverage', 'packages', 'node_modules', 'tmp', 'vendor', 'pkg', 'dist', 'log', 'test/reports']
|
31
|
+
REGEXP_FILTER = /[:_\/.-]/
|
31
32
|
|
32
33
|
attr_accessor :selected_child, :filter, :children, :filtered_path_options, :filtered_path, :display_path, :ignore_paths
|
33
34
|
attr_reader :name, :parent, :path
|
@@ -184,7 +185,7 @@ module Glimmer
|
|
184
185
|
children_files.select do |child|
|
185
186
|
child_path = child.path.to_s.sub(project_dir.path, '')
|
186
187
|
child_path.downcase.include?(filter.downcase) ||
|
187
|
-
child_path.downcase.gsub(
|
188
|
+
child_path.downcase.gsub(REGEXP_FILTER, '').include?(filter.downcase.gsub(REGEXP_FILTER, ''))
|
188
189
|
end.sort_by {|c| c.path.to_s.downcase}
|
189
190
|
end
|
190
191
|
|
@@ -41,9 +41,12 @@ module Glimmer
|
|
41
41
|
@init = nil
|
42
42
|
end
|
43
43
|
|
44
|
+
def extension
|
45
|
+
path.split('.').last if path.to_s.include?('.')
|
46
|
+
end
|
47
|
+
|
44
48
|
def language
|
45
49
|
# TODO consider using Rouge::Lexer.guess_by_filename instead and perhaps guess_by_source when it fails
|
46
|
-
extension = path.split('.').last if path.to_s.include?('.')
|
47
50
|
return 'ruby' if scratchpad?
|
48
51
|
return 'ruby' if path.to_s.end_with?('Gemfile') || path.to_s.end_with?('Rakefile')
|
49
52
|
return 'ruby' if dirty_content.start_with?('#!/usr/bin/env ruby') || dirty_content.start_with?('#!/usr/bin/env jruby')
|
@@ -58,6 +61,8 @@ module Glimmer
|
|
58
61
|
'cpp'
|
59
62
|
when 'cr'
|
60
63
|
'crystal'
|
64
|
+
when 'cs'
|
65
|
+
'csharp'
|
61
66
|
when 'css'
|
62
67
|
'css'
|
63
68
|
when 'conf'
|
@@ -66,6 +71,8 @@ module Glimmer
|
|
66
71
|
'coffeescript'
|
67
72
|
when 'erb'
|
68
73
|
'erb'
|
74
|
+
when 'ex', 'exs'
|
75
|
+
'eex'
|
69
76
|
when 'feature'
|
70
77
|
'gherkin'
|
71
78
|
when 'gradle'
|
@@ -106,6 +113,8 @@ module Glimmer
|
|
106
113
|
'powershell'
|
107
114
|
when 'py'
|
108
115
|
'python'
|
116
|
+
when 'rs'
|
117
|
+
'rust'
|
109
118
|
when 'rb', 'rake'
|
110
119
|
'ruby'
|
111
120
|
when 'sass'
|
@@ -120,15 +129,84 @@ module Glimmer
|
|
120
129
|
'sql'
|
121
130
|
when 'tcl'
|
122
131
|
'tcl'
|
132
|
+
when 'ts'
|
133
|
+
'typescript'
|
134
|
+
when 'tsx'
|
135
|
+
'tsx'
|
123
136
|
when 'txt', nil
|
124
137
|
'plain_text'
|
125
138
|
when 'yaml', 'yml'
|
126
139
|
'yaml'
|
127
140
|
when 'xml'
|
128
141
|
'xml'
|
142
|
+
else
|
143
|
+
'plain_text'
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
147
|
+
def single_line_comment_prefix
|
148
|
+
case extension
|
149
|
+
when 'c', 'h',
|
150
|
+
'cpp', 'cc', 'C', 'cxx', 'c++', 'hpp', 'hh', 'H', 'hxx', 'h++',
|
151
|
+
'cs',
|
152
|
+
'gradle',
|
153
|
+
'java',
|
154
|
+
'js', 'cjs', 'mjs', 'es6', 'es',
|
155
|
+
'jsx',
|
156
|
+
'kt', 'ktm', 'kts',
|
157
|
+
'rs',
|
158
|
+
'ts',
|
159
|
+
'tsx',
|
160
|
+
'sass',
|
161
|
+
'scss'
|
162
|
+
'//'
|
163
|
+
when 'cr',
|
164
|
+
'conf',
|
165
|
+
'coffee',
|
166
|
+
'ex', 'exs',
|
167
|
+
'feature',
|
168
|
+
'ini',
|
169
|
+
'pl',
|
170
|
+
'pp',
|
171
|
+
'properties',
|
172
|
+
'ps1',
|
173
|
+
'py',
|
174
|
+
'rb', 'rake',
|
175
|
+
'sh',
|
176
|
+
'tcl',
|
177
|
+
'yaml', 'yml'
|
178
|
+
'#'
|
179
|
+
when 'css'
|
180
|
+
'/*'
|
181
|
+
when 'erb',
|
182
|
+
'html',
|
183
|
+
'jsp',
|
184
|
+
'plist',
|
185
|
+
'xml'
|
186
|
+
# TODO in the future, have .erb support `#` single line comment inside Ruby code scriptlets as opposed to scriptlet-free code
|
187
|
+
'<!--'
|
188
|
+
when 'haml'
|
189
|
+
'/'
|
190
|
+
when 'md', 'markdown'
|
191
|
+
'<!---'
|
192
|
+
when 'ps'
|
193
|
+
'%'
|
194
|
+
when 'scm', 'sps', 'sls', 'sld'
|
195
|
+
';'
|
196
|
+
when 'sql'
|
197
|
+
'--'
|
198
|
+
when 'json',
|
199
|
+
'patch',
|
200
|
+
'txt',
|
201
|
+
nil
|
202
|
+
nil
|
203
|
+
else
|
204
|
+
'#'
|
129
205
|
end
|
130
206
|
end
|
131
207
|
|
208
|
+
# TODO support: def single_line_comment_postfix
|
209
|
+
|
132
210
|
def init_content
|
133
211
|
unless @init
|
134
212
|
@init = true
|
@@ -386,14 +464,17 @@ module Glimmer
|
|
386
464
|
delta = 0
|
387
465
|
the_line = old_lines[the_line_index]
|
388
466
|
return if the_line.nil?
|
389
|
-
if the_line.strip.start_with?(
|
390
|
-
new_lines[the_line_index] = the_line.sub(/# /, '')
|
467
|
+
if the_line.strip.start_with?("#{single_line_comment_prefix} ")
|
468
|
+
new_lines[the_line_index] = the_line.sub(/#{single_line_comment_prefix} /, '')
|
469
|
+
# TODO single_line_comment_postfix if needed
|
391
470
|
delta -= 2
|
392
|
-
elsif the_line.strip.start_with?(
|
393
|
-
new_lines[the_line_index] = the_line.sub(
|
471
|
+
elsif the_line.strip.start_with?(single_line_comment_prefix)
|
472
|
+
new_lines[the_line_index] = the_line.sub(/#{single_line_comment_prefix}/, '')
|
473
|
+
# TODO single_line_comment_postfix if needed
|
394
474
|
delta -= 1
|
395
475
|
else
|
396
|
-
new_lines[the_line_index] = "# #{the_line}"
|
476
|
+
new_lines[the_line_index] = "#{single_line_comment_prefix} #{the_line}"
|
477
|
+
# TODO single_line_comment_postfix if needed
|
397
478
|
delta += 2
|
398
479
|
end
|
399
480
|
end
|
metadata
CHANGED
@@ -1,21 +1,21 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: glimmer-cs-gladiator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Maleh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-08-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
15
15
|
requirements:
|
16
16
|
- - "~>"
|
17
17
|
- !ruby/object:Gem::Version
|
18
|
-
version: 4.24.
|
18
|
+
version: 4.24.3.1
|
19
19
|
name: glimmer-dsl-swt
|
20
20
|
prerelease: false
|
21
21
|
type: :runtime
|
@@ -23,7 +23,7 @@ dependencies:
|
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 4.24.
|
26
|
+
version: 4.24.3.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
29
29
|
requirements:
|
@@ -94,20 +94,6 @@ dependencies:
|
|
94
94
|
- - '='
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: 2.0.5
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
requirement: !ruby/object:Gem::Requirement
|
99
|
-
requirements:
|
100
|
-
- - '='
|
101
|
-
- !ruby/object:Gem::Version
|
102
|
-
version: 9.2.19.0
|
103
|
-
name: jruby-jars
|
104
|
-
prerelease: false
|
105
|
-
type: :development
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - '='
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: 9.2.19.0
|
111
97
|
- !ruby/object:Gem::Dependency
|
112
98
|
requirement: !ruby/object:Gem::Requirement
|
113
99
|
requirements:
|
@@ -122,7 +108,7 @@ dependencies:
|
|
122
108
|
- - ">="
|
123
109
|
- !ruby/object:Gem::Version
|
124
110
|
version: '0'
|
125
|
-
description: Gladiator (short for Glimmer Editor) is a Glimmer
|
111
|
+
description: Gladiator (short for Glimmer Editor) is a Glimmer beta project under
|
126
112
|
on-going development. It is not intended to be a full-fledged editor by any means,
|
127
113
|
yet mostly a fun educational exercise in using Glimmer to build a text editor. Gladiator
|
128
114
|
is also a personal tool for shaping an editor exactly the way I like. I leave building
|
@@ -135,7 +121,6 @@ executables:
|
|
135
121
|
- gladiator-setup
|
136
122
|
extensions: []
|
137
123
|
extra_rdoc_files:
|
138
|
-
- CHANGELOG.md
|
139
124
|
- LICENSE.txt
|
140
125
|
- README.md
|
141
126
|
files:
|