--- a/Tools__LintRuleDetail.st Wed Mar 21 14:05:42 2012 +0000
+++ b/Tools__LintRuleDetail.st Wed Mar 21 17:50:14 2012 +0000
@@ -126,12 +126,13 @@
verticalLayout: topSpaceFit
horizontalSpace: 0
verticalSpace: 0
- ignoreInvisibleComponents: false
+ ignoreInvisibleComponents: true
component:
(SpecCollection
collection: (
(ViewSpec
name: 'Label'
+ visibilityChannel: false
component:
(SpecCollection
collection: (
@@ -162,7 +163,7 @@
visibilityChannel: rationaleVisibleHolder
hasHorizontalScrollBar: true
hasVerticalScrollBar: true
- backgroundColor: (Color 86.9993133440146 86.9993133440146 86.9993133440146)
+ backgroundColor: (Color 86.9993133440147 86.9993133440147 86.9993133440147)
htmlText: ruleRationaleAspect
extent: (Point 560 270)
postBuildCallback: setupHTMLView:
@@ -192,8 +193,10 @@
^ #(
#ruleHolder
+ #ruleRationaleAspect
).
+ "Modified: / 01-03-2012 / 16:31:04 / cg"
! !
!LintRuleDetail methodsFor:'actions'!
@@ -219,12 +222,13 @@
"return/create the 'rationaleVisibleHolder' value holder (automatically generated)"
rationaleVisibleHolder isNil ifTrue:[
- rationaleVisibleHolder := ValueHolder with: false.
+ rationaleVisibleHolder := ValueHolder with: true "false".
rationaleVisibleHolder addDependent:self.
].
^ rationaleVisibleHolder
"Modified: / 04-08-2011 / 21:39:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 01-03-2012 / 08:50:20 / cg"
!
rationaleVisibleHolder:something
@@ -250,9 +254,11 @@
"return/create the 'ruleHolder' value holder (automatically generated)"
ruleHolder isNil ifTrue:[
- ruleHolder := ValueHolder new.
+ ruleHolder := ValueHolder new.
].
^ ruleHolder
+
+ "Modified: / 01-03-2012 / 08:51:03 / cg"
!
ruleHolder:something
@@ -261,17 +267,19 @@
|oldValue newValue|
ruleHolder notNil ifTrue:[
- oldValue := ruleHolder value.
- ruleHolder removeDependent:self.
+ oldValue := ruleHolder value.
+ ruleHolder removeDependent:self.
].
ruleHolder := something.
ruleHolder notNil ifTrue:[
- ruleHolder addDependent:self.
+ ruleHolder addDependent:self.
].
newValue := ruleHolder value.
oldValue ~~ newValue ifTrue:[
- self update:#value with:newValue from:ruleHolder.
+ self update:#value with:newValue from:ruleHolder.
].
+
+ "Modified: / 01-03-2012 / 15:29:30 / cg"
!
ruleNameAspect
@@ -283,7 +291,7 @@
holder := BlockValue
with:[:h |
"/ h displayString , ' ' , (('[browse]' actionForAll:[ self browseLintRule]) colorizeAllWith:Color blue)
- h displayString actionForAll:[ self browseLintRule]
+ (h ? '') displayString actionForAll:[ self browseLintRule ]
]
argument: self ruleHolder.
builder aspectAt:#ruleNameAspect put:holder.
@@ -291,7 +299,7 @@
^ holder.
"Modified: / 05-02-2010 / 12:51:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 07-09-2011 / 04:54:24 / cg"
+ "Modified: / 01-03-2012 / 08:44:23 / cg"
!
ruleRationaleAspect
@@ -300,13 +308,17 @@
|holder|
(holder := builder bindingAt:#ruleRationaleAspect) isNil ifTrue:[
- holder := (AspectAdaptor forAspect: #rationale) subjectChannel: self ruleHolder.
+ "cannot use a BlockValue linked on the ruleHolder for the
+ ruleRationaleAspect, because the ruleHolder maight be changed dynamically
+ via the aspect-linking mechanism"
+"/ holder := (AspectAdaptor forAspect: #rationale) subjectChannel: self ruleHolder.
+ holder := '' asValue.
builder aspectAt:#ruleRationaleAspect put:holder.
].
^ holder.
"Modified: / 05-02-2010 / 12:51:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified (comment): / 07-09-2011 / 04:12:16 / cg"
+ "Modified: / 01-03-2012 / 15:29:16 / cg"
! !
!LintRuleDetail methodsFor:'change & update'!
@@ -316,6 +328,7 @@
changedObject == ruleHolder ifTrue:[
self updateVisibility.
+ self updateRule.
^ self.
].
changedObject == rationaleVisibleHolder ifTrue:[
@@ -325,6 +338,20 @@
super update:something with:aParameter from:changedObject
"Modified: / 04-08-2011 / 21:31:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 01-03-2012 / 15:27:38 / cg"
+!
+
+updateRule
+ "cannot use a BlockValue linked on the ruleHolder for the
+ ruleRationaleAspect, because the ruleHolder maight be changed dynamically
+ via the aspect-linking mechanism"
+
+ |rule|
+
+ rule := self ruleHolder value.
+ self ruleRationaleAspect value: (rule isNil ifTrue:[''] ifFalse:[rule rationaleWithAnchor]).
+
+ "Created: / 01-03-2012 / 15:28:18 / cg"
!
updateVisibility
@@ -383,6 +410,11 @@
visibility: visibility height: height
| container list detail h |
+"/ cg: the whole conatiner-container access chains below is ugly - use a name to access components.
+"/ and also: there is no layout in list, so the code does crash.
+"/ I disabled the whole visibility stuff.
+^ self.
+
(container := self window container) isNil ifTrue:[^self].
h := visibility ifFalse:[0] ifTrue:[height].
@@ -401,19 +433,19 @@
].
"Created: / 11-03-2010 / 09:51:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 04-09-2011 / 20:15:40 / cg"
+ "Modified: / 01-03-2012 / 10:35:51 / cg"
! !
!LintRuleDetail class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/Tools__LintRuleDetail.st,v 1.10 2011/09/07 02:54:47 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools__LintRuleDetail.st,v 1.13 2012/03/01 19:59:38 cg Exp $'
!
version_CVS
- ^ '§Header: /cvs/stx/stx/libtool/Tools__LintRuleDetail.st,v 1.10 2011/09/07 02:54:47 cg Exp §'
+ ^ '§Header: /cvs/stx/stx/libtool/Tools__LintRuleDetail.st,v 1.13 2012/03/01 19:59:38 cg Exp §'
!
version_SVN
- ^ '$Id: Tools__LintRuleDetail.st 7854 2012-01-30 17:49:41Z vranyj1 $'
+ ^ '$Id: Tools__LintRuleDetail.st 7952 2012-03-21 17:50:14Z vranyj1 $'
! !