Exemplo n.º 1
0
    def __init__(self, parent, model):
        CloseableViewMix.__init__(self, _('compare results'))
        ListCtrlView.__init__(self, parent, model, wx.LC_REPORT,
          ( ('Do diff', self.OnGoto, self.gotoLineBmp, ''), ) +\
           self.closingActionItems, 0)

        self.InsertColumn(0, _('Module'), width=100)
        self.InsertColumn(1, _('Differs from'), width=450)
        self.InsertColumn(2, _('Result'), width=75)

        self.results = {}
        self.listResultIdxs = []
        self.tabName = 'App. Compare'
        self.active = True
        self.model = model
        self.compareTo = ''
Exemplo n.º 2
0
    def __init__(self, parent, model):
        CloseableViewMix.__init__(self, _('compare results'))
        ListCtrlView.__init__(self, parent, model, wx.LC_REPORT,
          ( ('Do diff', self.OnGoto, self.gotoLineBmp, ''), ) +\
           self.closingActionItems, 0)

        self.InsertColumn(0, _('Module'), width = 100)
        self.InsertColumn(1, _('Differs from'), width = 450)
        self.InsertColumn(2, _('Result'), width = 75)

        self.results = {}
        self.listResultIdxs = []
        self.tabName = 'App. Compare'
        self.active = True
        self.model = model
        self.compareTo = ''
Exemplo n.º 3
0
    def __init__(self, parent, model):
        CloseableViewMix.__init__(self, _('find results'))
        ListCtrlView.__init__(self, parent, model, wx.LC_REPORT, (
            (_('Goto match'), self.OnGoto, self.gotoLineBmp, ''),
            (_('Rerun query'), self.OnRerun, '-', ''),
        ) + self.closingActionItems, 0)

        self.InsertColumn(0, _('Module'), width=100)
        self.InsertColumn(1, _('Line no'), wx.LIST_FORMAT_CENTRE, 40)
        self.InsertColumn(2, _('Col'), wx.LIST_FORMAT_CENTRE, 40)
        self.InsertColumn(3, _('Text'), width=550)

        self.results = {}
        self.listResultIdxs = []
        self.tabName = 'Results'
        self.findPattern = ''
        self.active = True
        self.model = model
Exemplo n.º 4
0
    def __init__(self, parent, model):
        wxID_PYTHONSOURCEDIFFVIEW = wx.NewId()

        wx.stc.StyledTextCtrl.__init__(self,
                                       parent,
                                       wxID_PYTHONSOURCEDIFFVIEW,
                                       style=wx.CLIP_CHILDREN
                                       | wx.SUNKEN_BORDER)
        PythonStyledTextCtrlMix.__init__(self, wxID_PYTHONSOURCEDIFFVIEW, 0)
        CloseableViewMix.__init__(self, _('diffs'))
        EditorView.__init__(
            self, model,
            ((_('Refresh'), self.OnRefresh, self.refreshBmp, 'Refresh'), ) +
            self.closingActionItems +
            (('-', None, '', ''),
             (_('Previous difference'), self.OnPrev, self.prevBmp, ''),
             (_('Next difference'), self.OnNext, self.nextBmp, ''),
             (_('Apply all changes'), self.OnApplyAllChanges, '-', '')), -1)

        self.SetMarginType(1, wx.stc.STC_MARGIN_SYMBOL)
        self.SetMarginWidth(1, 16)
        markIdnt, markBorder, markCenter = Preferences.STCDiffRemovedMarker
        self.MarkerDefine(uniqueFile1Mrk, markIdnt, markBorder, markCenter)
        markIdnt, markBorder, markCenter = Preferences.STCDiffAddedMarker
        self.MarkerDefine(uniqueFile2Mrk, markIdnt, markBorder, markCenter)
        markIdnt, markBorder, markCenter = Preferences.STCDiffChangesMarker
        self.MarkerDefine(newToBothMrk, markIdnt, markBorder, markCenter)

        self.SetMarginSensitive(1, True)
        wx.stc.EVT_STC_MARGINCLICK(self, wxID_PYTHONSOURCEDIFFVIEW,
                                   self.OnMarginClick)

        self.tabName = 'Diff'
        self.diffWith = ''
        self.currSearchLine = 1

        ## Install the handler for refreshs.
        if wx.Platform == '__WXGTK__' and Preferences.edUseCustomSTCPaintEvtHandler:
            self.paint_handler = Utils.PaintEventHandler(self)

        self.active = True

        self.lineIndex = []
