glimmer-cs-gladiator 0.6.1 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3b9a2287522769ac69c26758b818fa5a6f6bc67f9dac12b51133f67d3f2fc4fa
4
- data.tar.gz: c9904337e408dcd98ae08fd29a68612a1a02e43bff4b60b076d296849b807f81
3
+ metadata.gz: 42a4c55757f8f11ff94253067439895f7e1c0a1a1ebb3aaaf6d9d1d068ea82eb
4
+ data.tar.gz: d09c688ba5042f0be4489347c6937780b5e06e815d8879499f30c73857a27969
5
5
  SHA512:
6
- metadata.gz: 9437901ac67de9d73faea8c23e75b375144ba09c134e5434aeb1d1a70f320c3265fc0859076b036064d34974d3f819272a660ee8630bf95f151c9ea636d2f33d
7
- data.tar.gz: e02c401d726608a8f6ffbceeb98670bed11d8db002ecc4aebf38f77863842e709bac7cb3739aa4061f52abb7c8bd2259c55333ec1a1b57d6bbf9ef3c3390ee76
6
+ metadata.gz: 6b3d619fbf4ad18ce233d86bfa6fcd902b3865e0177fac7021392354f72a07f0c93c47e70cb066a0e21c4358592f13b2f24dd66123d15c66eb971f6e2941ce57
7
+ data.tar.gz: fa59fa6baab0ef8b35ff6864692739f98a6f515cc63a61320cb12c92141c810364570e880e923e657401e1c56a533d98abbcc89fb609ad02126a9da39ed05e5f
@@ -0,0 +1,241 @@
1
+ # Change Log
2
+
3
+ ## 0.7.1
4
+
5
+ - Update View -> Reset All to also reset the File Lookup/File Explorer Sash Width and the Navigation Bar (expanding it)
6
+ - Fix issue with split, reset split, unsplit, and then split again forgetting the reset for the sash width
7
+ - Ensure closing a single tab moves user back to the previous tab
8
+ - Add pkg to ignore paths
9
+ - Update Reset All menu item to reset splits too
10
+
11
+ ## 0.7.0
12
+
13
+ - Upgrade to glimmer-dsl-swt v4.18.0.0
14
+ - Implement sash form for separator between file area and editing area to make resizable
15
+ - Change shortcut for open project from CMD+SHIFT+P to CMD+O
16
+ - Unsplit pane Menu Item / Keyboard Shortcut (CMD+SHIFT+U)
17
+ - Maximize Split Pane Size Menu Item / Keyboard Shortcut (CMD+SHIFT+M)
18
+ - Reset Split Pane Menu Item / Keyboard Shortcut (CMD+SHIFT+M again while maximized or CMD+SHIFT+P to reset split widths)
19
+ - Maximize Editor Menu Item / Keyboard Shortcut (CMD+CTRL+M)
20
+ - Reset Editor Menu Item / Keyboard Shortcut (CMD+CTRL+M again while maximized or CMD+CTRL+R to reset all sizes)
21
+ - Make CMD R and CMD T shortcuts show the file lookup/file explorer if collapsed (just like CMD + F shows navigation area)
22
+ - Display Accelerators (keyboard shortcuts) on Mac Menu Items
23
+ - Show exception dialog on error when invoking Run -> Ruby
24
+ - Fix issue with creating a new directory in a different project from the main one open
25
+ - Fix issue with quitting gladiator when multiple projects are open requiring multiple presses of CMD+Q
26
+
27
+ ## 0.6.4
28
+
29
+ - Ensured Gladiator logo in the about menu has a white background
30
+ - Fixed issue on failing to configure Mac Quit menu item on Windows (restricted code to Mac only)
31
+
32
+ ## 0.6.3
33
+
34
+ - Display Gladiator version in window title
35
+ - Set Gladiator icon on window
36
+ - Fix issue with wording getting reversed when typing at the end of the file
37
+ - Fix issue with not being able to add new lines at the end of the file
38
+ - Fix issue with moving lines down at the end of the file making selection go out of wack
39
+ - Fix issue with Find keyboard shortcut causing a delay before landing in the Find text field
40
+ - Fix transient issue of find_next not jumping properly after replacing a term near the end of the line
41
+ - Fix issue with layout upon split
42
+ - Fix issue with layout upon opening a new tab
43
+ - Fix issue with splitting a file showing in both panes and then unsplitting afterwards detaching data-binding
44
+ - Fix issue with losing changes on exit if I do not focus out on a file
45
+
46
+ ## 0.6.2
47
+
48
+ - Speed up startup time by not truly opening all files beyond showing their tab (till navigated to)
49
+ - Made CMD+F and CMD+L expand navigation section if collapsed
50
+ - Made CMD+R expand file lookup section if collapsed
51
+ - Made CMD+T expand file explorer section if collapsed
52
+ - 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
53
+ - Fix issue with closing a project shell with an x mouse click requiring multiple presses for every tab open
54
+ - Fix issue with inserting new line via CMD+ENTER not maintaining indentation
55
+
56
+ ## 0.6.1
57
+
58
+ - Fixed issue relating to not recording text selection correctly when done by mouse
59
+
60
+ ## 0.6.0
61
+
62
+ - Collapsable File Lookup/File Explorer/Navigation Expand Bars
63
+ - Improve Undo/Redo support by making it work for simple text editing
64
+ - Clear Undo/Redo history for a file upon closing
65
+ - Fix issue with the text editor caret dancing uncontrollably
66
+ - Fix issue with quickly moving multiple lines up or down sometimes splintering and losing multi-line selection
67
+
68
+ ## 0.5.4
69
+
70
+ - CMD+SHIFT+O now splits the Text Editor without requiring Drag & Drop
71
+ - Close open files when deleting their parent directory
72
+ - Make rename refocus on the file renamed in the tree if different from the file being edited
73
+ - Save/Load Config for the Split Orientation
74
+ - Right aligned line numbers in Scratchpad and new files
75
+ - Show a friendly progress message when opening last open files
76
+ - Use SashForm for container/separator of File Lookup List and File Explorer Tree, making them resizable
77
+ - Enhance startup performance by only loading content of last open files
78
+ - Avoid extra writes to open files when no changes occurred
79
+ - Upgrade to glimmer-dsl-swt gem v4.17.10.1
80
+ - Upgrade to clipboard gem v1.3.5
81
+ - Fix issue with over-refreshing directories on focus out and back in
82
+ - Fix glitches with certain single line file operations causing unnecessary text editor scroll jitter
83
+ - Fix issue with creating directories not allowing save/rename
84
+ - 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
85
+ - Fix issue with line numbers not lining up perfectly with code/text lines in non-ruby files
86
+
87
+ ## 0.5.3
88
+
89
+ - Upgraded to glimmer-dsl-swt v4.17.8.3, with performance optimizations for `code_text`
90
+
91
+ ## 0.5.2
92
+
93
+ - Fix issue with file/directory rename not working
94
+ - Fix issue with not renaming tab text when renaming file
95
+ - Fix issue with not closing tab when deleting file
96
+
97
+ ## 0.5.1
98
+
99
+ - Fixed a Windows issue with opening Ruby styled text editors
100
+
101
+ ## 0.5.0
102
+
103
+ - File Menu to allow Opening a Project
104
+ - Scratchpad for running any Ruby/Glimmer code for experimentation/debugging/instrumenting
105
+ - CTRL+A and CTRL+E shortcuts for beginning of line and end of line
106
+ - Minor performance optimization by not syntax highlighting file line numbers (using standard uniform foreground coloring)
107
+ - Fix issue with going back to top of file when CMD+Tabbing to another app (losing focus) and then coming back (gaining focus)
108
+ - Fix tree slow refresh and lost refreshes on directory file changes
109
+ - Fix scroll jitter on move line up/down
110
+ - Fix issue with opening the last file open on both sides of split text editor upon launching Gladiator
111
+ - Fix issue with producing extra space at the end of some lines
112
+ - Fix issue with CMD+4 not working for jumping to the 4th tab
113
+ - Fix issue with keyboard shortcuts triggered in multiple projects
114
+
115
+ ## 0.4.1
116
+
117
+ - Do not enable Ruby syntax highlighting in non-Ruby files
118
+
119
+ ## 0.4.0
120
+
121
+ - Syntax highlighting
122
+ - Run menu with current file menu item
123
+ - View menu with Split Horizontal/Vertical
124
+ - Change split orientation with CMD+SHIFT+O shortcut
125
+ - Run current file shortcut CMD+SHIFT+R
126
+ - Fix issue with line numbers not scrolling perfectly along with open file (off by a few pixels)
127
+ - Fix select-all with code_text
128
+ - Fix tab with code_text
129
+ - Fix caret position after tab with code_text
130
+ - Fix issue with ENTER key not putting caret parallel to previous line start
131
+ - Fix issue with jumping to bottom when doing CMD+] or [ for indent
132
+ - Fix multi-line operations/post-selection with code_text (e.g. comment/uncomment, indent right or left)
133
+ - Fix issue with jumping one line up or down when doing CMD+] or [ for indent
134
+ - Fix CMD+ENTER and CMD+SHIFT+ENTER with code_text
135
+ - Fix Move Line Up or Move Line Down with code_text
136
+ - Fix jumping across pages of code on Find Next with code_text (it stays in the same page)
137
+ - Fix issue with jumping back to beginning of file upon very quick indent/outdent
138
+
139
+ ## 0.3.1
140
+
141
+ - Fixed issue with Find/Replace revisiting the same word after Replace, making it jump to the next one.
142
+ - Add 'vendor' to ignore paths
143
+
144
+ ## 0.3.0
145
+
146
+ - Support Ignore Paths ('packges' and 'tmp' by default) to avoid slowing down editor with irrelevant files
147
+ - Upgrade support to glimmer-dsl-swt 4.17.2.0 up to 5.0.0.0
148
+
149
+ ## 0.2.4
150
+
151
+ - Remember split windows on restart
152
+ - Fix issue with not being able to rename file by hitting ENTER
153
+
154
+ ## 0.2.3
155
+
156
+ - Improved performance of file lookup list and display of directories (removing current local directory from file prefix)
157
+
158
+ ## 0.2.2
159
+
160
+ - Upgraded to glimmer-dsl-swt 0.4.0
161
+
162
+ ## 0.2.1
163
+
164
+ - Drag and Drop Text Editor Split Screen Support (drag from tree or file lookup list)
165
+ - Fix issue with not rendering list and tree sometimes upon opening a small file like VERSION
166
+
167
+ ## 0.2.0
168
+
169
+ - Upgraded to glimmer 0.9.1 / glimmer-dsl-swt 0.1.0
170
+ - Fixed unopen-file related bugs
171
+
172
+ ## 0.1.8
173
+
174
+ - Undo/Redo
175
+ - Case-sensitive Find (and Replace by extension)
176
+ - Make CMD+SHIFT+] at the last tab go to the first tab (and vice versa with CMD+SHIFT+[)
177
+ - Fix Line/Find/Replace actions when no file is open (to avoid crash)
178
+ - Fix issue with file lookup list expanding all the way down, covering the file tree
179
+ - Fix issue with hitting home/end with selection keeping selection instead of removing it
180
+ - Fix issue with crashing if no file was open, no file is found in lookup list, and you attempt to hit enter in keyboard
181
+
182
+ ## 0.1.7
183
+
184
+ - Relaxed Glimmer version requirement
185
+
186
+ ## 0.1.6
187
+
188
+ - Support Linux explicitly (sort of)
189
+ - Make file tree maintain expansion state on refreshes caused by internal & external changes
190
+
191
+ ## 0.1.5
192
+
193
+ - Remember all open text editor tabs when closing and reopening
194
+ - Support closing text editor tabs with keyboard shortcuts (closing current tab, closing all tabs other than current one, closing all tabs)
195
+ - Support prefix new indented line when hitting CMD+SHIFT+ENTER in the middle of a line
196
+ - Make CMD+T auto-select open file in file tree
197
+ - Make gladiator command accept directory argument instead of LOCAL_DIR and automatically open directory passed in
198
+ - Fix rename bug for when focusing out without changing name
199
+ - Fix bug with opening file with ENTER key from file tree
200
+ - Fix issue with changes not persisting when done via find/replace on a newly browsed to tab
201
+
202
+ ## 0.1.4
203
+
204
+ - Fix issue with file explorer tree losing selection on refresh
205
+ - Fix file explorer opening of files on every selection change instead of just hitting ENTER or mouse click
206
+ - 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)
207
+ - Fix issue with top index not being set from config
208
+ - Make file explorer tree show file/directory names not paths
209
+ - Make file explorer tree show current project directory name as the root instead of "."
210
+ - Make file explorer shortcut auto-reveal open file in file explorer tree
211
+ - 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
212
+ - Make hitting ESC button in file explorer go back to open file to the same caret position as before and reselect it
213
+ - Improve file lookup by ignoring dots
214
+ - Add number command + 2-8 tab shortcuts
215
+ - Add a new file through File Explorer
216
+ - Add a new directory through File Explorer
217
+ - Delete a file or directory through File Explorer
218
+ - Support auto-indent on hitting ENTER to add a new line
219
+ - Support insert new indented line when hitting CMD+ENTER in the middle of a line
220
+
221
+ ## 0.1.3
222
+
223
+ - Fix issue with selection getting out of wack when moving a group of lines up or down
224
+ - Fix issue with Find not working for more than one occurrence in a line
225
+ - Fix issue with kill line sometimes jumping to the next line afterwards. Seems to happen if following line is empty
226
+ - Fix issue with line numbers sometimes getting clipped when openig a new file until resizing window
227
+ - Support multiple tabs
228
+ - Support tab keyboard shortcuts for next tab, previous tab, first tab, last tab
229
+ - Remember window size and location
230
+
231
+ ## 0.1.2
232
+
233
+ - Fix issue with file name on top being clipped
234
+ - Fix issue with Find/Replace not working correctly for first line in the file (being off by one character)
235
+
236
+ ## 0.1.1
237
+
238
+ - Fix issue with tab button killing selection (make it indent instead)
239
+ - Fix issue with crashing upon permission denied for opening a file
240
+ - Fix issue with storing .gladiator in running directory instead of LOCAL_DIR when specified
241
+ - Make entering the file lookup list automatically highlight the first element
@@ -1,4 +1,4 @@
1
- Copyright (c) 2020 Andy Maleh
1
+ Copyright (c) 2020-2021 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
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.6.0 - [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.7.1 - [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
 
@@ -13,6 +13,8 @@ I leave building truly professional text editors to software tooling experts who
13
13
 
14
14
  Gladiator currently supports the following text editing features (including keyboard shortcuts with Mac CMD=CTRL on Windows/Linux)
15
15
 
16
+ ![Gladiator Demo](images/glimmer-gladiator.gif)
17
+
16
18
  ### Text Editor
17
19
 
18
20
  - Text Editor with Colored Ruby Syntax Highlighting
@@ -36,7 +38,7 @@ Gladiator currently supports the following text editing features (including keyb
36
38
  ### File Lookup List Filter
37
39
 
38
40
  - Collapsable file lookup list filter (CMD+R)
39
- - Semi-fuzzy filtering by ignoring slashes, underscores, and dots to ease lookup
41
+ - Semi-fuzzy filtering by ignoring slashes, underscores, and dots to ease lookup
40
42
 
41
43
  ### Navigation Area
42
44
 
@@ -47,8 +49,18 @@ Gladiator currently supports the following text editing features (including keyb
47
49
 
48
50
  ### Menus
49
51
 
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
+ - File Menu:
53
+ - Open Project (CMD+O)
54
+ - Quit Project (CMD+ALT+Q)
55
+ - New Scratchpad for running arbitrary Ruby/Glimmer code without saving to disk (CMD+SHIFT+S)
56
+ - View Menu
57
+ - Split Pane
58
+ - Orientation change to Horizontal/Vertical (CMD+SHIFT+O)
59
+ - Maximize Pane: maximizes current pane in split pane to take entire area (CMD+SHIFT+M)
60
+ - Reset Panes: resets pane sizes if split width/height was adjusted (CMD+SHIFT+P)
61
+ - Unsplit: closes the second pane (CMD+SHIFT+U)
62
+ - Maximize Editor: maximizes editor area to hide file lookup list and file explorer tree (CMD+CTRL+M)
63
+ - Reset All: resizes sizes of all areas in the editor (CMD+CTRL+R)
52
64
  - Run Menu to run Ruby code (CMD+SHIFT+R)
53
65
 
54
66
  ### Watch External Changes
@@ -70,12 +82,14 @@ Gladiator currently supports the following text editing features (including keyb
70
82
 
71
83
  ## Pre-requisites
72
84
 
73
- - [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).
74
- - [JRuby](https://www.jruby.org/download): Same version required by [Glimmer](https://github.com/AndyObtiva/glimmer-dsl-swt)
75
85
  - [JDK](https://www.oracle.com/java/technologies/javase-downloads.html): Same version required by [Glimmer](https://github.com/AndyObtiva/glimmer-dsl-swt)
86
+ - [JRuby](https://www.jruby.org/download): Same version required by [Glimmer](https://github.com/AndyObtiva/glimmer-dsl-swt)
87
+ - [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).
76
88
 
77
89
  ## Setup Instructions
78
90
 
91
+ 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).
92
+
79
93
  Install Gladiator gem by running (`jgem`, `jruby -S gem`, or `gem` directly if you have [RVM](https://rvm.io/)):
80
94
 
81
95
  ```
@@ -136,7 +150,7 @@ To reuse Gladiator as a Glimmer Custom Shell inside another Glimmer application,
136
150
  following to the application's `Gemfile`:
137
151
 
138
152
  ```
139
- gem 'glimmer-cs-gladiator', '~> 0.6.0'
153
+ gem 'glimmer-cs-gladiator', '>= 0.7.1'
140
154
  ```
141
155
 
142
156
  Run:
@@ -182,6 +196,10 @@ The signal TERM is in use by the JVM and will not work correctly on this platfor
182
196
 
183
197
  [TODO.md](TODO.md)
184
198
 
199
+ ## Change Log
200
+
201
+ [CHANGELOG.md](CHANGELOG.md)
202
+
185
203
  ## Contributing to glimmer-cs-gladiator
186
204
 
187
205
  - Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
@@ -196,10 +214,10 @@ The signal TERM is in use by the JVM and will not work correctly on this platfor
196
214
 
197
215
  [MIT](https://opensource.org/licenses/MIT)
198
216
 
199
- Copyright (c) 2020 Andy Maleh. See [LICENSE.txt](LICENSE.txt) for further details.
217
+ Copyright (c) 2020-2021 Andy Maleh. See [LICENSE.txt](LICENSE.txt) for further details.
200
218
 
201
219
  --
202
220
 
203
- [<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)
221
+ [<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)
204
222
 
205
- 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>
223
+ 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.6.1
1
+ 0.7.1
@@ -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.7.1 ruby lib
6
+
7
+ Gem::Specification.new do |s|
8
+ s.name = "glimmer-cs-gladiator".freeze
9
+ s.version = "0.7.1"
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 = "2021-01-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
+ 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 - Text Editor Built in Ruby".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.18.0.0", "< 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.18.0.0", "< 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.18.0.0", "< 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
+
@@ -36,7 +36,7 @@ module Glimmer
36
36
  end
37
37
  self.path = ::File.expand_path(path)
38
38
  @name = ::File.basename(::File.expand_path(path))
39
- @ignore_paths = ['.gladiator', '.git', 'coverage', 'packages', 'node_modules', 'tmp', 'vendor']
39
+ @ignore_paths = ['.gladiator', '.git', 'coverage', 'packages', 'node_modules', 'tmp', 'vendor', 'pkg']
40
40
  self.filtered_path_options = []
41
41
  end
42
42
 
@@ -60,7 +60,7 @@ module Glimmer
60
60
  def name=(the_name)
61
61
  self.display_path = display_path.sub(/#{Regexp.escape(@name)}$/, the_name)
62
62
  @name = the_name
63
- new_path = ::File.expand_path(display_path)
63
+ new_path = @project_dir.nil? ? ::File.expand_path(display_path) : ::File.join(project_dir.path, display_path)
64
64
  FileUtils.mv(path, new_path)
65
65
  self.path = display_path
66
66
  end
@@ -36,10 +36,7 @@ module Glimmer
36
36
  the_dirty_content.split("\n") # test that it is not a binary file (crashes to rescue block otherwise)
37
37
  self.dirty_content = the_dirty_content
38
38
  observe(self, :caret_position) do |new_caret_position|
39
- new_line_number = line_index_for_caret_position(caret_position) + 1
40
- current_line_number = line_number
41
- self.line_number = new_line_number unless current_line_number && current_line_number == new_line_number
42
- self.line_position = caret_position - caret_position_for_line_index(line_number - 1) + 1
39
+ update_line_number_from_caret_position(new_caret_position)
43
40
  end
44
41
  observe(self, :line_number) do |new_line_number|
45
42
  line_index = line_number - 1
@@ -55,6 +52,16 @@ module Glimmer
55
52
  end
56
53
  end
57
54
 
55
+ def update_line_number_from_caret_position(new_caret_position)
56
+ new_line_number = line_index_for_caret_position(caret_position) + 1
57
+ current_line_number = line_number
58
+ unless (current_line_number && current_line_number == new_line_number)
59
+ self.line_number = new_line_number
60
+ # TODO check if the following line is needed
61
+ self.line_position = caret_position - caret_position_for_line_index(line_number - 1) + 1
62
+ end
63
+ end
64
+
58
65
  def path=(the_path)
59
66
  @path = the_path
60
67
  generate_display_path
@@ -134,6 +141,7 @@ module Glimmer
134
141
 
135
142
  def change_content!(value)
136
143
  self.dirty_content = value
144
+ update_line_number_from_caret_position(caret_position)
137
145
  end
138
146
 
139
147
  def start_command
@@ -504,20 +512,20 @@ module Glimmer
504
512
  end
505
513
 
506
514
  def run
507
- begin
508
- if scratchpad?
509
- eval content
510
- else
511
- write_dirty_content
512
- load path
513
- end
514
- rescue SyntaxError, StandardError => e
515
- puts e.full_message
515
+ if scratchpad?
516
+ eval content
517
+ else
518
+ write_dirty_content
519
+ load path
516
520
  end
517
521
  end
518
522
 
519
523
  def lines
520
- dirty_content.split("\n")
524
+ need_padding = dirty_content.to_s.end_with?("\n")
525
+ splittable_content = need_padding ? "#{dirty_content} " : dirty_content
526
+ the_lines = splittable_content.split("\n")
527
+ the_lines[-1] = the_lines[-1].strip if need_padding
528
+ the_lines
521
529
  end
522
530
 
523
531
  def line_for_caret_position(caret_position)
@@ -527,7 +535,7 @@ module Glimmer
527
535
  def line_index_for_caret_position(caret_position)
528
536
  dirty_content[0...caret_position.to_i].count("\n")
529
537
  end
530
-
538
+
531
539
  def caret_position_for_line_index(line_index)
532
540
  cp = lines[0...line_index].join("\n").size
533
541
  cp += 1 if line_index > 0