Load arguments into plugin and run.
(self, view, name, left, right, selection)
| 169 | return self.enabled |
| 170 | |
| 171 | def run_command(self, view, name, left, right, selection): |
| 172 | """Load arguments into plugin and run.""" |
| 173 | |
| 174 | nobracket = False |
| 175 | refresh_match = False |
| 176 | Payload.status = False |
| 177 | Payload.plugin = self.plugin() |
| 178 | setattr(Payload.plugin, "left", left) |
| 179 | setattr(Payload.plugin, "right", right) |
| 180 | setattr(Payload.plugin, "view", view) |
| 181 | setattr(Payload.plugin, "selection", selection) |
| 182 | setattr(Payload.plugin, "nobracket", False) |
| 183 | setattr(Payload.plugin, "refresh_match", False) |
| 184 | self.args["edit"] = None |
| 185 | self.args["name"] = name |
| 186 | Payload.args = self.args |
| 187 | |
| 188 | # Call a `TextCommand` to run the plugin so it can feed in the `Edit` object |
| 189 | view.run_command("bracket_plugin_run") |
| 190 | |
| 191 | if Payload.status: |
| 192 | left = Payload.plugin.left |
| 193 | right = Payload.plugin.right |
| 194 | selection = Payload.plugin.selection |
| 195 | nobracket = Payload.plugin.nobracket |
| 196 | refresh_match = Payload.plugin.refresh_match |
| 197 | Payload.clear() |
| 198 | |
| 199 | return left, right, selection, nobracket, refresh_match |
| 200 | |
| 201 | |
| 202 | class BracketPluginCommand(object): |
no test coverage detected