glimmer-cs-gladiator 0.8.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 +41 -0
- data/LICENSE.txt +20 -20
- data/README.md +102 -52
- data/VERSION +1 -1
- data/bin/gladiator +31 -34
- data/bin/gladiator-setup +80 -80
- data/bin/glimmer-cs-gladiator +22 -22
- data/glimmer-cs-gladiator.gemspec +17 -24
- data/images/glimmer-cs-gladiator-logo.png +0 -0
- data/lib/glimmer-cs-gladiator/launch.rb +27 -6
- data/lib/glimmer-cs-gladiator.rb +30 -30
- data/lib/models/glimmer/gladiator/command.rb +21 -0
- data/lib/models/glimmer/gladiator/dir.rb +40 -6
- data/lib/models/glimmer/gladiator/file.rb +103 -42
- data/lib/views/glimmer/gladiator/file_edit_menu.rb +21 -0
- data/lib/views/glimmer/gladiator/file_explorer_tree.rb +244 -244
- data/lib/views/glimmer/gladiator/file_lookup_list.rb +63 -64
- data/lib/views/glimmer/gladiator/gladiator_menu_bar.rb +5 -5
- data/lib/views/glimmer/gladiator/progress_shell.rb +22 -0
- data/lib/views/glimmer/gladiator/text_editor.rb +3 -1
- data/lib/views/glimmer/gladiator.rb +135 -126
- metadata +28 -21
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,46 @@
|
|
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
|
+
|
13
|
+
## 0.9.2
|
14
|
+
|
15
|
+
- Ensure cleaning filewatcher/thread resources when closing a project dir/file
|
16
|
+
- Fix issue with `gladiator` function command produced by `gladiator-setup` not forwarding arguments in
|
17
|
+
- Fix issue with making changes to file through Find/Replace not persisting if I close Gladiator right afterwards unless I focus/unfocus open text editor
|
18
|
+
- Fix issue with not being able to open a project by passing project directory as first argument to `gladiator` command
|
19
|
+
- Fix issue with sometimes not remembering last open tabs when opening Gladiator
|
20
|
+
- Fix issues with renaming files in file explorer not reflecting change in open tab file name
|
21
|
+
- Fix minor issue with leaving `'-J-Xrs'` option in `bin/gladiator`
|
22
|
+
- Fix issue with Scratchpad not running content anymore
|
23
|
+
- Fix issue of stopping file watcher for open files that still need watching
|
24
|
+
|
25
|
+
## 0.9.1
|
26
|
+
|
27
|
+
- Upgrade to glimmer-dsl-swt 4.20.15.4
|
28
|
+
- Fix issue with keyboard shortcuts not working in first tab (also fix scroll-jittering when performing CMD+] and CMD+[ in first tab)
|
29
|
+
- Change Quit Project keyboard shortcut to ALT+F4
|
30
|
+
- In app mode (packaged version), show "Open Project..." shell again after closing last open project
|
31
|
+
|
32
|
+
## 0.9.0
|
33
|
+
|
34
|
+
- Upgrade to glimmer-dsl-swt 4.19.0.0
|
35
|
+
- Updated quit project accelerator (keyboard shortcut) to ALT+F4
|
36
|
+
|
37
|
+
## 0.8.3
|
38
|
+
|
39
|
+
- Switch Scratchpad evaling to loading a temporary local file under `project_dir/.gladiator-scratchpad` for a more realistic Ruby running experience
|
40
|
+
- Fix issue with detecting current gladiator window when handling keyboard shortcuts
|
41
|
+
- Fix issue with Scratchpad opening twice when called twice instead of reusing the existing Scratchpad
|
42
|
+
- Fix issue with closed tabs not closing their file streams/watchers, including the Scratchpad temporary file
|
43
|
+
|
3
44
|
## 0.8.2
|
4
45
|
|
5
46
|
- Add a right click menu on text editor area with undo redo | cut, copy, paste, delete | select all
|
data/LICENSE.txt
CHANGED
@@ -1,20 +1,20 @@
|
|
1
|
-
Copyright (c) 2020-
|
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.
|
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.
|
data/README.md
CHANGED
@@ -1,19 +1,19 @@
|
|
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.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
|
|
5
5
|
![Gladiator](images/glimmer-gladiator.png)
|
6
6
|
|
7
|
-
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).
|
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
|
-
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 to develop all my [
|
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 [projects](https://github.com/AndyObtiva) since May of 2020.
|
11
11
|
|
12
|
-
You may now [download](#download) a packaged version of Gladiator.
|
12
|
+
You may now [download](#download) a packaged version of [Gladiator](https://rubygems.org/gems/glimmer-cs-gladiator).
|
13
13
|
|
14
14
|
## Features
|
15
15
|
|
16
|
-
Gladiator currently supports the following text editing features (including keyboard shortcuts with Mac CMD=CTRL/CTRL=ALT on Windows/Linux)
|
16
|
+
[Gladiator](https://rubygems.org/gems/glimmer-cs-gladiator) currently supports the following text editing features (including keyboard shortcuts with Mac CMD=CTRL/CTRL=ALT on Windows/Linux)
|
17
17
|
|
18
18
|
![Gladiator Demo](images/glimmer-gladiator.gif)
|
19
19
|
|
@@ -45,16 +45,16 @@ Gladiator currently supports the following text editing features (including keyb
|
|
45
45
|
### Navigation Area
|
46
46
|
|
47
47
|
- Show current text editor file name
|
48
|
-
- Show file navigation stats (Caret Position / Line Position / Selection Count / Top Pixel)
|
48
|
+
0- Show file navigation stats (Caret Position / Line Position / Selection Count / Top Pixel)
|
49
49
|
- Jump to Line (CMD+L)
|
50
50
|
- Find & Replace (CMD+F)
|
51
51
|
|
52
52
|
### Menus
|
53
53
|
|
54
54
|
- File Menu:
|
55
|
+
- Open Scratchpad for running arbitrary Ruby/Glimmer code (saves a temporary file to `project_dir/.gladiator-scratchpad`) (CMD+SHIFT+S)
|
55
56
|
- Open Project (CMD+O)
|
56
|
-
- Quit Project (
|
57
|
-
- New Scratchpad for running arbitrary Ruby/Glimmer code without saving to disk (CMD+SHIFT+S)
|
57
|
+
- Quit Project (ALT+F4)
|
58
58
|
- View Menu
|
59
59
|
- Split Pane
|
60
60
|
- Orientation change to Horizontal/Vertical (CMD+SHIFT+O)
|
@@ -78,36 +78,49 @@ Gladiator currently supports the following text editing features (including keyb
|
|
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
|
|
108
|
-
- Mac: Gladiator works best on the Mac. This is the platform it is most used on and receives the most maintenance for.
|
109
|
-
- Windows: Gladiator works
|
110
|
-
- Linux: Gladiator works with handicaps on Linux (performing some text editing operations causes scroll jitter). Contributers could help fix.
|
121
|
+
- Mac: [Gladiator](https://rubygems.org/gems/glimmer-cs-gladiator) works best on the Mac. This is the platform it is most used on and receives the most maintenance for.
|
122
|
+
- Windows: [Gladiator](https://rubygems.org/gems/glimmer-cs-gladiator) works OK on Windows, but has a few annoying issues.
|
123
|
+
- Linux: [Gladiator](https://rubygems.org/gems/glimmer-cs-gladiator) works with handicaps on Linux (performing some text editing operations causes scroll jitter). Contributers could help fix.
|
111
124
|
|
112
125
|
## Pre-requisites
|
113
126
|
|
@@ -117,29 +130,31 @@ Gladiator currently supports the following text editing features (including keyb
|
|
117
130
|
|
118
131
|
## Download
|
119
132
|
|
120
|
-
[Download Gladiator Mac DMG Installer](https://www.dropbox.com/s/
|
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 Windows MSI Installer](https://www.dropbox.com/s/
|
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
|
-
|
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)
|
138
|
+
|
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.
|
125
140
|
|
126
141
|
Otherwise, if you prefer a command line version, then follow the Setup Instructions below.
|
127
142
|
|
128
143
|
## Setup Instructions
|
129
144
|
|
130
|
-
Note: if you encounter any issues, check if they are documented in [TODO.md](TODO.md), [issues](https://github.com/AndyObtiva/glimmer-cs-gladiator/issues), or [pull requests](https://github.com/AndyObtiva/glimmer-cs-gladiator/pulls) as they might be on my radar to fix. Otherwise, please report as an [issue](https://github.com/AndyObtiva/glimmer-cs-gladiator/issues) or better yet fix and submit a [pull request](https://github.com/AndyObtiva/glimmer-cs-gladiator/pulls).
|
145
|
+
Note: if you encounter any issues, check if they are documented in [TODO.md](TODO.md), [issues](https://github.com/AndyObtiva/glimmer-cs-gladiator/issues), or [pull requests](https://github.com/AndyObtiva/glimmer-cs-gladiator/pulls) as they might be on my radar to fix. Otherwise, please report as an [issue](https://github.com/AndyObtiva/glimmer-cs-gladiator/issues) or better yet fix and submit a [pull request](https://github.com/AndyObtiva/glimmer-cs-gladiator/pulls). Also, try going back to a [previous version of the gem](https://rubygems.org/gems/glimmer-cs-gladiator/versions) until you find one that works. Keep in mind this is open-source software provided as is, so there are no guarantees of functionality. If you would like such guarantees, you are welcome to [hire me full-time](https://www.linkedin.com/in/andymaleh/).
|
131
146
|
|
132
|
-
Install Gladiator gem by running (`jgem`, `jruby -S gem`, or `gem` directly if you have [RVM](https://rvm.io/)):
|
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/)):
|
133
148
|
|
134
149
|
```
|
135
|
-
jgem install glimmer-cs-gladiator
|
150
|
+
jgem install glimmer-cs-gladiator -v0.9.3
|
136
151
|
```
|
137
152
|
|
138
153
|
Or add to a JRuby project Bundler `Gemfile` under the `:developement` group:
|
139
154
|
|
140
155
|
```
|
141
156
|
group :development do
|
142
|
-
gem 'glimmer-cs-gladiator'
|
157
|
+
gem 'glimmer-cs-gladiator', '> 0'
|
143
158
|
end
|
144
159
|
```
|
145
160
|
|
@@ -158,6 +173,10 @@ source ~/.gladiator_source
|
|
158
173
|
|
159
174
|
You should be able to run `gladiator` from anywhere now.
|
160
175
|
|
176
|
+
You can pass a project path as a first argument to open a particular project.
|
177
|
+
|
178
|
+
Alternatively, open in app mode (gives you a dialog to open any project) by passing `APP_MODE=true` argument/env-var.
|
179
|
+
|
161
180
|
## Usage
|
162
181
|
|
163
182
|
You may run the `gladiator` command to bring up the text editor in the project directory you would like to edit:
|
@@ -188,11 +207,11 @@ Note: If you cloned this project and bundle installed, you may invoke via `bin/g
|
|
188
207
|
|
189
208
|
### Glimmer Custom Shell Reuse
|
190
209
|
|
191
|
-
To reuse Gladiator as a Glimmer Custom Shell inside another Glimmer application, add the
|
210
|
+
To reuse [Gladiator](https://rubygems.org/gems/glimmer-cs-gladiator) as a Glimmer Custom Shell inside another Glimmer application, add the
|
192
211
|
following to the application's `Gemfile`:
|
193
212
|
|
194
213
|
```
|
195
|
-
gem 'glimmer-cs-gladiator', '
|
214
|
+
gem 'glimmer-cs-gladiator', '~> 0.9.2'
|
196
215
|
```
|
197
216
|
|
198
217
|
Run:
|
@@ -201,11 +220,17 @@ Run:
|
|
201
220
|
jruby -S bundle
|
202
221
|
```
|
203
222
|
|
204
|
-
And, then instantiate the Gladiator [custom shell](https://github.com/AndyObtiva/glimmer-dsl-swt#custom-shells) in your [Glimmer DSL for SWT](https://github.com/AndyObtiva/glimmer-dsl-swt) application via the `gladiator` keyword assuming you already have `include Glimmer` in your class, module, or main object.
|
223
|
+
And, then instantiate the [Gladiator](https://rubygems.org/gems/glimmer-cs-gladiator) [custom shell](https://github.com/AndyObtiva/glimmer-dsl-swt#custom-shells) in your [Glimmer DSL for SWT](https://github.com/AndyObtiva/glimmer-dsl-swt) application via the `gladiator` keyword assuming you already have `include Glimmer` in your class, module, or main object.
|
205
224
|
|
206
225
|
## Env Var Options
|
207
226
|
|
208
|
-
Gladiator
|
227
|
+
[Gladiator](https://rubygems.org/gems/glimmer-cs-gladiator) supports these environment variable options.
|
228
|
+
|
229
|
+
### LOCAL_DIR
|
230
|
+
|
231
|
+
(String / default: `'.'`)
|
232
|
+
|
233
|
+
[Gladiator](https://rubygems.org/gems/glimmer-cs-gladiator) opens with the current directory as the root by default.
|
209
234
|
If you would like to open another directory, set `LOCAL_DIR` environment variable.
|
210
235
|
|
211
236
|
Example:
|
@@ -214,26 +239,51 @@ Example:
|
|
214
239
|
LOCAL_DIR="/Users/User/code" gladiator
|
215
240
|
```
|
216
241
|
|
217
|
-
Opens Gladiator with "/Users/User/code" as the root directory.
|
242
|
+
Opens [Gladiator](https://rubygems.org/gems/glimmer-cs-gladiator) with "/Users/User/code" as the root directory.
|
243
|
+
|
244
|
+
### APP_MODE
|
245
|
+
|
246
|
+
(`true` or `false` / default: `false` from terminal/command-line and `true` from [packaged Gladiator](#download))
|
247
|
+
|
248
|
+
Specifies whether to run in app mode, thus providing a dialog to open any project path instead of starting with a specific project from the get-go.
|
249
|
+
|
250
|
+
Example:
|
251
|
+
|
252
|
+
```
|
253
|
+
APP_MODE=true gladiator
|
254
|
+
```
|
218
255
|
|
219
256
|
## Configuration
|
220
257
|
|
221
|
-
Gladiator automatically saves configuration data in a `.gladiator` file at the directory it is run from. It may be edited to add extra ignore paths.
|
258
|
+
[Gladiator](https://rubygems.org/gems/glimmer-cs-gladiator) automatically saves configuration data in a `.gladiator` file at the directory it is run from. It may be edited to add extra ignore paths.
|
222
259
|
|
223
260
|
It currently remembers:
|
224
261
|
- Last opened files (in both split panes if split)
|
225
262
|
- Window size and position
|
226
263
|
- Ignore Paths under `Glimmer::Gladiator::Dir::IGNORE_PATHS` (default: `['.gladiator', '.git', 'coverage', 'packages', 'node_modules', 'tmp', 'vendor', 'pkg', 'dist']`)
|
227
264
|
|
228
|
-
##
|
265
|
+
## Gotchas
|
266
|
+
|
267
|
+
### Signaling Error
|
229
268
|
|
230
|
-
Gladiator repetitively displays a signaling error that is harmless in practice:
|
269
|
+
[Gladiator](https://rubygems.org/gems/glimmer-cs-gladiator) repetitively displays a signaling error that is harmless in practice:
|
231
270
|
```
|
232
271
|
The signal HUP is in use by the JVM and will not work correctly on this platform
|
233
272
|
The signal INT is in use by the JVM and will not work correctly on this platform
|
234
273
|
The signal TERM is in use by the JVM and will not work correctly on this platform
|
235
274
|
```
|
236
275
|
|
276
|
+
### App Is Not Responding
|
277
|
+
|
278
|
+
If you run the `gladiator` command from the root directory or some parent directory to many projects, it assumes that is
|
279
|
+
the project directory and attempts to pre-load all files (just part of [Gladiator](https://rubygems.org/gems/glimmer-cs-gladiator)'s architectural design and assumptions for optimizing use per project), taking a very long time and not responding for quite a while.
|
280
|
+
|
281
|
+
To avoid this problem, always make sure you are running the `gladiator` command from a single project's directory.
|
282
|
+
|
283
|
+
Also, if you encounter this issue with projects that contain a lot of extra files that you do not need to edit, you
|
284
|
+
could later open the generated `.gladiator` file at the root of the project directory and add unnecessary subdirectories
|
285
|
+
to the `ignore_paths` array.
|
286
|
+
|
237
287
|
## TODO
|
238
288
|
|
239
289
|
[TODO.md](TODO.md)
|
@@ -257,7 +307,7 @@ The signal TERM is in use by the JVM and will not work correctly on this platfor
|
|
257
307
|
|
258
308
|
[MIT](https://opensource.org/licenses/MIT)
|
259
309
|
|
260
|
-
Copyright (c) 2020-
|
310
|
+
Copyright (c) 2020-2022 Andy Maleh. See [LICENSE.txt](LICENSE.txt) for further details.
|
261
311
|
|
262
312
|
--
|
263
313
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.9.3
|
data/bin/gladiator
CHANGED
@@ -1,34 +1,31 @@
|
|
1
|
-
#!/usr/bin/env jruby
|
2
|
-
|
3
|
-
# Copyright (c) 2020-
|
4
|
-
#
|
5
|
-
# Permission is hereby granted, free of charge, to any person obtaining
|
6
|
-
# a copy of this software and associated documentation files (the
|
7
|
-
# "Software"), to deal in the Software without restriction, including
|
8
|
-
# without limitation the rights to use, copy, modify, merge, publish,
|
9
|
-
# distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
-
# permit persons to whom the Software is furnished to do so, subject to
|
11
|
-
# the following conditions:
|
12
|
-
#
|
13
|
-
# The above copyright notice and this permission notice shall be
|
14
|
-
# included in all copies or substantial portions of the Software.
|
15
|
-
#
|
16
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
-
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
-
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
-
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
-
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
-
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
-
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
23
|
-
|
24
|
-
require 'glimmer/launcher'
|
25
|
-
|
26
|
-
gladiator_runner = File.expand_path('../glimmer-cs-gladiator', __FILE__)
|
27
|
-
launcher = Glimmer::Launcher.new([gladiator_runner
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
end
|
33
|
-
end
|
34
|
-
launcher.launch
|
1
|
+
#!/usr/bin/env jruby
|
2
|
+
|
3
|
+
# Copyright (c) 2020-2022 Andy Maleh
|
4
|
+
#
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
# a copy of this software and associated documentation files (the
|
7
|
+
# "Software"), to deal in the Software without restriction, including
|
8
|
+
# without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
# permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
# the following conditions:
|
12
|
+
#
|
13
|
+
# The above copyright notice and this permission notice shall be
|
14
|
+
# included in all copies or substantial portions of the Software.
|
15
|
+
#
|
16
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
23
|
+
|
24
|
+
require 'glimmer/launcher'
|
25
|
+
|
26
|
+
gladiator_runner = File.expand_path('../glimmer-cs-gladiator', __FILE__)
|
27
|
+
launcher = Glimmer::Launcher.new([gladiator_runner] + ARGV)
|
28
|
+
local_dir = ARGV.find {|arg| !arg.include?('=') }
|
29
|
+
local_dir = File.expand_path(local_dir) if local_dir
|
30
|
+
ENV['LOCAL_DIR'] ||= local_dir if local_dir != gladiator_runner
|
31
|
+
launcher.launch
|
data/bin/gladiator-setup
CHANGED
@@ -1,80 +1,80 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
# Copyright (c) 2020-
|
4
|
-
#
|
5
|
-
# Permission is hereby granted, free of charge, to any person obtaining
|
6
|
-
# a copy of this software and associated documentation files (the
|
7
|
-
# "Software"), to deal in the Software without restriction, including
|
8
|
-
# without limitation the rights to use, copy, modify, merge, publish,
|
9
|
-
# distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
-
# permit persons to whom the Software is furnished to do so, subject to
|
11
|
-
# the following conditions:
|
12
|
-
#
|
13
|
-
# The above copyright notice and this permission notice shall be
|
14
|
-
# included in all copies or substantial portions of the Software.
|
15
|
-
#
|
16
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
-
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
-
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
-
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
-
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
-
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
-
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
23
|
-
|
24
|
-
version = File.read(File.expand_path('../VERSION', __dir__))
|
25
|
-
puts "== Gladiator (Glimmer Editor) Version #{version.strip} =="
|
26
|
-
|
27
|
-
ruby = `which jruby`.to_s.strip
|
28
|
-
if ruby.empty?
|
29
|
-
return puts('jruby is not available. Make sure you have jruby installed and available in path environment (or selected if using RVM)')
|
30
|
-
end
|
31
|
-
|
32
|
-
rvm_command = `which rvm`
|
33
|
-
if rvm_command.to_s.strip.empty?
|
34
|
-
command = "#{ruby} #{File.expand_path('../gladiator', __FILE__)}"
|
35
|
-
else
|
36
|
-
rvm = `rvm current`.strip
|
37
|
-
command = "rvm #{rvm} do #{ruby} #{File.expand_path('../gladiator', __FILE__)}"
|
38
|
-
end
|
39
|
-
|
40
|
-
gladiator_script = <<~SHELL_SCRIPT
|
41
|
-
function gladiator()
|
42
|
-
{
|
43
|
-
#{command}
|
44
|
-
}
|
45
|
-
SHELL_SCRIPT
|
46
|
-
|
47
|
-
|
48
|
-
require 'fileutils'
|
49
|
-
home_dir = `echo ~`.strip
|
50
|
-
FileUtils.mkdir_p("#{home_dir}/bin")
|
51
|
-
gladiator_script_file = "#{home_dir}/.gladiator_source"
|
52
|
-
gladiator_script_file_bash = "$HOME/.gladiator_source"
|
53
|
-
File.write(gladiator_script_file, gladiator_script)
|
54
|
-
|
55
|
-
[
|
56
|
-
['.bash_profile', '.bashrc'],
|
57
|
-
['.zprofile', '.zshrc']
|
58
|
-
].each do |profile_and_fallback|
|
59
|
-
shell_profile_file_name = profile_and_fallback.first
|
60
|
-
shell_profile_file_name = profile_and_fallback.last if !File.exist?("#{home_dir}/#{shell_profile_file_name}")
|
61
|
-
shell_profile_file = "#{home_dir}/#{shell_profile_file_name}"
|
62
|
-
FileUtils.touch(shell_profile_file)
|
63
|
-
shell_profile = File.read(shell_profile_file)
|
64
|
-
gladiator_source_statement = "source \"#{gladiator_script_file_bash}\""
|
65
|
-
unless shell_profile.split("\n").detect {|line| line.include?(gladiator_source_statement) }
|
66
|
-
File.write(shell_profile_file, "#{shell_profile}\n#{gladiator_source_statement}")
|
67
|
-
end
|
68
|
-
puts "~/#{shell_profile_file_name} has been modified to source the `gladiator` function from ~/.gladiator_source"
|
69
|
-
end
|
70
|
-
|
71
|
-
puts <<~OUTPUT
|
72
|
-
|
73
|
-
Before using `gladiator`, start a new shell session (open a new terminal tab) or run:
|
74
|
-
|
75
|
-
source ~/.gladiator_source
|
76
|
-
|
77
|
-
Afterwards, you may run the following command from anywhere to start Gladiator (Glimmer Editor):
|
78
|
-
|
79
|
-
gladiator
|
80
|
-
OUTPUT
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# Copyright (c) 2020-2022 Andy Maleh
|
4
|
+
#
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
# a copy of this software and associated documentation files (the
|
7
|
+
# "Software"), to deal in the Software without restriction, including
|
8
|
+
# without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
# permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
# the following conditions:
|
12
|
+
#
|
13
|
+
# The above copyright notice and this permission notice shall be
|
14
|
+
# included in all copies or substantial portions of the Software.
|
15
|
+
#
|
16
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
23
|
+
|
24
|
+
version = File.read(File.expand_path('../VERSION', __dir__))
|
25
|
+
puts "== Gladiator (Glimmer Editor) Version #{version.strip} =="
|
26
|
+
|
27
|
+
ruby = `which jruby`.to_s.strip
|
28
|
+
if ruby.empty?
|
29
|
+
return puts('jruby is not available. Make sure you have jruby installed and available in path environment (or selected if using RVM)')
|
30
|
+
end
|
31
|
+
|
32
|
+
rvm_command = `which rvm`
|
33
|
+
if rvm_command.to_s.strip.empty?
|
34
|
+
command = "#{ruby} #{File.expand_path('../gladiator', __FILE__)}"
|
35
|
+
else
|
36
|
+
rvm = `rvm current`.strip
|
37
|
+
command = "rvm #{rvm} do #{ruby} #{File.expand_path('../gladiator', __FILE__)}"
|
38
|
+
end
|
39
|
+
|
40
|
+
gladiator_script = <<~SHELL_SCRIPT
|
41
|
+
function gladiator()
|
42
|
+
{
|
43
|
+
#{command} $@
|
44
|
+
}
|
45
|
+
SHELL_SCRIPT
|
46
|
+
|
47
|
+
|
48
|
+
require 'fileutils'
|
49
|
+
home_dir = `echo ~`.strip
|
50
|
+
FileUtils.mkdir_p("#{home_dir}/bin")
|
51
|
+
gladiator_script_file = "#{home_dir}/.gladiator_source"
|
52
|
+
gladiator_script_file_bash = "$HOME/.gladiator_source"
|
53
|
+
File.write(gladiator_script_file, gladiator_script)
|
54
|
+
|
55
|
+
[
|
56
|
+
['.bash_profile', '.bashrc'],
|
57
|
+
['.zprofile', '.zshrc']
|
58
|
+
].each do |profile_and_fallback|
|
59
|
+
shell_profile_file_name = profile_and_fallback.first
|
60
|
+
shell_profile_file_name = profile_and_fallback.last if !File.exist?("#{home_dir}/#{shell_profile_file_name}")
|
61
|
+
shell_profile_file = "#{home_dir}/#{shell_profile_file_name}"
|
62
|
+
FileUtils.touch(shell_profile_file)
|
63
|
+
shell_profile = File.read(shell_profile_file)
|
64
|
+
gladiator_source_statement = "source \"#{gladiator_script_file_bash}\""
|
65
|
+
unless shell_profile.split("\n").detect {|line| line.include?(gladiator_source_statement) }
|
66
|
+
File.write(shell_profile_file, "#{shell_profile}\n#{gladiator_source_statement}")
|
67
|
+
end
|
68
|
+
puts "~/#{shell_profile_file_name} has been modified to source the `gladiator` function from ~/.gladiator_source"
|
69
|
+
end
|
70
|
+
|
71
|
+
puts <<~OUTPUT
|
72
|
+
|
73
|
+
Before using `gladiator`, start a new shell session in the same directory (open a new terminal tab and go to the same directory) or run:
|
74
|
+
|
75
|
+
source ~/.gladiator_source
|
76
|
+
|
77
|
+
Afterwards, you may run the following command from anywhere to start Gladiator (Glimmer Editor):
|
78
|
+
|
79
|
+
gladiator
|
80
|
+
OUTPUT
|