Changeset 1481

Show
Ignore:
Timestamp:
07/10/08 18:14:38 (2 months ago)
Author:
rob
Message:

Added JobControlMixin? to FundamentalMode? so that all text modes can use the RunFilter? command
* removed JobControlMixin? from PythonMode? and BashMode?
* added class_storage to MajorMode?
* remember last filter by storing in class_storage

Location:
trunk/peppy
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • trunk/peppy/fundamental.py

    r1462 r1481  
    7777 
    7878class FundamentalMode(FoldExplorerMixin, EditraSTCMixin, 
    79                       PeppySTC, MajorMode): 
     79                      PeppySTC, MajorMode, JobControlMixin): 
    8080    """Major mode for editing generic text files. 
    8181     
  • trunk/peppy/mainmenu.py

    r1471 r1481  
    512512 
    513513    def action(self, index=-1, multiplier=1): 
     514        if self.name in self.mode.class_storage: 
     515            last = self.mode.class_storage[self.name] 
     516        else: 
     517            last = '' 
    514518        minibuffer = TextMinibuffer(self.mode, self, label="Command line:", 
    515                                     initial = self.mode.getScriptArgs()) 
     519                                    initial = last) 
    516520        self.mode.setMinibuffer(minibuffer) 
    517521        self.mode.setStatusText("Enter command line, %s will be replaced by full path to file") 
    518522 
    519523    def processMinibuffer(self, minibuffer, mode, text): 
     524        self.mode.class_storage[self.name] = text 
    520525        self.mode.startCommandLine(text, expand=True) 
    521526 
  • trunk/peppy/major.py

    r1478 r1481  
    410410    # of a superclass.  This is a dict based on the class name. 
    411411    localkeymaps = {} 
    412      
     412 
     413    # Generic storage for all instances of this class 
     414    class_storage = {} 
     415 
    413416    def __init__(self, parent, wrapper, buffer, frame): 
    414417        # set up the view-local versions of classprefs 
  • trunk/peppy/plugins/bash_mode.py

    r1401 r1481  
    1717from peppy.fundamental import FundamentalMode 
    1818 
    19 class BashMode(JobControlMixin, SimpleFoldFunctionMatchMixin, FundamentalMode): 
     19class BashMode(SimpleFoldFunctionMatchMixin, FundamentalMode): 
    2020    """Major mode for editing Bash/KSH/Bourne shell scripts. 
    2121    """ 
  • trunk/peppy/plugins/python_mode.py

    r1478 r1481  
    222222 
    223223 
    224 class PythonMode(JobControlMixin, SimpleFoldFunctionMatchMixin, 
    225                  FundamentalMode): 
     224class PythonMode(SimpleFoldFunctionMatchMixin, FundamentalMode): 
    226225    keyword='Python' 
    227226    icon='icons/py.png'