--- a/Tools__ChangeSetDiffList.st Mon Jul 30 18:15:03 2012 +0100
+++ b/Tools__ChangeSetDiffList.st Fri Aug 03 14:08:30 2012 +0100
@@ -29,7 +29,8 @@
BrowserListWithFilter subclass:#ChangeSetDiffList
instanceVariableNames:'listHolder listEntryLabelGenerator listEntryIconGenerator
- showVersionMethodDiffsHolder'
+ showVersionMethodDiffsHolder showCopyrightMethodDiffsHolder
+ highlightConflictsHolder'
classVariableNames:''
poolDictionaries:''
category:'Interface-Diff'
@@ -105,7 +106,7 @@
collection: (
(InputFieldSpec
name: 'Filter'
- layout: (LayoutFrame 0 0 0 0 0 1 25 0)
+ layout: (LayoutFrame 0 0 0 0 0 1 22 0)
initiallyInvisible: true
model: filterPatternHolder
immediateAccept: true
@@ -114,8 +115,6 @@
acceptOnTab: false
acceptOnPointerLeave: false
emptyFieldReplacementText: 'Search Filter...'
- usePreferredHeight: true
- useDynamicPreferredHeight: true
postBuildCallback: postBuildFilterView:
)
(SelectionInListModelViewSpec
@@ -129,11 +128,14 @@
multipleSelectOk: true
useIndex: false
highlightMode: line
+ postBuildCallback: postBuildListView:
)
)
)
)
+
+ "Modified: / 01-08-2012 / 17:31:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!ChangeSetDiffList class methodsFor:'plugIn spec'!
@@ -149,16 +151,18 @@
these can be connected to aspects of an embedding application
(if this app is embedded in a subCanvas)."
- ^ #(
+ ^ super aspectSelectors , #(
+ #highlightConflictsHolder
#inGeneratorHolder
#listEntryIconGenerator
#listEntryLabelGenerator
#menuHolder
#outGeneratorHolder
+ #showCopyrightMethodDiffsHolder
#showVersionMethodDiffsHolder
).
- "Modified: / 18-04-2012 / 19:01:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified (format): / 01-08-2012 / 17:32:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!ChangeSetDiffList methodsFor:'accessing'!
@@ -181,6 +185,37 @@
!ChangeSetDiffList methodsFor:'aspects'!
+highlightConflictsHolder
+ "return/create the 'highlightConflictsHolder' value holder (automatically generated)"
+
+ highlightConflictsHolder isNil ifTrue:[
+ highlightConflictsHolder := ValueHolder new.
+ highlightConflictsHolder addDependent:self.
+ ].
+ ^ highlightConflictsHolder
+
+ "Modified (format): / 03-08-2012 / 14:02:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+highlightConflictsHolder:something
+ "set the 'highlightConflictsHolder' value holder (automatically generated)"
+
+ |oldValue newValue|
+
+ highlightConflictsHolder notNil ifTrue:[
+ oldValue := highlightConflictsHolder value.
+ highlightConflictsHolder removeDependent:self.
+ ].
+ highlightConflictsHolder := something.
+ highlightConflictsHolder notNil ifTrue:[
+ highlightConflictsHolder addDependent:self.
+ ].
+ newValue := highlightConflictsHolder value.
+ oldValue ~~ newValue ifTrue:[
+ self update:#value with:newValue from:highlightConflictsHolder.
+ ].
+!
+
listHolder
"return/create the 'difflistHolder' value holder (automatically generated)"
@@ -190,6 +225,35 @@
^ listHolder
!
+showCopyrightMethodDiffsHolder
+ "return/create the 'showCopyrightMethodDiffsHolder' value holder (automatically generated)"
+
+ showCopyrightMethodDiffsHolder isNil ifTrue:[
+ showCopyrightMethodDiffsHolder := ValueHolder new.
+ showCopyrightMethodDiffsHolder addDependent:self.
+ ].
+ ^ showCopyrightMethodDiffsHolder
+!
+
+showCopyrightMethodDiffsHolder:something
+ "set the 'showCopyrightMethodDiffsHolder' value holder (automatically generated)"
+
+ |oldValue newValue|
+
+ showCopyrightMethodDiffsHolder notNil ifTrue:[
+ oldValue := showCopyrightMethodDiffsHolder value.
+ showCopyrightMethodDiffsHolder removeDependent:self.
+ ].
+ showCopyrightMethodDiffsHolder := something.
+ showCopyrightMethodDiffsHolder notNil ifTrue:[
+ showCopyrightMethodDiffsHolder addDependent:self.
+ ].
+ newValue := showCopyrightMethodDiffsHolder value.
+ oldValue ~~ newValue ifTrue:[
+ self update:#value with:newValue from:showCopyrightMethodDiffsHolder.
+ ].
+!
+
showVersionMethodDiffsHolder
"return/create the 'showVersionMethodDiffsHolder' value holder (automatically generated)"
@@ -232,11 +296,25 @@
sender == showVersionMethodDiffsHolder ifTrue:[
^self updateList.
self.
+ ].
+ sender == showCopyrightMethodDiffsHolder ifTrue:[
+ ^self updateList.
+ self.
].
+
+ sender == highlightConflictsHolder ifTrue:[
+ listView notNil ifTrue:[
+ listView scrolledView invalidate.
+ ].
+ ^self.
+ ].
+
+
+
super update: aspect with: param from: sender.
- "Modified: / 18-04-2012 / 18:57:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 01-08-2012 / 17:24:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!ChangeSetDiffList methodsFor:'generators'!
@@ -318,6 +396,10 @@
showVersionMethodDiffsHolder value ifFalse:[
newDiffs := newDiffs reject:[:diff|diff isForVersionMethod]
].
+ showCopyrightMethodDiffsHolder value ifFalse:[
+ newDiffs := newDiffs reject:[:diff|diff isForCopyrightMethod]
+ ].
+
newDiffs := self filterList: newDiffs.
newList := OrderedCollection new:16.
@@ -330,7 +412,7 @@
self listHolder value:newList
"Modified: / 07-07-2011 / 14:17:26 / jv"
- "Modified: / 18-04-2012 / 19:01:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 01-08-2012 / 16:37:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!ChangeSetDiffList::ListEntry class methodsFor:'instance creation'!
@@ -387,12 +469,13 @@
| label icon oldPaint |
label := self label.
- ((application topApplication askFor:#isMerge) and:[model isMerged not]) ifTrue:[
+"/ ((application topApplication askFor:#isMerge) and:[model isMerged not]) ifTrue:[
+ (application highlightConflictsHolder value and:[model isConflict]) ifTrue:[
oldPaint := aGC paint.
aGC paint: TextDiff3Tool colorConflict.
'!!' displayOn: aGC x: x y:y opaque: opaque.
aGC paint: oldPaint.
- label := label asText allBold"/ colorizeAllWith: Color red darker
+ label := label asText allBold"/; colorizeAllWith: Color red darker.
].
(icon := self icon) ifNotNil:[icon displayOn: aGC x: x + 10 y: y - icon height opaque: opaque].
label displayOn: aGC x: x + 10 + 16 y:y opaque: opaque
@@ -407,5 +490,5 @@
!
version_SVN
- ^ '$Id: Tools__ChangeSetDiffList.st 7981 2012-04-18 20:29:40Z vranyj1 $'
+ ^ '$Id: Tools__ChangeSetDiffList.st 8034 2012-08-03 13:08:30Z vranyj1 $'
! !