Run command.
()
| 87 | |
| 88 | @staticmethod |
| 89 | def run(): |
| 90 | """Run command.""" |
| 91 | info = { |
| 92 | 'platform': sublime.platform(), |
| 93 | 'st_version': sublime.version(), |
| 94 | 'arch': sublime.arch(), |
| 95 | 'package_version': gitgutter_version(), |
| 96 | 'pc_install': is_installed_by_package_control(), |
| 97 | 'git_version': git_version() |
| 98 | } |
| 99 | |
| 100 | try: |
| 101 | import markdown |
| 102 | info['markdown'] = module_version(markdown, 'version') |
| 103 | except ImportError: |
| 104 | info['markdown'] = 'not installed!' |
| 105 | |
| 106 | try: |
| 107 | import mdpopups |
| 108 | info['mdpopups'] = module_version(mdpopups, 'version') |
| 109 | except ImportError: |
| 110 | info['mdpopups'] = 'not installed!' |
| 111 | |
| 112 | try: |
| 113 | import jinja2 |
| 114 | info['jinja'] = module_version(jinja2, '__version__') |
| 115 | except ImportError: |
| 116 | info['jinja'] = 'not installed!' |
| 117 | |
| 118 | try: |
| 119 | import pygments |
| 120 | info['pygments'] = module_version(pygments, '__version__') |
| 121 | except ImportError: |
| 122 | info['pygments'] = 'not installed!' |
| 123 | |
| 124 | msg = textwrap.dedent( |
| 125 | """\ |
| 126 | - Sublime Text %(st_version)s |
| 127 | - Platform: %(platform)s |
| 128 | - Arch: %(arch)s |
| 129 | - GitGutter %(package_version)s |
| 130 | - Install via PC: %(pc_install)s |
| 131 | - %(git_version)s |
| 132 | - mdpopups %(mdpopups)s |
| 133 | - markdown %(markdown)s |
| 134 | - pygments %(pygments)s |
| 135 | - jinja2 %(jinja)s |
| 136 | """ % info |
| 137 | ) |
| 138 | |
| 139 | sublime.message_dialog(msg + '\nInfo has been copied to clipboard.') |
| 140 | sublime.set_clipboard(msg) |
nothing calls this directly
no test coverage detected