glimmer-cs-gladiator 0.5.4 → 0.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d31e7dd5189317eaeb3a91a175a050ffaaeb4e82d6c8709167477d26dd7bf237
4
- data.tar.gz: 370a540665a9d7f3d08154f1e98530521f72e9a720f35fa83f982747e2e5bf5e
3
+ metadata.gz: 3cd0eb6cc355224d16ee58053749632dcc0efe0c94911fcb13b9902f179640a7
4
+ data.tar.gz: 9f0d696fb116eb29c10ac749c9107263cecd93013189d56f722ba45e48787508
5
5
  SHA512:
6
- metadata.gz: 7af2ad9407c442ad6634a843ad3b5fc6cac47dadbd84ec0dc0b19f8d38b858950648a951383be811f040232ab426cbf0dffc1ad1d003a33a6a3cefd07d6c6832
7
- data.tar.gz: a9d30dc68de3f7de8fa25c9860c57885892e4ceeea734c63bc4fd2b257736afc0e1b0c7a062d03af93991d03d05907dbfbe058adcf6e13d695ce524167ce5aef
6
+ metadata.gz: 73f6aabe6c03813764d3adfd8f4778467e01b8f7a30710a207f8b05f4b58a87cb85455600f11b652bf61f95fa096a3ed892abf6eb204c0db6311e2a8c85415b8
7
+ data.tar.gz: 3cab30bb643329cc6a3402836d85d48726b11fd4afe6c8d134fe983baba8a3d40eaeccf1fec868631fbe2819a463ff4fcc6c14c656eebe44e67a69d694b0deee
@@ -0,0 +1,217 @@
1
+ # Change Log
2
+
3
+ ## 0.6.4
4
+
5
+ - Ensured Gladiator logo in the about menu has a white background
6
+ - Fixed issue on failing to configure Mac Quit menu item on Windows (restricted code to Mac only)
7
+
8
+ ## 0.6.3
9
+
10
+ - Display Gladiator version in window title
11
+ - Set Gladiator icon on window
12
+ - Fix issue with wording getting reversed when typing at the end of the file
13
+ - Fix issue with not being able to add new lines at the end of the file
14
+ - Fix issue with moving lines down at the end of the file making selection go out of wack
15
+ - Fix issue with Find keyboard shortcut causing a delay before landing in the Find text field
16
+ - Fix transient issue of find_next not jumping properly after replacing a term near the end of the line
17
+ - Fix issue with layout upon split
18
+ - Fix issue with layout upon opening a new tab
19
+ - Fix issue with splitting a file showing in both panes and then unsplitting afterwards detaching data-binding
20
+ - Fix issue with losing changes on exit if I do not focus out on a file
21
+
22
+ ## 0.6.2
23
+
24
+ - Speed up startup time by not truly opening all files beyond showing their tab (till navigated to)
25
+ - Made CMD+F and CMD+L expand navigation section if collapsed
26
+ - Made CMD+R expand file lookup section if collapsed
27
+ - Made CMD+T expand file explorer section if collapsed
28
+ - Fix this issue: Type till the end of the line. Hit CMD+SHIFT+ENTER to jump to the previous line while inserting a line. It jumps to the next line instead as if I did CMD+ENTER
29
+ - Fix issue with closing a project shell with an x mouse click requiring multiple presses for every tab open
30
+ - Fix issue with inserting new line via CMD+ENTER not maintaining indentation
31
+
32
+ ## 0.6.1
33
+
34
+ - Fixed issue relating to not recording text selection correctly when done by mouse
35
+
36
+ ## 0.6.0
37
+
38
+ - Collapsable File Lookup/File Explorer/Navigation Expand Bars
39
+ - Improve Undo/Redo support by making it work for simple text editing
40
+ - Clear Undo/Redo history for a file upon closing
41
+ - Fix issue with the text editor caret dancing uncontrollably
42
+ - Fix issue with quickly moving multiple lines up or down sometimes splintering and losing multi-line selection
43
+
44
+ ## 0.5.4
45
+
46
+ - CMD+SHIFT+O now splits the Text Editor without requiring Drag & Drop
47
+ - Close open files when deleting their parent directory
48
+ - Make rename refocus on the file renamed in the tree if different from the file being edited
49
+ - Save/Load Config for the Split Orientation
50
+ - Right aligned line numbers in Scratchpad and new files
51
+ - Show a friendly progress message when opening last open files
52
+ - Use SashForm for container/separator of File Lookup List and File Explorer Tree, making them resizable
53
+ - Enhance startup performance by only loading content of last open files
54
+ - Avoid extra writes to open files when no changes occurred
55
+ - Upgrade to glimmer-dsl-swt gem v4.17.10.1
56
+ - Upgrade to clipboard gem v1.3.5
57
+ - Fix issue with over-refreshing directories on focus out and back in
58
+ - Fix glitches with certain single line file operations causing unnecessary text editor scroll jitter
59
+ - Fix issue with creating directories not allowing save/rename
60
+ - Fix issue with crashing when closing a file and then trying to delete another file from the tree (might happen if you try to rename closed file) says getData returned nil
61
+ - Fix issue with line numbers not lining up perfectly with code/text lines in non-ruby files
62
+
63
+ ## 0.5.3
64
+
65
+ - Upgraded to glimmer-dsl-swt v4.17.8.3, with performance optimizations for `code_text`
66
+
67
+ ## 0.5.2
68
+
69
+ - Fix issue with file/directory rename not working
70
+ - Fix issue with not renaming tab text when renaming file
71
+ - Fix issue with not closing tab when deleting file
72
+
73
+ ## 0.5.1
74
+
75
+ - Fixed a Windows issue with opening Ruby styled text editors
76
+
77
+ ## 0.5.0
78
+
79
+ - File Menu to allow Opening a Project
80
+ - Scratchpad for running any Ruby/Glimmer code for experimentation/debugging/instrumenting
81
+ - CTRL+A and CTRL+E shortcuts for beginning of line and end of line
82
+ - Minor performance optimization by not syntax highlighting file line numbers (using standard uniform foreground coloring)
83
+ - Fix issue with going back to top of file when CMD+Tabbing to another app (losing focus) and then coming back (gaining focus)
84
+ - Fix tree slow refresh and lost refreshes on directory file changes
85
+ - Fix scroll jitter on move line up/down
86
+ - Fix issue with opening the last file open on both sides of split text editor upon launching Gladiator
87
+ - Fix issue with producing extra space at the end of some lines
88
+ - Fix issue with CMD+4 not working for jumping to the 4th tab
89
+ - Fix issue with keyboard shortcuts triggered in multiple projects
90
+
91
+ ## 0.4.1
92
+
93
+ - Do not enable Ruby syntax highlighting in non-Ruby files
94
+
95
+ ## 0.4.0
96
+
97
+ - Syntax highlighting
98
+ - Run menu with current file menu item
99
+ - View menu with Split Horizontal/Vertical
100
+ - Change split orientation with CMD+SHIFT+O shortcut
101
+ - Run current file shortcut CMD+SHIFT+R
102
+ - Fix issue with line numbers not scrolling perfectly along with open file (off by a few pixels)
103
+ - Fix select-all with code_text
104
+ - Fix tab with code_text
105
+ - Fix caret position after tab with code_text
106
+ - Fix issue with ENTER key not putting caret parallel to previous line start
107
+ - Fix issue with jumping to bottom when doing CMD+] or [ for indent
108
+ - Fix multi-line operations/post-selection with code_text (e.g. comment/uncomment, indent right or left)
109
+ - Fix issue with jumping one line up or down when doing CMD+] or [ for indent
110
+ - Fix CMD+ENTER and CMD+SHIFT+ENTER with code_text
111
+ - Fix Move Line Up or Move Line Down with code_text
112
+ - Fix jumping across pages of code on Find Next with code_text (it stays in the same page)
113
+ - Fix issue with jumping back to beginning of file upon very quick indent/outdent
114
+
115
+ ## 0.3.1
116
+
117
+ - Fixed issue with Find/Replace revisiting the same word after Replace, making it jump to the next one.
118
+ - Add 'vendor' to ignore paths
119
+
120
+ ## 0.3.0
121
+
122
+ - Support Ignore Paths ('packges' and 'tmp' by default) to avoid slowing down editor with irrelevant files
123
+ - Upgrade support to glimmer-dsl-swt 4.17.2.0 up to 5.0.0.0
124
+
125
+ ## 0.2.4
126
+
127
+ - Remember split windows on restart
128
+ - Fix issue with not being able to rename file by hitting ENTER
129
+
130
+ ## 0.2.3
131
+
132
+ - Improved performance of file lookup list and display of directories (removing current local directory from file prefix)
133
+
134
+ ## 0.2.2
135
+
136
+ - Upgraded to glimmer-dsl-swt 0.4.0
137
+
138
+ ## 0.2.1
139
+
140
+ - Drag and Drop Text Editor Split Screen Support (drag from tree or file lookup list)
141
+ - Fix issue with not rendering list and tree sometimes upon opening a small file like VERSION
142
+
143
+ ## 0.2.0
144
+
145
+ - Upgraded to glimmer 0.9.1 / glimmer-dsl-swt 0.1.0
146
+ - Fixed unopen-file related bugs
147
+
148
+ ## 0.1.8
149
+
150
+ - Undo/Redo
151
+ - Case-sensitive Find (and Replace by extension)
152
+ - Make CMD+SHIFT+] at the last tab go to the first tab (and vice versa with CMD+SHIFT+[)
153
+ - Fix Line/Find/Replace actions when no file is open (to avoid crash)
154
+ - Fix issue with file lookup list expanding all the way down, covering the file tree
155
+ - Fix issue with hitting home/end with selection keeping selection instead of removing it
156
+ - Fix issue with crashing if no file was open, no file is found in lookup list, and you attempt to hit enter in keyboard
157
+
158
+ ## 0.1.7
159
+
160
+ - Relaxed Glimmer version requirement
161
+
162
+ ## 0.1.6
163
+
164
+ - Support Linux explicitly (sort of)
165
+ - Make file tree maintain expansion state on refreshes caused by internal & external changes
166
+
167
+ ## 0.1.5
168
+
169
+ - Remember all open text editor tabs when closing and reopening
170
+ - Support closing text editor tabs with keyboard shortcuts (closing current tab, closing all tabs other than current one, closing all tabs)
171
+ - Support prefix new indented line when hitting CMD+SHIFT+ENTER in the middle of a line
172
+ - Make CMD+T auto-select open file in file tree
173
+ - Make gladiator command accept directory argument instead of LOCAL_DIR and automatically open directory passed in
174
+ - Fix rename bug for when focusing out without changing name
175
+ - Fix bug with opening file with ENTER key from file tree
176
+ - Fix issue with changes not persisting when done via find/replace on a newly browsed to tab
177
+
178
+ ## 0.1.4
179
+
180
+ - Fix issue with file explorer tree losing selection on refresh
181
+ - Fix file explorer opening of files on every selection change instead of just hitting ENTER or mouse click
182
+ - Fix issue with refreshing the tree on every tab switch after making changes (make it check if change is coming from any of all tabs)
183
+ - Fix issue with top index not being set from config
184
+ - Make file explorer tree show file/directory names not paths
185
+ - Make file explorer tree show current project directory name as the root instead of "."
186
+ - Make file explorer shortcut auto-reveal open file in file explorer tree
187
+ - Make hitting ESC button in line number field, file lookup field, find field, or replace field go back to open file to the same caret position as before
188
+ - Make hitting ESC button in file explorer go back to open file to the same caret position as before and reselect it
189
+ - Improve file lookup by ignoring dots
190
+ - Add number command + 2-8 tab shortcuts
191
+ - Add a new file through File Explorer
192
+ - Add a new directory through File Explorer
193
+ - Delete a file or directory through File Explorer
194
+ - Support auto-indent on hitting ENTER to add a new line
195
+ - Support insert new indented line when hitting CMD+ENTER in the middle of a line
196
+
197
+ ## 0.1.3
198
+
199
+ - Fix issue with selection getting out of wack when moving a group of lines up or down
200
+ - Fix issue with Find not working for more than one occurrence in a line
201
+ - Fix issue with kill line sometimes jumping to the next line afterwards. Seems to happen if following line is empty
202
+ - Fix issue with line numbers sometimes getting clipped when openig a new file until resizing window
203
+ - Support multiple tabs
204
+ - Support tab keyboard shortcuts for next tab, previous tab, first tab, last tab
205
+ - Remember window size and location
206
+
207
+ ## 0.1.2
208
+
209
+ - Fix issue with file name on top being clipped
210
+ - Fix issue with Find/Replace not working correctly for first line in the file (being off by one character)
211
+
212
+ ## 0.1.1
213
+
214
+ - Fix issue with tab button killing selection (make it indent instead)
215
+ - Fix issue with crashing upon permission denied for opening a file
216
+ - Fix issue with storing .gladiator in running directory instead of LOCAL_DIR when specified
217
+ - Make entering the file lookup list automatically highlight the first element
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.5.4 - [Ugliest Text Editor Ever](https://www.reddit.com/r/ruby/comments/hgve8k/gladiator_glimmer_editor_ugliest_text_editor_ever/)
1
+ # <img src='https://raw.githubusercontent.com/AndyObtiva/glimmer-cs-gladiator/master/images/glimmer-cs-gladiator-logo.svg' height=85 /> Gladiator 0.6.4 - [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
 
@@ -11,21 +11,14 @@ I leave building truly professional text editors to software tooling experts who
11
11
 
12
12
  ## Features
13
13
 
14
- Gladiator currently supports the following text editing features (including keyboard shortcuts with Mac CMD=CTRL on Windows/Linux):
15
- - Ruby Syntax Highlighting with colors
16
- - Open Project from File Menu (CMD+SHIFT+P)
17
- - Scratchpad for running arbitrary Ruby/Glimmer code without saving to disk (CMD+SHIFT+S)
18
- - Run Ruby code (CMD+SHIFT+R)
19
- - File explorer navigation with context menu to open file, rename, delete, add new file, add new directory, or refresh tree (CMD+T)
20
- - File lookup by name ignoring slashes, underscores, and dots to ease lookup (CMD+R)
21
- - Watch open file for external changes to automatically refresh in editor
22
- - Watch project subdirectories for changes to automatically refresh in file explorer/file lookup
23
- - Find & Replace (CMD+F)
14
+ Gladiator currently supports the following text editing features (including keyboard shortcuts with Mac CMD=CTRL on Windows/Linux)
15
+
16
+ ### Text Editor
17
+
18
+ - Text Editor with Colored Ruby Syntax Highlighting
24
19
  - Show Line Numbers
25
- - Jump to Line (CMD+L)
26
- - Multiple tab support (CMD+SHIFT+[ & CMD+SHIFT+] for tab navigation. CMD+1-9 to jump to a specific tab)
27
- - Remember opened tabs, caret position, top line, window size, and window location
28
- - Autosave on focus out/quit/open new file
20
+ - Multi-tab support (CMD+SHIFT+[ & CMD+SHIFT+] for tab navigation. CMD+1-9 to jump to a specific tab)
21
+ - Drag and drop split pane (drag a file from File Tree or File Lookup List, and it splits the pane)
29
22
  - Duplicate Line(s)/selection (CMD+D)
30
23
  - Kill Line(s)/selection (CMD+K)
31
24
  - Move line/selection up (CMD+UP)
@@ -33,8 +26,41 @@ Gladiator currently supports the following text editing features (including keyb
33
26
  - Comment/Uncomment line/selection (CMD+/)
34
27
  - Indent/Unindent line/selection (CMD+] & CMD+[)
35
28
  - Insert/Prefix New Line (CMD+ENTER & CMD+SHIFT+ENTER)
36
- - Split Pane & Change Split Orientation to Horizontal/Vertical via View Menu (CMD+SHIFT+O)
37
- - Drag and Drop Text Editor Split Screen (drag a file from File Tree or File Lookup List, and it splits the pane)
29
+
30
+ ### File Explorer Tree
31
+
32
+ - Collapsable file explorer tree listing files and directories for open project
33
+ - Context menu to open file, rename, delete, add new file, add new directory, and refresh tree
34
+ - Jump to open file in tree (CMD+T)
35
+
36
+ ### File Lookup List Filter
37
+
38
+ - Collapsable file lookup list filter (CMD+R)
39
+ - Semi-fuzzy filtering by ignoring slashes, underscores, and dots to ease lookup
40
+
41
+ ### Navigation Area
42
+
43
+ - Show current text editor file name
44
+ - Show file navigation stats (Caret Position / Line Position / Selection Count / Top Pixel)
45
+ - Jump to Line (CMD+L)
46
+ - Find & Replace (CMD+F)
47
+
48
+ ### Menus
49
+
50
+ - File Menu to Open Project (CMD+SHIFT+P) and open Scratchpad for running arbitrary Ruby/Glimmer code without saving to disk (CMD+SHIFT+S)
51
+ - View Menu to Split Pane & Change Split Orientation to Horizontal/Vertical (CMD+SHIFT+O)
52
+ - Run Menu to run Ruby code (CMD+SHIFT+R)
53
+
54
+ ### Watch External Changes
55
+
56
+ - Watch open file for external changes to automatically refresh in editor
57
+ - Watch project subdirectories for changes to automatically refresh in file explorer/file lookup
58
+
59
+ ### Automatic Data Management
60
+
61
+ - Autosave on focus out/quit/open new file
62
+ - Remember opened tabs, caret position, top pixel, window size, and window location
63
+ - [Default](#configuration) "ignore paths" to avoid bogging down editor with irrelevant directory files
38
64
 
39
65
  ## Platforms
40
66
 
@@ -44,12 +70,14 @@ Gladiator currently supports the following text editing features (including keyb
44
70
 
45
71
  ## Pre-requisites
46
72
 
47
- - [Glimmer DSL for SWT](https://github.com/AndyObtiva/glimmer-dsl-swt) (JRuby Desktop Development GUI Library): '>= 4.17.2.0', '< 5.0.0.0' (dependency included in Ruby gem).
73
+ - [Glimmer DSL for SWT](https://github.com/AndyObtiva/glimmer-dsl-swt) (JRuby Desktop Development GUI Framework): '>= 4.17.2.0', '< 5.0.0.0' (dependency included in Ruby gem).
48
74
  - [JRuby](https://www.jruby.org/download): Same version required by [Glimmer](https://github.com/AndyObtiva/glimmer-dsl-swt)
49
75
  - [JDK](https://www.oracle.com/java/technologies/javase-downloads.html): Same version required by [Glimmer](https://github.com/AndyObtiva/glimmer-dsl-swt)
50
76
 
51
77
  ## Setup Instructions
52
78
 
79
+ 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).
80
+
53
81
  Install Gladiator gem by running (`jgem`, `jruby -S gem`, or `gem` directly if you have [RVM](https://rvm.io/)):
54
82
 
55
83
  ```
@@ -110,7 +138,7 @@ To reuse Gladiator as a Glimmer Custom Shell inside another Glimmer application,
110
138
  following to the application's `Gemfile`:
111
139
 
112
140
  ```
113
- gem 'glimmer-cs-gladiator', '~> 0.5.4'
141
+ gem 'glimmer-cs-gladiator', '>= 0.6.4'
114
142
  ```
115
143
 
116
144
  Run:
@@ -136,7 +164,7 @@ Opens Gladiator with "/Users/User/code" as the root directory.
136
164
 
137
165
  ## Configuration
138
166
 
139
- Gladiator automatically saves configuration data in a `.gladiator` file at the directory it is run from.
167
+ 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.
140
168
 
141
169
  It currently remembers:
142
170
  - Last opened files (in both split panes if split)
@@ -156,6 +184,10 @@ The signal TERM is in use by the JVM and will not work correctly on this platfor
156
184
 
157
185
  [TODO.md](TODO.md)
158
186
 
187
+ ## Change Log
188
+
189
+ [CHANGELOG.md](CHANGELOG.md)
190
+
159
191
  ## Contributing to glimmer-cs-gladiator
160
192
 
161
193
  - Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
@@ -174,6 +206,6 @@ Copyright (c) 2020 Andy Maleh. See [LICENSE.txt](LICENSE.txt) for further detail
174
206
 
175
207
  --
176
208
 
177
- [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=40 />](https://github.com/AndyObtiva/glimmer) Built with [Glimmer DSL for SWT](https://github.com/AndyObtiva/glimmer-dsl-swt) (JRuby Desktop Development GUI Library)
209
+ [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=40 />](https://github.com/AndyObtiva/glimmer) Built with [Glimmer DSL for SWT](https://github.com/AndyObtiva/glimmer-dsl-swt) (JRuby Desktop Development GUI Framework)
178
210
 
179
211
  Gladiator icon made by <a href="https://www.flaticon.com/authors/freepik" title="Freepik">Freepik</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a>
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.4
1
+ 0.6.4
@@ -0,0 +1,70 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+ # stub: glimmer-cs-gladiator 0.6.4 ruby lib
6
+
7
+ Gem::Specification.new do |s|
8
+ s.name = "glimmer-cs-gladiator".freeze
9
+ s.version = "0.6.4"
10
+
11
+ s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
+ s.require_paths = ["lib".freeze]
13
+ s.authors = ["Andy Maleh".freeze]
14
+ s.date = "2020-12-30"
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
+ s.email = "andy.am@gmail.com".freeze
17
+ s.executables = ["gladiator".freeze]
18
+ s.extra_rdoc_files = [
19
+ "LICENSE.txt",
20
+ "README.md"
21
+ ]
22
+ s.files = [
23
+ "CHANGELOG.md",
24
+ "LICENSE.txt",
25
+ "README.md",
26
+ "VERSION",
27
+ "bin/gladiator",
28
+ "bin/gladiator_runner.rb",
29
+ "glimmer-cs-gladiator.gemspec",
30
+ "images/glimmer-cs-gladiator-logo.png",
31
+ "lib/glimmer-cs-gladiator.rb",
32
+ "lib/models/glimmer/gladiator/command.rb",
33
+ "lib/models/glimmer/gladiator/dir.rb",
34
+ "lib/models/glimmer/gladiator/file.rb",
35
+ "lib/views/glimmer/gladiator.rb",
36
+ "lib/views/glimmer/gladiator/text_editor.rb"
37
+ ]
38
+ s.homepage = "http://github.com/AndyObtiva/glimmer-cs-gladiator".freeze
39
+ s.licenses = ["MIT".freeze]
40
+ s.rubygems_version = "3.0.6".freeze
41
+ s.summary = "Gladiator (Glimmer Editor) - Glimmer Custom Shell".freeze
42
+
43
+ if s.respond_to? :specification_version then
44
+ s.specification_version = 4
45
+
46
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
47
+ s.add_runtime_dependency(%q<glimmer-dsl-swt>.freeze, [">= 4.17.10.3", "< 5.0.0.0"])
48
+ s.add_runtime_dependency(%q<filewatcher>.freeze, ["~> 1.1.1"])
49
+ s.add_runtime_dependency(%q<clipboard>.freeze, ["~> 1.3.5"])
50
+ s.add_development_dependency(%q<rspec>.freeze, ["~> 3.5.0"])
51
+ s.add_development_dependency(%q<jeweler>.freeze, ["= 2.3.9"])
52
+ s.add_development_dependency(%q<simplecov>.freeze, [">= 0"])
53
+ else
54
+ s.add_dependency(%q<glimmer-dsl-swt>.freeze, [">= 4.17.10.3", "< 5.0.0.0"])
55
+ s.add_dependency(%q<filewatcher>.freeze, ["~> 1.1.1"])
56
+ s.add_dependency(%q<clipboard>.freeze, ["~> 1.3.5"])
57
+ s.add_dependency(%q<rspec>.freeze, ["~> 3.5.0"])
58
+ s.add_dependency(%q<jeweler>.freeze, ["= 2.3.9"])
59
+ s.add_dependency(%q<simplecov>.freeze, [">= 0"])
60
+ end
61
+ else
62
+ s.add_dependency(%q<glimmer-dsl-swt>.freeze, [">= 4.17.10.3", "< 5.0.0.0"])
63
+ s.add_dependency(%q<filewatcher>.freeze, ["~> 1.1.1"])
64
+ s.add_dependency(%q<clipboard>.freeze, ["~> 1.3.5"])
65
+ s.add_dependency(%q<rspec>.freeze, ["~> 3.5.0"])
66
+ s.add_dependency(%q<jeweler>.freeze, ["= 2.3.9"])
67
+ s.add_dependency(%q<simplecov>.freeze, [">= 0"])
68
+ end
69
+ end
70
+
@@ -1,6 +1,8 @@
1
1
  module Glimmer
2
2
  class Gladiator
3
3
  class Command
4
+ include Glimmer
5
+
4
6
  class << self
5
7
  include Glimmer
6
8
 
@@ -13,11 +15,18 @@ module Glimmer
13
15
  command_history[file] ||= [Command.new(file)]
14
16
  end
15
17
 
16
- def do(file, method = nil, command: nil)
17
- command ||= Command.new(file, method)
18
- command_history_for(file)&.last&.next_command = command
19
- command.do
20
- command_history_for(file) << command
18
+ def do(file, method = nil, *args, command: nil)
19
+ if command.nil?
20
+ command ||= Command.new(file, method, *args)
21
+ command.previous_command = command_history_for(file).last
22
+ unless command_history_for(file).last.method == :change_content! && method == :change_content!
23
+ command_history_for(file).last.next_command = command
24
+ end
25
+ command.do
26
+ command_history_for(file) << command unless command_history_for(file).last.method == :change_content! && method == :change_content!
27
+ else
28
+ command_history_for(file) << command
29
+ end
21
30
  end
22
31
 
23
32
  def undo(file)
@@ -30,15 +39,22 @@ module Glimmer
30
39
  command = command_history_for(file).last
31
40
  command&.redo
32
41
  end
42
+
43
+ def clear(file)
44
+ command_history[file] = [Command.new(file)]
45
+ end
33
46
  end
34
47
 
35
- attr_accessor :file, :method, :next_command, :previous_file_content, :previous_file_caret_position, :previous_file_selection_count
48
+ attr_accessor :file, :method, :args, :previous_command, :next_command,
49
+ :file_dirty_content, :file_caret_position, :file_selection_count, :previous_file_dirty_content, :previous_file_caret_position, :previous_file_selection_count
36
50
 
37
- def initialize(file, method = nil)
51
+ def initialize(file, method = nil, *args)
38
52
  @file = file
39
53
  @method = method
54
+ @args = args
40
55
  end
41
56
 
57
+
42
58
  def native?
43
59
  @method.nil?
44
60
  end
@@ -56,6 +72,9 @@ module Glimmer
56
72
 
57
73
  def redo
58
74
  return if next_command.nil?# || next_command.native?
75
+ @file.dirty_content = next_command.file_dirty_content.clone
76
+ @file.caret_position = next_command.file_caret_position
77
+ @file.selection_count = next_command.file_selection_count
59
78
  Command.do(next_command.file, command: next_command)
60
79
  end
61
80
 
@@ -63,6 +82,10 @@ module Glimmer
63
82
  @previous_file_dirty_content = @file.dirty_content.clone
64
83
  @previous_file_caret_position = @file.caret_position
65
84
  @previous_file_selection_count = @file.selection_count
85
+ if @method == :change_content!
86
+ @previous_file_caret_position = @file.last_caret_position
87
+ @previous_file_selection_count = @file.last_selection_count
88
+ end
66
89
  end
67
90
 
68
91
  def restore
@@ -72,7 +95,17 @@ module Glimmer
72
95
  end
73
96
 
74
97
  def execute
75
- @file.send(@method)
98
+ @file.start_command
99
+ @file.send(@method, *@args)
100
+ @file.end_command
101
+ @file_dirty_content = @file.dirty_content.clone
102
+ @file_caret_position = @file.caret_position
103
+ @file_selection_count = @file.selection_count
104
+ if previous_command.method == :change_content! && @method == :change_content!
105
+ previous_command.file_dirty_content = @file_dirty_content
106
+ previous_command.file_caret_position = @file_caret_position
107
+ previous_command.file_selection_count = @file_selection_count
108
+ end
76
109
  end
77
110
  end
78
111
  end