Permalink
Browse files

Merge remote-tracking branch 'origin/master' into textmate-commands

  • Loading branch information...
2 parents af7662e + 68a4a90 commit dacf436e108e4741a4758d3ba31e1857dd4a0404 @timfel timfel committed Feb 24, 2011
Showing with 681 additions and 718 deletions.
  1. +3 −1 CHANGES
  2. +4 −0 README.md
  3. +5 −1 lib/redcar/installer.rb
  4. +1 −1 lib/redcar/runner.rb
  5. +9 −2 plugins/application/lib/application.rb
  6. +0 −1 plugins/application/lib/application/command/executor.rb
  7. +8 −1 plugins/application/lib/application/commands/{quit_command.rb → application_commands.rb}
  8. +73 −0 plugins/application/lib/application/commands/notebook_commands.rb
  9. +105 −0 plugins/application/lib/application/commands/tab_commands.rb
  10. +117 −0 plugins/application/lib/application/commands/treebook_commands.rb
  11. +33 −0 plugins/application/lib/application/commands/{close_window_command.rb → window_commands.rb}
  12. +0 −4 plugins/{tree/lib → application/lib/application}/tree.rb
  13. 0 plugins/{tree/lib → application/lib/application}/tree/command.rb
  14. 0 plugins/{tree/lib → application/lib/application}/tree/controller.rb
  15. 0 plugins/{tree/lib → application/lib/application}/tree/mirror.rb
  16. +0 −4 plugins/core/lib/core.rb
  17. +2 −4 plugins/core/lib/core/gui.rb
  18. +0 −28 plugins/core/lib/core/logger.rb
  19. +34 −1 plugins/core/lib/core/plugin/storage.rb
  20. +49 −0 plugins/core/spec/core/shared_storage_spec.rb
  21. +1 −0 plugins/edit_view_swt/lib/edit_view_swt.rb
  22. +0 −125 plugins/file_parser/lib/file_parser.rb
  23. +0 −7 plugins/file_parser/plugin.rb
  24. +1 −1 plugins/html_view/lib/html_view.rb
  25. +1 −1 plugins/project/lib/project/commands.rb
  26. +1 −1 plugins/project/lib/project/file_list.rb
  27. +11 −4 plugins/project/lib/project/find_file_dialog.rb
  28. +47 −11 plugins/project/lib/project/manager.rb
  29. +1 −2 plugins/project/plugin.rb
  30. +12 −4 plugins/project_search/lib/project_search.rb
  31. +116 −482 plugins/redcar/redcar.rb
  32. +1 −2 plugins/runnables/plugin.rb
  33. +1 −0 plugins/test_runner/lib/test_runner.rb
  34. +15 −0 plugins/test_runner/lib/test_runner/jasmine_test_runner.rb
  35. +21 −5 plugins/test_runner/lib/test_runner/runnable_test_runner.rb
  36. +0 −2 plugins/textmate/lib/textmate/snippet.rb
  37. +6 −5 plugins/textmate/lib/textmate/tree_mirror.rb
  38. +1 −1 plugins/textmate/plugin.rb
  39. +0 −9 plugins/tree/plugin.rb
  40. +0 −5 plugins/tree/spec/spec_helper.rb
  41. +1 −2 plugins/web_bookmarks/plugin.rb
  42. +1 −1 vendor/java-mateview