Exemplo n.º 5
0
    def __init__(self, parent, model):
        CloseableViewMix.__init__(self, _('find results'))
        ListCtrlView.__init__(self, parent, model, wx.LC_REPORT,
          ( (_('Goto match'), self.OnGoto, self.gotoLineBmp, ''),
            (_('Rerun query'), self.OnRerun, '-', ''),
          ) +
            self.closingActionItems, 0)

        self.InsertColumn(0, _('Module'), width = 100)
        self.InsertColumn(1, _('Line no'), wx.LIST_FORMAT_CENTRE, 40)
        self.InsertColumn(2, _('Col'), wx.LIST_FORMAT_CENTRE, 40)
        self.InsertColumn(3, _('Text'), width = 550)

        self.results = {}
        self.listResultIdxs = []
        self.tabName = 'Results'
        self.findPattern = ''
        self.active = True
        self.model = model
Exemplo n.º 6
0
    def __init__(self, parent, model):
        CloseableViewMix.__init__(self, _("compare results"))
        ListCtrlView.__init__(
            self,
            parent,
            model,
            wx.LC_REPORT,
            (("Do diff", self.OnGoto, self.gotoLineBmp, ""),) + self.closingActionItems,
            0,
        )

        self.InsertColumn(0, _("Module"), width=100)
        self.InsertColumn(1, _("Differs from"), width=450)
        self.InsertColumn(2, _("Result"), width=75)

        self.results = {}
        self.listResultIdxs = []
        self.tabName = "App. Compare"
        self.active = True
        self.model = model
        self.compareTo = ""
Exemplo n.º 7
0
    def __init__(self, parent, model):
        CloseableViewMix.__init__(self, _('stats'))
        ListCtrlView.__init__(
            self, parent, model, wx.LC_REPORT | wx.LC_SINGLE_SEL,
            ((_('Goto line'), self.OnGoto, self.gotoLineBmp, ''),
             ('-', None, '', ''), (_('Callers (called this function)'),
                                   self.OnCallers, self.callersBmp, ''),
             (_('Callees (are called by this function)'), self.OnCallees,
              self.calleesBmp, ''),
             ('-', None, '', '')) + self.closingActionItems +
            ((_('Save stats'), self.OnSaveStats, self.saveAsBmp, ''), ), 0)

        self.InsertColumn(0, 'module')
        self.InsertColumn(1, 'line')
        self.InsertColumn(2, 'function')
        self.InsertColumn(3, 'ncalls')
        self.InsertColumn(4, 'tottime')
        self.InsertColumn(5, 'totpercall')
        self.InsertColumn(6, 'cumtime')
        self.InsertColumn(7, 'cumpercall')
        self.SetColumnWidth(0, 100)
        self.SetColumnWidth(1, 30)
        self.SetColumnWidth(2, 100)
        self.SetColumnWidth(3, 50)
        self.SetColumnWidth(4, 60)
        self.SetColumnWidth(5, 60)
        self.SetColumnWidth(6, 60)
        self.SetColumnWidth(7, 60)

        self.Bind(wx.EVT_LIST_COL_CLICK, self.OnColClick)

        self.sortAscend = False
        self.sortCol = 0
        self.all_callees = None

        self.active = True
        self.stats = None
        self.profDir = ''
