glimmer-cs-gladiator 0.9.2 → 0.9.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/LICENSE.txt +1 -1
- data/README.md +45 -32
- data/VERSION +1 -1
- data/bin/gladiator +1 -1
- data/bin/gladiator-setup +1 -1
- data/bin/glimmer-cs-gladiator +1 -1
- data/glimmer-cs-gladiator.gemspec +5 -6
- data/lib/glimmer-cs-gladiator/launch.rb +21 -0
- data/lib/models/glimmer/gladiator/command.rb +21 -0
- data/lib/models/glimmer/gladiator/dir.rb +24 -3
- data/lib/models/glimmer/gladiator/file.rb +80 -35
- data/lib/views/glimmer/gladiator/file_edit_menu.rb +21 -0
- data/lib/views/glimmer/gladiator/file_explorer_tree.rb +2 -2
- data/lib/views/glimmer/gladiator/file_lookup_list.rb +1 -1
- data/lib/views/glimmer/gladiator/gladiator_menu_bar.rb +1 -1
- data/lib/views/glimmer/gladiator/progress_shell.rb +22 -0
- data/lib/views/glimmer/gladiator/text_editor.rb +1 -1
- data/lib/views/glimmer/gladiator.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c9fe30eefc5c3923391eb43b43abcc38d02c2ec18d069186c88d387ec2123f60
|
4
|
+
data.tar.gz: c2fe1f3df4c146da6d18c62f6e4a41bb0399819ec5010ab1ce70c81ef2cebb77
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea3efd4908c8b7c9c880f99a0349f922622cdbb126f7d67ec992d8496261f045e7686511499062a5f7cc83e68ec9ad47b66a879fa8a4c5ecbfbe80f4479de1bf
|
7
|
+
data.tar.gz: 228847459b2aecec37322ebd165b48f3f196cf9135a31bba8216e18312aa9c5d1a4d0ba4288308af4c8ff7b848b67fd557ce890846d8d8bae7b3ba342f6d6ea1
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## 0.9.3
|
4
|
+
|
5
|
+
- Support new file formats: 'cr', 'cc', 'C', 'cxx', 'c++', 'hpp', 'hh', 'H', 'hxx', 'h++', 'conf',
|
6
|
+
'coffee', 'erb', 'feature', 'cjs, 'mjs', 'es', 'kt', 'ktm', 'kts', 'patch', 'pp', 'properties', 'ps',
|
7
|
+
'ps1', 'py', 'scm, 'sps', 'sls', 'sld', 'yml', 'Makefile', 'makefile', 'GNUmakefile'
|
8
|
+
- Add 'log' directory to ignored files in `.gladiator`
|
9
|
+
- Fix issue with deleting files from File Explorer Tree
|
10
|
+
- Fix line position label display (does not move as the caret moves)
|
11
|
+
- Fix Gladiator slowdown encountered with a rails project having nearly 100,000 files while running app server or tests (gladiator keeps refreshing file explorer tree from file changes caused in log and tmp directories despite them being ignored paths)
|
12
|
+
|
3
13
|
## 0.9.2
|
4
14
|
|
5
15
|
- Ensure cleaning filewatcher/thread resources when closing a project dir/file
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# <img src='https://raw.githubusercontent.com/AndyObtiva/glimmer-cs-gladiator/master/images/glimmer-cs-gladiator-logo.svg' height=85 /> Gladiator 0.9.
|
1
|
+
# <img src='https://raw.githubusercontent.com/AndyObtiva/glimmer-cs-gladiator/master/images/glimmer-cs-gladiator-logo.svg' height=85 /> Gladiator 0.9.3 - [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
|
|
@@ -7,7 +7,7 @@
|
|
7
7
|
[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) sample beta project under on-going development that demonstrates 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).
|
8
8
|
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).
|
9
9
|
[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.
|
10
|
-
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 [
|
10
|
+
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.
|
11
11
|
|
12
12
|
You may now [download](#download) a packaged version of [Gladiator](https://rubygems.org/gems/glimmer-cs-gladiator).
|
13
13
|
|
@@ -78,30 +78,43 @@ You may now [download](#download) a packaged version of [Gladiator](https://ruby
|
|
78
78
|
|
79
79
|
### Multiple Language Syntax Highlighting
|
80
80
|
|
81
|
-
-
|
82
|
-
-
|
83
|
-
-
|
84
|
-
-
|
85
|
-
-
|
86
|
-
-
|
87
|
-
-
|
88
|
-
-
|
89
|
-
-
|
90
|
-
-
|
91
|
-
-
|
92
|
-
-
|
93
|
-
-
|
94
|
-
-
|
95
|
-
-
|
96
|
-
-
|
97
|
-
-
|
98
|
-
-
|
99
|
-
-
|
100
|
-
-
|
101
|
-
-
|
102
|
-
-
|
103
|
-
-
|
104
|
-
-
|
81
|
+
Here is an exhaustive list of the file formats supported by [Gladiator](https://rubygems.org/gems/glimmer-cs-gladiator):
|
82
|
+
- C (`'c', 'h'`)
|
83
|
+
- Crystal (`'cr'`)
|
84
|
+
- C++ (`'cpp', 'cc', 'C', 'cxx', 'c++', 'hpp', 'hh', 'H', 'hxx', 'h++'`)
|
85
|
+
- CSS (`'css'`)
|
86
|
+
- Conf (`'conf'`)
|
87
|
+
- CoffeeScript (`'coffee'`)
|
88
|
+
- ERB (`'erb'`)
|
89
|
+
- Gherkin Feature (`'feature'`)
|
90
|
+
- Gradle (`'gradle'`)
|
91
|
+
- Haml (`'haml'`)
|
92
|
+
- HTML (`'html'`)
|
93
|
+
- INI (`'ini'`)
|
94
|
+
- Java (`'java'`)
|
95
|
+
- JavaScript (`'js', 'cjs', 'mjs', 'es6', 'es'`)
|
96
|
+
- JSON (`'json'`)
|
97
|
+
- JSP (`'jsp'`)
|
98
|
+
- Kotlin (`'kt', 'ktm', 'kts'`)
|
99
|
+
- Make (`'Makefile', 'makefile', 'GNUmakefile'`)
|
100
|
+
- Markdown (`'md', 'markdown'`)
|
101
|
+
- Diff Patch (`'patch'`)
|
102
|
+
- Pearl (`'pl'`)
|
103
|
+
- Plist (`'plist'`)
|
104
|
+
- Puppet (`'pp'`)
|
105
|
+
- Properties (`'properties'`)
|
106
|
+
- PostScript (`'ps'`)
|
107
|
+
- PowerShell (`'ps1'`)
|
108
|
+
- Python (`'py'`)
|
109
|
+
- Ruby (`'rb'`)
|
110
|
+
- SASS (`'sass'`)
|
111
|
+
- Scheme (`'scm', 'sps', 'sls', 'sld'`)
|
112
|
+
- SCSS (`'scss'`)
|
113
|
+
- Shell (`'sh'`)
|
114
|
+
- SQL (`'sql'`)
|
115
|
+
- Tcl (`'tcl'`)
|
116
|
+
- Yaml (`'yaml', 'yml'`)
|
117
|
+
- XML (`'xml'`)
|
105
118
|
|
106
119
|
## Platforms
|
107
120
|
|
@@ -117,11 +130,11 @@ You may now [download](#download) a packaged version of [Gladiator](https://ruby
|
|
117
130
|
|
118
131
|
## Download
|
119
132
|
|
120
|
-
[Download Gladiator 0.9.
|
133
|
+
[<img src='https://raw.githubusercontent.com/AndyObtiva/glimmer-cs-gladiator/master/images/glimmer-cs-gladiator-logo.svg' height=40 /> Download Gladiator 0.9.3 Mac DMG Installer (x64 Catalina & Older)](https://www.dropbox.com/s/ppq5owi2p8dgzkl/Gladiator-0.9.3.dmg?dl=1)
|
121
134
|
|
122
|
-
[Download Gladiator 0.9.
|
135
|
+
[<img src='https://raw.githubusercontent.com/AndyObtiva/glimmer-cs-gladiator/master/images/glimmer-cs-gladiator-logo.svg' height=40 /> Download Gladiator 0.9.3 Windows MSI Installer (x64 Windows 10)](https://www.dropbox.com/s/36dsfx6fqw8x0kp/Gladiator-0.9.3.msi?dl=1)
|
123
136
|
|
124
|
-
[Download Gladiator 0.9.1 Mac DMG Installer (x64 Big Sur & Older)](https://www.dropbox.com/s/s9yp6qtelh85qko/Gladiator-0.9.1.dmg?dl=1)
|
137
|
+
[<img src='https://raw.githubusercontent.com/AndyObtiva/glimmer-cs-gladiator/master/images/glimmer-cs-gladiator-logo.svg' height=40 /> Download Gladiator 0.9.1 Mac DMG Installer (x64 Big Sur & Older)](https://www.dropbox.com/s/s9yp6qtelh85qko/Gladiator-0.9.1.dmg?dl=1)
|
125
138
|
|
126
139
|
The packaged version starts with a dialog asking you what project to open. [Gladiator](https://rubygems.org/gems/glimmer-cs-gladiator) does not fully show up until you have selected a project directory.
|
127
140
|
|
@@ -134,7 +147,7 @@ Note: if you encounter any issues, check if they are documented in [TODO.md](TOD
|
|
134
147
|
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/)):
|
135
148
|
|
136
149
|
```
|
137
|
-
jgem install glimmer-cs-gladiator
|
150
|
+
jgem install glimmer-cs-gladiator -v0.9.3
|
138
151
|
```
|
139
152
|
|
140
153
|
Or add to a JRuby project Bundler `Gemfile` under the `:developement` group:
|
@@ -198,7 +211,7 @@ To reuse [Gladiator](https://rubygems.org/gems/glimmer-cs-gladiator) as a Glimme
|
|
198
211
|
following to the application's `Gemfile`:
|
199
212
|
|
200
213
|
```
|
201
|
-
gem 'glimmer-cs-gladiator', '
|
214
|
+
gem 'glimmer-cs-gladiator', '~> 0.9.2'
|
202
215
|
```
|
203
216
|
|
204
217
|
Run:
|
@@ -294,7 +307,7 @@ to the `ignore_paths` array.
|
|
294
307
|
|
295
308
|
[MIT](https://opensource.org/licenses/MIT)
|
296
309
|
|
297
|
-
Copyright (c) 2020-
|
310
|
+
Copyright (c) 2020-2022 Andy Maleh. See [LICENSE.txt](LICENSE.txt) for further details.
|
298
311
|
|
299
312
|
--
|
300
313
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.9.
|
1
|
+
0.9.3
|
data/bin/gladiator
CHANGED
data/bin/gladiator-setup
CHANGED
data/bin/glimmer-cs-gladiator
CHANGED
@@ -1,22 +1,21 @@
|
|
1
1
|
# Generated by jeweler
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: glimmer-cs-gladiator 0.9.
|
5
|
+
# stub: glimmer-cs-gladiator 0.9.3 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "glimmer-cs-gladiator".freeze
|
9
|
-
s.version = "0.9.
|
9
|
+
s.version = "0.9.3"
|
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 = "
|
14
|
+
s.date = "2022-01-29"
|
15
15
|
s.description = "Gladiator (short for Glimmer Editor) is a Glimmer sample 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
|
]
|
@@ -46,7 +45,7 @@ Gem::Specification.new do |s|
|
|
46
45
|
s.homepage = "http://github.com/AndyObtiva/glimmer-cs-gladiator".freeze
|
47
46
|
s.licenses = ["MIT".freeze]
|
48
47
|
s.post_install_message = "\nTo make the gladiator command available system-wide (especially with RVM), make sure you run this command with jruby in path: gladiator-setup\n\n".freeze
|
49
|
-
s.rubygems_version = "3.
|
48
|
+
s.rubygems_version = "3.3.6".freeze
|
50
49
|
s.summary = "Gladiator (Glimmer Editor) - Glimmer Custom Shell - Text Editor Built in Ruby".freeze
|
51
50
|
|
52
51
|
if s.respond_to? :specification_version then
|
@@ -1,3 +1,24 @@
|
|
1
|
+
# Copyright (c) 2020-2022 Andy Maleh
|
2
|
+
#
|
3
|
+
# Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
# a copy of this software and associated documentation files (the
|
5
|
+
# "Software"), to deal in the Software without restriction, including
|
6
|
+
# without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
# permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
# the following conditions:
|
10
|
+
#
|
11
|
+
# The above copyright notice and this permission notice shall be
|
12
|
+
# included in all copies or substantial portions of the Software.
|
13
|
+
#
|
14
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
21
|
+
|
1
22
|
require_relative '../glimmer-cs-gladiator'
|
2
23
|
|
3
24
|
include Glimmer
|
@@ -1,3 +1,24 @@
|
|
1
|
+
# Copyright (c) 2020-2022 Andy Maleh
|
2
|
+
#
|
3
|
+
# Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
# a copy of this software and associated documentation files (the
|
5
|
+
# "Software"), to deal in the Software without restriction, including
|
6
|
+
# without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
# permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
# the following conditions:
|
10
|
+
#
|
11
|
+
# The above copyright notice and this permission notice shall be
|
12
|
+
# included in all copies or substantial portions of the Software.
|
13
|
+
#
|
14
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
21
|
+
|
1
22
|
module Glimmer
|
2
23
|
class Gladiator
|
3
24
|
class Command
|
@@ -1,3 +1,24 @@
|
|
1
|
+
# Copyright (c) 2020-2022 Andy Maleh
|
2
|
+
#
|
3
|
+
# Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
# a copy of this software and associated documentation files (the
|
5
|
+
# "Software"), to deal in the Software without restriction, including
|
6
|
+
# without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
# permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
# the following conditions:
|
10
|
+
#
|
11
|
+
# The above copyright notice and this permission notice shall be
|
12
|
+
# included in all copies or substantial portions of the Software.
|
13
|
+
#
|
14
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
21
|
+
|
1
22
|
require 'models/glimmer/gladiator/file'
|
2
23
|
|
3
24
|
module Glimmer
|
@@ -6,7 +27,7 @@ module Glimmer
|
|
6
27
|
include Glimmer
|
7
28
|
include Glimmer::DataBinding::ObservableModel
|
8
29
|
|
9
|
-
IGNORE_PATHS = ['.gladiator', '.gladiator-scratchpad', '.git', 'coverage', 'packages', 'node_modules', 'tmp', 'vendor', 'pkg', 'dist']
|
30
|
+
IGNORE_PATHS = ['.gladiator', '.gladiator-scratchpad', '.git', 'coverage', 'packages', 'node_modules', 'tmp', 'vendor', 'pkg', 'dist', 'log']
|
10
31
|
|
11
32
|
attr_accessor :selected_child, :filter, :children, :filtered_path_options, :filtered_path, :display_path, :ignore_paths
|
12
33
|
attr_reader :name, :parent, :path
|
@@ -22,7 +43,7 @@ module Glimmer
|
|
22
43
|
# TODO do fine grained processing of events for enhanced performance (e.g. dir refresh vs file change)
|
23
44
|
# TODO do fine grained file change only without a refresh delay for enhanced performance
|
24
45
|
begin
|
25
|
-
if !@refresh_in_progress && !filename.include?('new_file') && (event != :updated || find_child_file(filename).nil?)
|
46
|
+
if !@refresh_in_progress && !filename.include?('new_file') && !ignore_paths.any? { |ignore_path| filename.include?(ignore_path) } && (event != :updated || find_child_file(filename).nil?)
|
26
47
|
Thread.new {
|
27
48
|
refresh
|
28
49
|
}
|
@@ -225,7 +246,7 @@ module Glimmer
|
|
225
246
|
@selected_child.restore_properties(file_properties) if file_properties
|
226
247
|
end
|
227
248
|
|
228
|
-
def
|
249
|
+
def remove!
|
229
250
|
FileUtils.rm_rf(path)
|
230
251
|
end
|
231
252
|
|
@@ -1,3 +1,24 @@
|
|
1
|
+
# Copyright (c) 2020-2022 Andy Maleh
|
2
|
+
#
|
3
|
+
# Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
# a copy of this software and associated documentation files (the
|
5
|
+
# "Software"), to deal in the Software without restriction, including
|
6
|
+
# without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
# permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
# the following conditions:
|
10
|
+
#
|
11
|
+
# The above copyright notice and this permission notice shall be
|
12
|
+
# included in all copies or substantial portions of the Software.
|
13
|
+
#
|
14
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
21
|
+
|
1
22
|
module Glimmer
|
2
23
|
class Gladiator
|
3
24
|
class File
|
@@ -28,58 +49,81 @@ module Glimmer
|
|
28
49
|
return 'ruby' if dirty_content.start_with?('#!/usr/bin/env ruby') || dirty_content.start_with?('#!/usr/bin/env jruby')
|
29
50
|
return 'yaml' if path.to_s.end_with?('Gemfile.lock')
|
30
51
|
return 'shell' if extension.nil? && path.to_s.include?('/bin/')
|
52
|
+
return 'make' if path.to_s.end_with?('Makefile') || path.to_s.end_with?('makefile') || path.to_s.end_with?('GNUmakefile')
|
31
53
|
case extension
|
32
54
|
# TODO extract case statement to an external config file
|
33
|
-
when '
|
34
|
-
'ruby'
|
35
|
-
when 'md', 'markdown'
|
36
|
-
'markdown'
|
37
|
-
when 'js', 'es6'
|
38
|
-
'javascript'
|
39
|
-
when 'json'
|
40
|
-
'json'
|
41
|
-
when 'yaml'
|
42
|
-
'yaml'
|
43
|
-
when 'html'
|
44
|
-
'html'
|
45
|
-
when 'h', 'c'
|
55
|
+
when 'c', 'h'
|
46
56
|
'c'
|
47
|
-
when '
|
48
|
-
'
|
49
|
-
when '
|
50
|
-
'gradle'
|
51
|
-
when 'cpp'
|
57
|
+
when 'cr'
|
58
|
+
'crystal'
|
59
|
+
when 'cpp', 'cc', 'C', 'cxx', 'c++', 'hpp', 'hh', 'H', 'hxx', 'h++'
|
52
60
|
'cpp'
|
53
61
|
when 'css'
|
54
62
|
'css'
|
55
|
-
when '
|
56
|
-
'
|
57
|
-
when '
|
58
|
-
'
|
59
|
-
when '
|
60
|
-
'
|
63
|
+
when 'conf'
|
64
|
+
'conf'
|
65
|
+
when 'coffee'
|
66
|
+
'coffeescript'
|
67
|
+
when 'erb'
|
68
|
+
'erb'
|
69
|
+
when 'feature'
|
70
|
+
'gherkin'
|
71
|
+
when 'gradle'
|
72
|
+
'gradle'
|
61
73
|
when 'haml'
|
62
74
|
'haml'
|
63
|
-
when '
|
64
|
-
'
|
75
|
+
when 'html'
|
76
|
+
'html'
|
65
77
|
when 'ini'
|
66
78
|
'ini'
|
79
|
+
when 'java'
|
80
|
+
'java'
|
81
|
+
when 'js', 'cjs', 'mjs', 'es6', 'es'
|
82
|
+
'javascript'
|
83
|
+
when 'json'
|
84
|
+
'json'
|
85
|
+
when 'jsp'
|
86
|
+
'jsp'
|
87
|
+
when 'kt', 'ktm', 'kts'
|
88
|
+
'kotlin'
|
89
|
+
when 'md', 'markdown'
|
90
|
+
'markdown'
|
91
|
+
when 'patch'
|
92
|
+
'diff'
|
67
93
|
when 'pl'
|
68
94
|
'perl'
|
69
|
-
when '
|
70
|
-
'
|
95
|
+
when 'plist'
|
96
|
+
'plist'
|
97
|
+
when 'pp'
|
98
|
+
'puppet'
|
99
|
+
when 'properties'
|
100
|
+
'properties'
|
101
|
+
when 'ps'
|
102
|
+
'postscript'
|
103
|
+
when 'ps1'
|
104
|
+
'powershell'
|
105
|
+
when 'py'
|
106
|
+
'python'
|
107
|
+
when 'rb'
|
108
|
+
'ruby'
|
71
109
|
when 'sass'
|
72
110
|
'sass'
|
111
|
+
when 'scm', 'sps', 'sls', 'sld'
|
112
|
+
'scheme'
|
73
113
|
when 'scss'
|
74
114
|
'scss'
|
75
|
-
when 'sql'
|
76
|
-
'sql'
|
77
115
|
when 'sh'
|
78
116
|
'shell'
|
79
|
-
when '
|
80
|
-
'
|
117
|
+
when 'sql'
|
118
|
+
'sql'
|
119
|
+
when 'tcl'
|
120
|
+
'tcl'
|
81
121
|
when 'txt', nil
|
82
122
|
'plain_text'
|
123
|
+
when 'yaml', 'yml'
|
124
|
+
'yaml'
|
125
|
+
when 'xml'
|
126
|
+
'xml'
|
83
127
|
end
|
84
128
|
end
|
85
129
|
|
@@ -121,8 +165,8 @@ module Glimmer
|
|
121
165
|
unless (current_line_number && current_line_number == new_line_number)
|
122
166
|
self.line_number = new_line_number
|
123
167
|
# TODO check if the following line is needed
|
124
|
-
self.line_position = caret_position - caret_position_for_line_index(line_number - 1) + 1
|
125
168
|
end
|
169
|
+
self.line_position = caret_position - caret_position_for_line_index(line_number - 1) + 1
|
126
170
|
end
|
127
171
|
|
128
172
|
def path=(the_path)
|
@@ -306,8 +350,8 @@ module Glimmer
|
|
306
350
|
lines[line_number - 1]
|
307
351
|
end
|
308
352
|
|
309
|
-
def
|
310
|
-
FileUtils.
|
353
|
+
def remove!
|
354
|
+
FileUtils.rm_rf(path) unless scratchpad?
|
311
355
|
end
|
312
356
|
|
313
357
|
def prefix_new_line!
|
@@ -567,6 +611,7 @@ module Glimmer
|
|
567
611
|
self.selection_count = (caret_position_for_line_index(self.line_number) - 1) - caret_position
|
568
612
|
end
|
569
613
|
|
614
|
+
# deletes content that is highlighted
|
570
615
|
def delete!
|
571
616
|
new_dirty_content = dirty_content
|
572
617
|
new_dirty_content[caret_position...(caret_position + selection_count)] = ''
|
@@ -1,3 +1,24 @@
|
|
1
|
+
# Copyright (c) 2020-2022 Andy Maleh
|
2
|
+
#
|
3
|
+
# Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
# a copy of this software and associated documentation files (the
|
5
|
+
# "Software"), to deal in the Software without restriction, including
|
6
|
+
# without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
# permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
# the following conditions:
|
10
|
+
#
|
11
|
+
# The above copyright notice and this permission notice shall be
|
12
|
+
# included in all copies or substantial portions of the Software.
|
13
|
+
#
|
14
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
21
|
+
|
1
22
|
module Glimmer
|
2
23
|
class Gladiator
|
3
24
|
class FileEditMenu
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) 2020-
|
1
|
+
# Copyright (c) 2020-2022 Andy Maleh
|
2
2
|
#
|
3
3
|
# Permission is hereby granted, free of charge, to any person obtaining
|
4
4
|
# a copy of this software and associated documentation files (the
|
@@ -150,7 +150,7 @@ module Glimmer
|
|
150
150
|
found_tab_item.getData('proxy')&.dispose
|
151
151
|
end
|
152
152
|
end
|
153
|
-
file.
|
153
|
+
file.remove! # TODO consider supporting command undo/redo
|
154
154
|
project_dir.refresh(async: false)
|
155
155
|
parent_tree_item = body_root.depth_first_search {|ti| ti.getData.path == parent_path}.first
|
156
156
|
swt_widget.showItem(parent_tree_item)
|
@@ -1,3 +1,24 @@
|
|
1
|
+
# Copyright (c) 2020-2022 Andy Maleh
|
2
|
+
#
|
3
|
+
# Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
# a copy of this software and associated documentation files (the
|
5
|
+
# "Software"), to deal in the Software without restriction, including
|
6
|
+
# without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
# permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
# the following conditions:
|
10
|
+
#
|
11
|
+
# The above copyright notice and this permission notice shall be
|
12
|
+
# included in all copies or substantial portions of the Software.
|
13
|
+
#
|
14
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
21
|
+
|
1
22
|
module Glimmer
|
2
23
|
class Gladiator
|
3
24
|
class ProgressShell
|
@@ -15,6 +36,7 @@ module Glimmer
|
|
15
36
|
}
|
16
37
|
|
17
38
|
text 'Gladiator'
|
39
|
+
image ICON
|
18
40
|
|
19
41
|
label(:center) {
|
20
42
|
text progress_text
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: glimmer-cs-gladiator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.3
|
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: 2022-01-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -135,7 +135,6 @@ executables:
|
|
135
135
|
- gladiator-setup
|
136
136
|
extensions: []
|
137
137
|
extra_rdoc_files:
|
138
|
-
- CHANGELOG.md
|
139
138
|
- LICENSE.txt
|
140
139
|
- README.md
|
141
140
|
files:
|
@@ -182,7 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
182
181
|
- !ruby/object:Gem::Version
|
183
182
|
version: '0'
|
184
183
|
requirements: []
|
185
|
-
rubygems_version: 3.
|
184
|
+
rubygems_version: 3.3.6
|
186
185
|
signing_key:
|
187
186
|
specification_version: 4
|
188
187
|
summary: Gladiator (Glimmer Editor) - Glimmer Custom Shell - Text Editor Built in
|