Tools__ChangeSetDiffList.st
branchjv
changeset 12232 4d9b62c111fc
parent 12202 eaa1f6cb6ce8
child 12274 1e0599b8a007
equal deleted inserted replaced
12231:f7912c671a04 12232:4d9b62c111fc
    26 "{ Package: 'stx:libtool' }"
    26 "{ Package: 'stx:libtool' }"
    27 
    27 
    28 "{ NameSpace: Tools }"
    28 "{ NameSpace: Tools }"
    29 
    29 
    30 BrowserListWithFilter subclass:#ChangeSetDiffList
    30 BrowserListWithFilter subclass:#ChangeSetDiffList
    31 	instanceVariableNames:'listHolder listEntryLabelGenerator listEntryIconGenerator'
    31 	instanceVariableNames:'listHolder listEntryLabelGenerator listEntryIconGenerator
       
    32 		showVersionMethodDiffsHolder'
    32 	classVariableNames:''
    33 	classVariableNames:''
    33 	poolDictionaries:''
    34 	poolDictionaries:''
    34 	category:'Interface-Diff'
    35 	category:'Interface-Diff'
    35 !
    36 !
    36 
    37 
   152         #inGeneratorHolder
   153         #inGeneratorHolder
   153         #listEntryIconGenerator
   154         #listEntryIconGenerator
   154         #listEntryLabelGenerator
   155         #listEntryLabelGenerator
   155         #menuHolder
   156         #menuHolder
   156         #outGeneratorHolder
   157         #outGeneratorHolder
       
   158         #showVersionMethodDiffsHolder
   157       ).
   159       ).
   158 
   160 
       
   161     "Modified: / 18-04-2012 / 19:01:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   159 ! !
   162 ! !
   160 
   163 
   161 !ChangeSetDiffList methodsFor:'accessing'!
   164 !ChangeSetDiffList methodsFor:'accessing'!
   162 
   165 
   163 listEntryIconGenerator
   166 listEntryIconGenerator
   183 
   186 
   184     listHolder isNil ifTrue:[
   187     listHolder isNil ifTrue:[
   185         listHolder := ValueHolder new.
   188         listHolder := ValueHolder new.
   186     ].
   189     ].
   187     ^ listHolder
   190     ^ listHolder
       
   191 !
       
   192 
       
   193 showVersionMethodDiffsHolder
       
   194     "return/create the 'showVersionMethodDiffsHolder' value holder (automatically generated)"
       
   195 
       
   196     showVersionMethodDiffsHolder isNil ifTrue:[
       
   197         showVersionMethodDiffsHolder := ValueHolder new.
       
   198         showVersionMethodDiffsHolder addDependent:self.
       
   199     ].
       
   200     ^ showVersionMethodDiffsHolder
       
   201 !
       
   202 
       
   203 showVersionMethodDiffsHolder:something
       
   204     "set the 'showVersionMethodDiffsHolder' value holder (automatically generated)"
       
   205 
       
   206     |oldValue newValue|
       
   207 
       
   208     showVersionMethodDiffsHolder notNil ifTrue:[
       
   209         oldValue := showVersionMethodDiffsHolder value.
       
   210         showVersionMethodDiffsHolder removeDependent:self.
       
   211     ].
       
   212     showVersionMethodDiffsHolder := something.
       
   213     showVersionMethodDiffsHolder notNil ifTrue:[
       
   214         showVersionMethodDiffsHolder addDependent:self.
       
   215     ].
       
   216     newValue := showVersionMethodDiffsHolder value.
       
   217     oldValue ~~ newValue ifTrue:[
       
   218         self update:#value with:newValue from:showVersionMethodDiffsHolder.
       
   219     ].
   188 ! !
   220 ! !
   189 
   221 
   190 !ChangeSetDiffList methodsFor:'change & update'!
   222 !ChangeSetDiffList methodsFor:'change & update'!
   191 
   223 
   192 update: aspect with: param from: sender
   224 update: aspect with: param from: sender
   193 
   225 
   194     aspect == #resolution ifTrue:[^(self componentAt: #List) invalidateRepairNow: true].
   226     aspect == #resolution ifTrue:[^(self componentAt: #List) invalidateRepairNow: true].
   195         
   227         
   196     sender == selectionHolder ifTrue:[^self selectionChanged].
   228     sender == selectionHolder ifTrue:[
       
   229         self selectionChanged.
       
   230         ^self.
       
   231     ].
       
   232     sender == showVersionMethodDiffsHolder ifTrue:[
       
   233         ^self updateList.
       
   234         self.
       
   235 
       
   236     ].
   197     super update: aspect with: param from: sender.
   237     super update: aspect with: param from: sender.
   198 
   238 
   199     "Modified: / 24-11-2009 / 18:34:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   239     "Modified: / 18-04-2012 / 18:57:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   200 ! !
   240 ! !
   201 
   241 
   202 !ChangeSetDiffList methodsFor:'generators'!
   242 !ChangeSetDiffList methodsFor:'generators'!
   203 
   243 
   204 makeGenerator
   244 makeGenerator
   273     self listHolder value ? #() do: [:entry|entry model removeDependent: self].
   313     self listHolder value ? #() do: [:entry|entry model removeDependent: self].
   274 
   314 
   275     newDiffs := self inGeneratorHolder value ? #().
   315     newDiffs := self inGeneratorHolder value ? #().
   276     (newDiffs isKindOf: ChangeSetDiffComponent) ifTrue:
   316     (newDiffs isKindOf: ChangeSetDiffComponent) ifTrue:
   277         [newDiffs := newDiffs diffs].
   317         [newDiffs := newDiffs diffs].
       
   318     showVersionMethodDiffsHolder value ifFalse:[
       
   319         newDiffs := newDiffs reject:[:diff|diff isForVersionMethod]
       
   320     ].
       
   321 
   278     newDiffs := self filterList: newDiffs.
   322     newDiffs := self filterList: newDiffs.
   279     newList := OrderedCollection new:16.    
   323     newList := OrderedCollection new:16.    
   280     newDiffs do:
   324     newDiffs do:
   281         [:item|
   325         [:item|
   282         newList add:(ListEntry model: item application: self).
   326         newList add:(ListEntry model: item application: self).
   284 
   328 
   285     newList sort:[:a :b|a label < b label].
   329     newList sort:[:a :b|a label < b label].
   286     self listHolder value:newList
   330     self listHolder value:newList
   287 
   331 
   288     "Modified: / 07-07-2011 / 14:17:26 / jv"
   332     "Modified: / 07-07-2011 / 14:17:26 / jv"
   289     "Modified: / 29-11-2011 / 16:08:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   333     "Modified: / 18-04-2012 / 19:01:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   290 ! !
   334 ! !
   291 
   335 
   292 !ChangeSetDiffList::ListEntry class methodsFor:'instance creation'!
   336 !ChangeSetDiffList::ListEntry class methodsFor:'instance creation'!
   293 
   337 
   294 model: model application: application
   338 model: model application: application
   361 version_CVS
   405 version_CVS
   362     ^ '§Header: /cvs/stx/stx/libtool/Tools__ChangeSetDiffList.st,v 1.6 2011/11/30 11:14:53 vrany Exp §'
   406     ^ '§Header: /cvs/stx/stx/libtool/Tools__ChangeSetDiffList.st,v 1.6 2011/11/30 11:14:53 vrany Exp §'
   363 !
   407 !
   364 
   408 
   365 version_SVN
   409 version_SVN
   366     ^ '$Id: Tools__ChangeSetDiffList.st 7948 2012-03-21 01:52:35Z vranyj1 $'
   410     ^ '$Id: Tools__ChangeSetDiffList.st 7981 2012-04-18 20:29:40Z vranyj1 $'
   367 ! !
   411 ! !