class: Tools::LintRuleSettingsApplication
class definition
added: #smallSenseEnabledHolder
changed:
#basicReadSettings
#basicSaveSettings
#flyByHelpSpec
#windowSpec
smallsense loading
--- a/Tools__LintRuleSettingsApplication.st Fri Feb 13 23:00:19 2015 +0100
+++ b/Tools__LintRuleSettingsApplication.st Fri Feb 13 23:44:30 2015 +0100
@@ -15,7 +15,7 @@
AbstractSettingsApplication subclass:#LintRuleSettingsApplication
instanceVariableNames:'rulesetList rulesetSelectionHolder hasSelectionHolder
- hasSelectionAndUserDefinedHolder'
+ hasSelectionAndUserDefinedHolder smallSenseEnabledHolder'
classVariableNames:'LastFileName'
poolDictionaries:''
category:'Interface-Lint'
@@ -90,6 +90,9 @@
#resetDefault
'Recreate the default ruleset with all existing RBRules.\(Do this after new rules have been added or rules classes were modified)'
+#smallSenseEnabled
+'Enable SmallSense (incremental lint rule checking in the editor).\Sorry, but this will only affect new windows,\so you have to reopen the browsers.'
+
)
! !
@@ -151,6 +154,14 @@
component:
(SpecCollection
collection: (
+ (CheckBoxSpec
+ label: 'Enable Lintrule Checking in Codeview (SmallSense)'
+ name: 'CheckBox1'
+ model: smallSenseEnabledHolder
+ activeHelpKey: smallSenseEnabled
+ translateLabel: true
+ useDefaultExtent: true
+ )
(ViewSpec
name: 'Box2'
component:
@@ -177,7 +188,7 @@
)
(VerticalPanelViewSpec
name: 'Buttons1'
- layout: (LayoutFrame -128 1 30 0 0 1 -65 0.69999999999999996)
+ layout: (LayoutFrame -128 1 30 0 0 1 -65 0.70000000000000007)
horizontalLayout: fit
verticalLayout: top
horizontalSpace: 5
@@ -226,7 +237,7 @@
)
(VerticalPanelViewSpec
name: 'Buttons2'
- layout: (LayoutFrame -128 1 -64 0.69999999999999996 0 1 0 1)
+ layout: (LayoutFrame -128 1 -64 0.70000000000000007 0 1 0 1)
horizontalLayout: fit
verticalLayout: bottom
horizontalSpace: 5
@@ -270,7 +281,7 @@
)
)
- extent: (Point 587 473)
+ extent: (Point 587 443)
)
)
@@ -491,6 +502,13 @@
rulesetSelectionHolder := ValueHolder new.
].
^ rulesetSelectionHolder
+!
+
+smallSenseEnabledHolder
+ smallSenseEnabledHolder isNil ifTrue:[
+ smallSenseEnabledHolder := ValueHolder with:false.
+ ].
+ ^ smallSenseEnabledHolder
! !
!LintRuleSettingsApplication methodsFor:'protocol'!
@@ -498,6 +516,10 @@
basicReadSettings
"superclass AbstractSettingsApplication says that I am responsible to implement this method"
+ self smallSenseEnabledHolder
+ value:(SmallSense::SmalltalkChecker notNil
+ and:[ UserPreferences current perform:#smallSenseEnabled ifNotUnderstood:false]).
+
RBCompositeLintRule isNil ifTrue:[
"/ Not loaded?
[
@@ -521,6 +543,16 @@
basicSaveSettings
| oldRulesets newRulesets toRemove toAdd |
+ self smallSenseEnabledHolder value ifTrue:[
+ SmallSense::SmalltalkChecker isNil ifTrue:[
+ Smalltalk loadPackage:'stx:goodies/smallsense'
+ ].
+ ].
+ SmallSense::SmalltalkChecker notNil ifTrue:[
+ UserPreferences current
+ perform:#smallSenseEnabled: with:self smallSenseEnabledHolder value ifNotUnderstood:[]
+ ].
+
oldRulesets := RBCompositeLintRule rulesetsUserDefined.
newRulesets := self rulesetList reject:[:e|e isBuiltin].
@@ -589,11 +621,11 @@
!LintRuleSettingsApplication class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/Tools__LintRuleSettingsApplication.st,v 1.18 2015-01-23 11:43:43 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools__LintRuleSettingsApplication.st,v 1.19 2015-02-13 22:44:30 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libtool/Tools__LintRuleSettingsApplication.st,v 1.18 2015-01-23 11:43:43 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools__LintRuleSettingsApplication.st,v 1.19 2015-02-13 22:44:30 cg Exp $'
! !