Module: VimMate::Plugin::SubversionFile::InstanceMethods
- Defined in:
- lib/vim_mate/plugins/subversion/lib/file.rb
Instance Method Summary collapse
-
#refresh ⇒ Object
Refresh the file.
-
#status ⇒ Object
Return the status text for this file depending on the file status.
-
#svn_icon ⇒ Object
Return the icon for this file depending on the file status.
Instance Method Details
#refresh ⇒ Object
Refresh the file. If the file status has changed, send a refresh signal
17 18 19 20 21 22 23 24 |
# File 'lib/vim_mate/plugins/subversion/lib/file.rb', line 17 def refresh status = Subversion.status(full_path) if @last_status != status @last_status = status ListedTree.refreshed self end self end |
#status ⇒ Object
Return the status text for this file depending on the file status
53 54 55 |
# File 'lib/vim_mate/plugins/subversion/lib/file.rb', line 53 def status Subversion.status_text(full_path) end |
#svn_icon ⇒ Object
Return the icon for this file depending on the file status
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/vim_mate/plugins/subversion/lib/file.rb', line 28 def svn_icon status = Subversion.status(full_path) if @last_status != status @last_status = status end case status when Subversion::UNVERSIONED, Subversion::EXTERNAL, Subversion::IGNORED, Subversion::UNKNOWN nil when Subversion::NONE, Subversion::NORMAL "svn_normal" when Subversion::ADDED, Subversion::REPLACED 'svn_added' when Subversion::DELETED, Subversion::MISSING 'svn_deleted' when Subversion::MODIFIED 'svn_modified' when Subversion::CONFLICTED 'svn_conflict' when Subversion::MERGED, Subversion::OBSTRUCTED, Subversion::INCOMPLETE 'svn_readonly' # FIXME for now, have no better end end |