View
@@ -11,14 +11,16 @@ Enhancements:
* Which files are hidden in a project is now configurable (Konstantin Haase)
* Added logger at Redcar.log, goes to ~/.redcar/user.log (Dan Lucraft)
* Can hide files and directories from the project context menu (Benedikt Müller)
- * Notification if Redcar doesn't have permission to save files (Benedikt Müller)
+ * Notification if Redcar doesn't have permission to save files (Benedikt Müller & Bill Siggelkow)
* Tweaked the load order to make the window appear faster during startup (Dan Lucraft)
+ * All the plugins use a single preference value to ignore files (Benedikt Müller)
Bugfixes:
* Fixed Unicode problems in DocumentSearch (Tom Murray)
* You can now symlink bin/redcar (Konstantin Haase)
* Runnables are now terminated correctly when the tab is closed (Dan Lucraft)
* You are once again prompted when you close a window with running Runnables in (Dan Lucraft)
+ * Fix encoding issue that broke highlighting when there are multi-byte characters in a line (Dan Lucraft)
Version 0.10 (17 January 2011)
==============================
View
@@ -19,6 +19,10 @@ Some Redcar features:
* syntax checking for many languages
* built in REPLs for Ruby, Groovy, Clojure and Mirah.
+Some (current) limitations:
+
+ * Only supports UTF-8 file encodings (and therefore ASCII)
+
![alt text](http://redcareditor.com/images/redcar-4-thumb.png "Title")
![alt text](http://redcareditor.com/images/redcar-1-thumb.png "Title")
@@ -84,7 +84,11 @@ def assets_by_platform
def fetch_asset(source, target)
relative_target = target || implicit_target(source)
absolute_target = File.join(Redcar.asset_dir, relative_target)
- return if File.exist?(absolute_target)
+ if File.exist?(absolute_target)
+ unless source =~ /dev\.jar/
+ return
+ end
+ end
download_file_to(source, absolute_target)
unzip_file(absolute_target) if absolute_target =~ /\.zip$/
end
@@ -68,7 +68,7 @@ def construct_command(args="")
command = ["java"]
command.push(*java_args)
command.push("-Xbootclasspath/a:#{jruby_complete}")
- command.push("-Xmx320m", "-Xss1024k", "-Djruby.memory.max=320m", "-Djruby.stack.max=1024k", "org.jruby.Main")
+ command.push("-Dfile.encoding=UTF8", "-Xmx320m", "-Xss1024k", "-Djruby.memory.max=320m", "-Djruby.stack.max=1024k", "org.jruby.Main")
command.push "--debug" if debug_mode?
command.push(bin)
command.push(*cleaned_args)
@@ -28,11 +28,18 @@
require 'application/speedbar'
require 'application/tab'
require 'application/tab/command'
+require 'application/tree'
+require 'application/tree/command'
+require 'application/tree/controller'
+require 'application/tree/mirror'
require 'application/treebook'
require 'application/window'
-require 'application/commands/close_window_command'
-require 'application/commands/quit_command'
+require 'application/commands/application_commands'
+require 'application/commands/tab_commands'
+require 'application/commands/notebook_commands'
+require 'application/commands/window_commands'
+require 'application/commands/treebook_commands'
module Redcar
# A Redcar process contains one Application instance. The application instance
@@ -2,7 +2,6 @@
module Redcar
class Command
class Executor
- include Redcar::Core::HasLogger
attr_reader :options, :command_instance
@@ -1,7 +1,6 @@
module Redcar
class Application
class QuitCommand < Command
-
def execute
Redcar.app.call_on_plugins(:quit_guard) do |guard|
return unless guard
@@ -10,5 +9,13 @@ def execute
Redcar.app.quit
end
end
+
+ class ToggleToolbar < Command
+
+ def execute
+ Redcar.app.toggle_show_toolbar
+ Redcar.app.refresh_toolbar!
+ end
+ end
end
end
@@ -0,0 +1,73 @@
+module Redcar
+ class Application
+ class NewNotebookCommand < Command
+
+ def execute
+ win.create_notebook
+ end
+ end
+
+ class EnlargeNotebookCommand < Command
+ sensitize :multiple_notebooks
+
+ def execute
+ if win = Redcar.app.focussed_window
+ win.enlarge_notebook(0)
+ end
+ end
+ end
+
+ class ResetNotebookWidthsCommand < Command
+ sensitize :multiple_notebooks
+
+ def execute
+ if win = Redcar.app.focussed_window
+ win.reset_notebook_widths
+ end
+ end
+ end
+
+ class RotateNotebooksCommand < Command
+ sensitize :multiple_notebooks
+
+ def execute
+ win.rotate_notebooks
+ end
+ end
+
+ class CloseNotebookCommand < Command
+ sensitize :multiple_notebooks
+
+ def execute
+ unless win.notebooks.length == 1
+ win.close_notebook
+ end
+ end
+ end
+
+ class SwitchNotebookCommand < Command
+ sensitize :multiple_notebooks, :other_notebook_has_tab
+
+ def execute
+ new_notebook = win.nonfocussed_notebook
+ if new_notebook.focussed_tab
+ new_notebook.focussed_tab.focus
+ end
+ end
+ end
+
+ class MoveTabToOtherNotebookCommand < Command
+ sensitize :multiple_notebooks, :open_tab
+
+ def execute
+ current_notebook = tab.notebook
+ i = win.notebooks.index current_notebook
+
+ target_notebook = win.notebooks[ (i + 1) % win.notebooks.length ]
+ target_notebook.grab_tab_from(current_notebook, tab)
+ tab.focus
+ end
+ end
+
+ end
+end
@@ -0,0 +1,105 @@
+module Redcar
+ class Application
+
+ class SwitchTabDownCommand < TabCommand
+
+ def execute
+ win.focussed_notebook.switch_down
+ end
+ end
+
+ class SwitchTabUpCommand < TabCommand
+
+ def execute
+ win.focussed_notebook.switch_up
+ end
+ end
+
+ class MoveTabUpCommand < TabCommand
+
+ def execute
+ win.focussed_notebook.move_up
+ end
+ end
+
+ class MoveTabDownCommand < TabCommand
+
+ def execute
+ win.focussed_notebook.move_down
+ end
+ end
+
+ class CloseTabCommand < TabCommand
+ def initialize(tab=nil)
+ @tab = tab
+ end
+
+ def tab
+ @tab || super
+ end
+
+ def execute
+ Redcar.app.call_on_plugins(:close_tab_guard, tab) do |guard|
+ return unless guard
+ end
+ close_tab
+ @tab = nil
+ end
+
+ private
+
+ def close_tab
+ win = tab.notebook.window
+ tab.close
+ # this will break a lot of features:
+ #if win.all_tabs.empty? and not Project::Manager.in_window(win)
+ # win.close
+ #end
+ end
+ end
+
+ class CloseAll < Redcar::Command
+ def execute
+ window = Redcar.app.focussed_window
+ tabs = window.all_tabs
+ tabs.each do |t|
+ CloseTabCommand.new(t).run
+ end
+ end
+ end
+
+ class CloseOthers < Redcar::Command
+ def execute
+ window = Redcar.app.focussed_window
+ current_tab = Redcar.app.focussed_notebook_tab
+ tabs = window.all_tabs
+ tabs.each do |t|
+ unless t == current_tab
+ CloseTabCommand.new(t).run
+ end
+ end
+ end
+ end
+
+ # define commands from SelectTab1Command to SelectTab9Command
+ (1..9).each do |tab_num|
+ const_set("SelectTab#{tab_num}Command", Class.new(Redcar::TabCommand)).class_eval do
+ define_method :execute do
+ notebook = Redcar.app.focussed_window_notebook
+ notebook.tabs[tab_num-1].focus if notebook.tabs[tab_num-1]
+ end
+ end
+ end
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
Oops, something went wrong.

0 comments on commit dacf436

Please sign in to comment.