Exemplo n.º 8
0
    def __init__(self, parent, model):
        wxID_PYTHONSOURCEDIFFVIEW = wx.NewId()

        wx.stc.StyledTextCtrl.__init__(self, parent, wxID_PYTHONSOURCEDIFFVIEW,
          style = wx.CLIP_CHILDREN | wx.SUNKEN_BORDER)
        PythonStyledTextCtrlMix.__init__(self, wxID_PYTHONSOURCEDIFFVIEW, 0)
        CloseableViewMix.__init__(self, _('diffs'))
        EditorView.__init__(self, model,
          ( (_('Refresh'), self.OnRefresh, self.refreshBmp, 'Refresh'), ) +
            self.closingActionItems +
          ( ('-', None, '', ''),
            (_('Previous difference'), self.OnPrev, self.prevBmp, ''),
            (_('Next difference'), self.OnNext, self.nextBmp, ''),
            (_('Apply all changes'), self.OnApplyAllChanges, '-', '') ), -1)

        self.SetMarginType(1, wx.stc.STC_MARGIN_SYMBOL)
        self.SetMarginWidth(1, 16)
        markIdnt, markBorder, markCenter = Preferences.STCDiffRemovedMarker
        self.MarkerDefine(uniqueFile1Mrk, markIdnt, markBorder, markCenter)
        markIdnt, markBorder, markCenter = Preferences.STCDiffAddedMarker
        self.MarkerDefine(uniqueFile2Mrk, markIdnt, markBorder, markCenter)
        markIdnt, markBorder, markCenter = Preferences.STCDiffChangesMarker
        self.MarkerDefine(newToBothMrk, markIdnt, markBorder, markCenter)

        self.SetMarginSensitive(1, True)
        wx.stc.EVT_STC_MARGINCLICK(self, wxID_PYTHONSOURCEDIFFVIEW, self.OnMarginClick)

        self.tabName = 'Diff'
        self.diffWith = ''
        self.currSearchLine = 1

        ## Install the handler for refreshs.
        if wx.Platform == '__WXGTK__' and Preferences.edUseCustomSTCPaintEvtHandler:
            self.paint_handler = Utils.PaintEventHandler(self)

        self.active = True

        self.lineIndex = []
Exemplo n.º 9
0
    def __init__(self, parent, model):
        CloseableViewMix.__init__(self, _('stats'))
        ListCtrlView.__init__(self, parent, model, wx.LC_REPORT | wx.LC_SINGLE_SEL,
          ( (_('Goto line'), self.OnGoto, self.gotoLineBmp, ''),
            ('-', None, '', ''),
            (_('Callers (called this function)'), self.OnCallers, self.callersBmp, ''),
            (_('Callees (are called by this function)'), self.OnCallees, self.calleesBmp, ''),
            ('-', None, '', '') ) +
            self.closingActionItems +
          ( (_('Save stats'), self.OnSaveStats, self.saveAsBmp, ''),
            ), 0)

        self.InsertColumn(0, 'module')
        self.InsertColumn(1, 'line')
        self.InsertColumn(2, 'function')
        self.InsertColumn(3, 'ncalls')
        self.InsertColumn(4, 'tottime')
        self.InsertColumn(5, 'totpercall')
        self.InsertColumn(6, 'cumtime')
        self.InsertColumn(7, 'cumpercall')
        self.SetColumnWidth(0, 100)
        self.SetColumnWidth(1, 30)
        self.SetColumnWidth(2, 100)
        self.SetColumnWidth(3, 50)
        self.SetColumnWidth(4, 60)
        self.SetColumnWidth(5, 60)
        self.SetColumnWidth(6, 60)
        self.SetColumnWidth(7, 60)

        self.Bind(wx.EVT_LIST_COL_CLICK, self.OnColClick)

        self.sortAscend = False
        self.sortCol = 0
        self.all_callees = None

        self.active = True
        self.stats = None
        self.profDir = ''
Exemplo n.º 10
0
    def __init__(self, parent, model):
        CloseableViewMix.__init__(self, _("find results"))
        ListCtrlView.__init__(
            self,
            parent,
            model,
            wx.LC_REPORT,
            ((_("Goto match"), self.OnGoto, self.gotoLineBmp, ""), (_("Rerun query"), self.OnRerun, "-", ""))
            + self.closingActionItems,
            0,
        )

        self.InsertColumn(0, _("Module"), width=100)
        self.InsertColumn(1, _("Line no"), wx.LIST_FORMAT_CENTRE, 40)
        self.InsertColumn(2, _("Col"), wx.LIST_FORMAT_CENTRE, 40)
        self.InsertColumn(3, _("Text"), width=550)

        self.results = {}
        self.listResultIdxs = []
        self.tabName = "Results"
        self.findPattern = ""
        self.active = True
        self.model = model