glimmer-cs-gladiator 0.6.0 → 0.7.0

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: 686df61b4e15ac85a1cc5d08cb3e83f088bce3a40b2a6e155101f657189075f3
4
- data.tar.gz: 12874887ef0d8a846ef43d5eb89ad2d1ec184fe3d0171a4cf692a1f9348efe61
3
+ metadata.gz: d57a77e5086a7cab8a622d21e6ef4d4089d544e6c8d28f709fb19405523db22e
4
+ data.tar.gz: 8e36f9855229b227658b2873cfece17ea0fd214f447b5cb561d3126f05234f28
5
5
  SHA512:
6
- metadata.gz: 8816804e0a23b860d98b6f583dba265cafac70ce3960b297f5c99dfa6de27d55441c5f959378d4851901e7cf059ec565bdbfc5911c114e8f41e250191f4b27fb
7
- data.tar.gz: 288eccb3f7edbd055d54c0f05d9878a1630c057ca1f7464f7ecb586e5a632d33466197511f0e564900816dbb0b76b3a86ddc743d0fb0d60763a776ef592eb9d2
6
+ metadata.gz: b4795a89aab52db16e32c47b06fdf8800dff22418de7b07c5421704d9be285fdb8c1c230e3d9a068a74aaf85637e7c17a34c74fe3298f75d24c874e6d108b0c9
7
+ data.tar.gz: 8b811a0f1278860b79c334fdebb71eb0c1116e94cfceb028b87e03bc7d06fc904fef4549f789cc6a79e643b2509058268dd6e39623a1823279796d2b4138f5d8
@@ -0,0 +1,233 @@
1
+ # Change Log
2
+
3
+ ## 0.7.0
4
+
5
+ - Upgrade to glimmer-dsl-swt v4.18.0.0
6
+ - Implement sash form for separator between file area and editing area to make resizable
7
+ - Change shortcut for open project from CMD+SHIFT+P to CMD+O
8
+ - Unsplit pane Menu Item / Keyboard Shortcut (CMD+SHIFT+U)
9
+ - Maximize Split Pane Size Menu Item / Keyboard Shortcut (CMD+SHIFT+M)
10
+ - Reset Split Pane Menu Item / Keyboard Shortcut (CMD+SHIFT+M again while maximized or CMD+SHIFT+P to reset split widths)
11
+ - Maximize Editor Menu Item / Keyboard Shortcut (CMD+CTRL+M)
12
+ - Reset Editor Menu Item / Keyboard Shortcut (CMD+CTRL+M again while maximized or CMD+CTRL+R to reset all sizes)
13
+ - Make CMD R and CMD T shortcuts show the file lookup/file explorer if collapsed (just like CMD + F shows navigation area)
14
+ - Display Accelerators (keyboard shortcuts) on Mac Menu Items
15
+ - Show exception dialog on error when invoking Run -> Ruby
16
+ - Fix issue with creating a new directory in a different project from the main one open
17
+ - Fix issue with quitting gladiator when multiple projects are open requiring multiple presses of CMD+Q
18
+
19
+ ## 0.6.4
20
+
21
+ - Ensured Gladiator logo in the about menu has a white background
22
+ - Fixed issue on failing to configure Mac Quit menu item on Windows (restricted code to Mac only)
23
+
24
+ ## 0.6.3
25
+
26
+ - Display Gladiator version in window title
27
+ - Set Gladiator icon on window
28
+ - Fix issue with wording getting reversed when typing at the end of the file
29
+ - Fix issue with not being able to add new lines at the end of the file
30
+ - Fix issue with moving lines down at the end of the file making selection go out of wack
31
+ - Fix issue with Find keyboard shortcut causing a delay before landing in the Find text field
32
+ - Fix transient issue of find_next not jumping properly after replacing a term near the end of the line
33
+ - Fix issue with layout upon split
34
+ - Fix issue with layout upon opening a new tab
35
+ - Fix issue with splitting a file showing in both panes and then unsplitting afterwards detaching data-binding
36
+ - Fix issue with losing changes on exit if I do not focus out on a file
37
+
38
+ ## 0.6.2
39
+
40
+ - Speed up startup time by not truly opening all files beyond showing their tab (till navigated to)
41
+ - Made CMD+F and CMD+L expand navigation section if collapsed
42
+ - Made CMD+R expand file lookup section if collapsed
43
+ - Made CMD+T expand file explorer section if collapsed
44
+ - 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
45
+ - Fix issue with closing a project shell with an x mouse click requiring multiple presses for every tab open
46
+ - Fix issue with inserting new line via CMD+ENTER not maintaining indentation
47
+
48
+ ## 0.6.1
49
+
50
+ - Fixed issue relating to not recording text selection correctly when done by mouse
51
+
52
+ ## 0.6.0
53
+
54
+ - Collapsable File Lookup/File Explorer/Navigation Expand Bars
55
+ - Improve Undo/Redo support by making it work for simple text editing
56
+ - Clear Undo/Redo history for a file upon closing
57
+ - Fix issue with the text editor caret dancing uncontrollably
58
+ - Fix issue with quickly moving multiple lines up or down sometimes splintering and losing multi-line selection
59
+
60
+ ## 0.5.4
61
+
62
+ - CMD+SHIFT+O now splits the Text Editor without requiring Drag & Drop
63
+ - Close open files when deleting their parent directory
64
+ - Make rename refocus on the file renamed in the tree if different from the file being edited
65
+ - Save/Load Config for the Split Orientation
66
+ - Right aligned line numbers in Scratchpad and new files
67
+ - Show a friendly progress message when opening last open files
68
+ - Use SashForm for container/separator of File Lookup List and File Explorer Tree, making them resizable
69
+ - Enhance startup performance by only loading content of last open files
70
+ - Avoid extra writes to open files when no changes occurred
71
+ - Upgrade to glimmer-dsl-swt gem v4.17.10.1
72
+ - Upgrade to clipboard gem v1.3.5
73
+ - Fix issue with over-refreshing directories on focus out and back in
74
+ - Fix glitches with certain single line file operations causing unnecessary text editor scroll jitter
75
+ - Fix issue with creating directories not allowing save/rename
76
+ - 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
77
+ - Fix issue with line numbers not lining up perfectly with code/text lines in non-ruby files
78
+
79
+ ## 0.5.3
80
+
81
+ - Upgraded to glimmer-dsl-swt v4.17.8.3, with performance optimizations for `code_text`
82
+
83
+ ## 0.5.2
84
+
85
+ - Fix issue with file/directory rename not working
86
+ - Fix issue with not renaming tab text when renaming file
87
+ - Fix issue with not closing tab when deleting file
88
+
89
+ ## 0.5.1
90
+
91
+ - Fixed a Windows issue with opening Ruby styled text editors
92
+
93
+ ## 0.5.0
94
+
95
+ - File Menu to allow Opening a Project
96
+ - Scratchpad for running any Ruby/Glimmer code for experimentation/debugging/instrumenting
97
+ - CTRL+A and CTRL+E shortcuts for beginning of line and end of line
98
+ - Minor performance optimization by not syntax highlighting file line numbers (using standard uniform foreground coloring)
99
+ - Fix issue with going back to top of file when CMD+Tabbing to another app (losing focus) and then coming back (gaining focus)
100
+ - Fix tree slow refresh and lost refreshes on directory file changes
101
+ - Fix scroll jitter on move line up/down
102
+ - Fix issue with opening the last file open on both sides of split text editor upon launching Gladiator
103
+ - Fix issue with producing extra space at the end of some lines
104
+ - Fix issue with CMD+4 not working for jumping to the 4th tab
105
+ - Fix issue with keyboard shortcuts triggered in multiple projects
106
+
107
+ ## 0.4.1
108
+
109
+ - Do not enable Ruby syntax highlighting in non-Ruby files
110
+
111
+ ## 0.4.0
112
+
113
+ - Syntax highlighting
114
+ - Run menu with current file menu item
115
+ - View menu with Split Horizontal/Vertical
116
+ - Change split orientation with CMD+SHIFT+O shortcut
117
+ - Run current file shortcut CMD+SHIFT+R
118
+ - Fix issue with line numbers not scrolling perfectly along with open file (off by a few pixels)
119
+ - Fix select-all with code_text
120
+ - Fix tab with code_text
121
+ - Fix caret position after tab with code_text
122
+ - Fix issue with ENTER key not putting caret parallel to previous line start
123
+ - Fix issue with jumping to bottom when doing CMD+] or [ for indent
124
+ - Fix multi-line operations/post-selection with code_text (e.g. comment/uncomment, indent right or left)
125
+ - Fix issue with jumping one line up or down when doing CMD+] or [ for indent
126
+ - Fix CMD+ENTER and CMD+SHIFT+ENTER with code_text
127
+ - Fix Move Line Up or Move Line Down with code_text
128
+ - Fix jumping across pages of code on Find Next with code_text (it stays in the same page)
129
+ - Fix issue with jumping back to beginning of file upon very quick indent/outdent
130
+
131
+ ## 0.3.1
132
+
133
+ - Fixed issue with Find/Replace revisiting the same word after Replace, making it jump to the next one.
134
+ - Add 'vendor' to ignore paths
135
+
136
+ ## 0.3.0
137
+
138
+ - Support Ignore Paths ('packges' and 'tmp' by default) to avoid slowing down editor with irrelevant files
139
+ - Upgrade support to glimmer-dsl-swt 4.17.2.0 up to 5.0.0.0
140
+
141
+ ## 0.2.4
142
+
143
+ - Remember split windows on restart
144
+ - Fix issue with not being able to rename file by hitting ENTER
145
+
146
+ ## 0.2.3
147
+
148
+ - Improved performance of file lookup list and display of directories (removing current local directory from file prefix)
149
+
150
+ ## 0.2.2
151
+
152
+ - Upgraded to glimmer-dsl-swt 0.4.0
153
+
154
+ ## 0.2.1
155
+
156
+ - Drag and Drop Text Editor Split Screen Support (drag from tree or file lookup list)
157
+ - Fix issue with not rendering list and tree sometimes upon opening a small file like VERSION
158
+
159
+ ## 0.2.0
160
+
161
+ - Upgraded to glimmer 0.9.1 / glimmer-dsl-swt 0.1.0
162
+ - Fixed unopen-file related bugs
163
+
164
+ ## 0.1.8
165
+
166
+ - Undo/Redo
167
+ - Case-sensitive Find (and Replace by extension)
168
+ - Make CMD+SHIFT+] at the last tab go to the first tab (and vice versa with CMD+SHIFT+[)
169
+ - Fix Line/Find/Replace actions when no file is open (to avoid crash)
170
+ - Fix issue with file lookup list expanding all the way down, covering the file tree
171
+ - Fix issue with hitting home/end with selection keeping selection instead of removing it
172
+ - Fix issue with crashing if no file was open, no file is found in lookup list, and you attempt to hit enter in keyboard
173
+
174
+ ## 0.1.7
175
+
176
+ - Relaxed Glimmer version requirement
177
+
178
+ ## 0.1.6
179
+
180
+ - Support Linux explicitly (sort of)
181
+ - Make file tree maintain expansion state on refreshes caused by internal & external changes
182
+
183
+ ## 0.1.5
184
+
185
+ - Remember all open text editor tabs when closing and reopening
186
+ - Support closing text editor tabs with keyboard shortcuts (closing current tab, closing all tabs other than current one, closing all tabs)
187
+ - Support prefix new indented line when hitting CMD+SHIFT+ENTER in the middle of a line
188
+ - Make CMD+T auto-select open file in file tree
189
+ - Make gladiator command accept directory argument instead of LOCAL_DIR and automatically open directory passed in
190
+ - Fix rename bug for when focusing out without changing name
191
+ - Fix bug with opening file with ENTER key from file tree
192
+ - Fix issue with changes not persisting when done via find/replace on a newly browsed to tab
193
+
194
+ ## 0.1.4
195
+
196
+ - Fix issue with file explorer tree losing selection on refresh
197
+ - Fix file explorer opening of files on every selection change instead of just hitting ENTER or mouse click
198
+ - 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)
199
+ - Fix issue with top index not being set from config
200
+ - Make file explorer tree show file/directory names not paths
201
+ - Make file explorer tree show current project directory name as the root instead of "."
202
+ - Make file explorer shortcut auto-reveal open file in file explorer tree
203
+ - 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
204
+ - Make hitting ESC button in file explorer go back to open file to the same caret position as before and reselect it
205
+ - Improve file lookup by ignoring dots
206
+ - Add number command + 2-8 tab shortcuts
207
+ - Add a new file through File Explorer
208
+ - Add a new directory through File Explorer
209
+ - Delete a file or directory through File Explorer
210
+ - Support auto-indent on hitting ENTER to add a new line
211
+ - Support insert new indented line when hitting CMD+ENTER in the middle of a line
212
+
213
+ ## 0.1.3
214
+
215
+ - Fix issue with selection getting out of wack when moving a group of lines up or down
216
+ - Fix issue with Find not working for more than one occurrence in a line
217
+ - Fix issue with kill line sometimes jumping to the next line afterwards. Seems to happen if following line is empty
218
+ - Fix issue with line numbers sometimes getting clipped when openig a new file until resizing window
219
+ - Support multiple tabs
220
+ - Support tab keyboard shortcuts for next tab, previous tab, first tab, last tab
221
+ - Remember window size and location
222
+
223
+ ## 0.1.2
224
+
225
+ - Fix issue with file name on top being clipped
226
+ - Fix issue with Find/Replace not working correctly for first line in the file (being off by one character)
227
+
228
+ ## 0.1.1
229
+
230
+ - Fix issue with tab button killing selection (make it indent instead)
231
+ - Fix issue with crashing upon permission denied for opening a file
232
+ - Fix issue with storing .gladiator in running directory instead of LOCAL_DIR when specified
233
+ - 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.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.0 - [Ugliest Text Editor Ever](https://www.reddit.com/r/ruby/comments/hgve8k/gladiator_glimmer_editor_ugliest_text_editor_ever/)
2
2
  ## [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=40 /> Glimmer Custom Shell](https://github.com/AndyObtiva/glimmer-dsl-swt#custom-shell-gem)
3
3
  [![Gem Version](https://badge.fury.io/rb/glimmer-cs-gladiator.svg)](http://badge.fury.io/rb/glimmer-cs-gladiator)
4
4
 
@@ -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.0'
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.
@@ -200,6 +218,6 @@ Copyright (c) 2020 Andy Maleh. See [LICENSE.txt](LICENSE.txt) for further detail
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.0
1
+ 0.7.0
@@ -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.0 ruby lib
6
+
7
+ Gem::Specification.new do |s|
8
+ s.name = "glimmer-cs-gladiator".freeze
9
+ s.version = "0.7.0"
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-11"
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
+
@@ -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