1 """Base Command class"""
2 from __future__
import absolute_import
, division
, print_function
, unicode_literals
6 """Mixin interface for commands"""
12 """Return the command's name"""
17 """Can this be undone?"""
21 """Execute the command"""
25 """Undo the command"""
29 class ContextCommand(Command
):
30 """Base class for commands that operate on a context"""
32 def __init__(self
, context
):
33 self
.context
= context
34 self
.model
= context
.model
35 self
.cfg
= context
.cfg
36 self
.git
= context
.git
37 self
.selection
= context
.selection
38 self
.fsmonitor
= context
.fsmonitor