Tools__LintRuleSettingsApplication.st
changeset 15729 9072e5715657
parent 15626 92dcdf76584c
child 15733 332bb9af57e1
child 15734 4c376216e8aa
equal deleted inserted replaced
15727:6b3c19f3eaa3 15729:9072e5715657
    91 
    91 
    92 #resetDefault
    92 #resetDefault
    93 'Recreate the default ruleset with all existing RBRules.\(Do this after new rules have been added or rule classes were modified)'
    93 'Recreate the default ruleset with all existing RBRules.\(Do this after new rules have been added or rule classes were modified)'
    94 
    94 
    95 #smallSenseEnabled
    95 #smallSenseEnabled
    96 'Enable SmallSense (incremental lint rule checking in the editor).\Disabled if the smallSens package is not loaded.\\Sorry, but this will only affect new windows,\so you have to reopen the browsers.'
    96 'Enable SmallSense (incremental lint rule checking in the editor).\If the SmallSense package is not yet loaded, checking this will force it into the image.\\Sorry, but this will only affect new windows,\so you have to reopen the browsers.'
    97 
    97 
    98 )
    98 )
    99 ! !
    99 ! !
   100 
   100 
   101 !LintRuleSettingsApplication class methodsFor:'interface opening'!
   101 !LintRuleSettingsApplication class methodsFor:'interface opening'!
   158                collection: (
   158                collection: (
   159                 (CheckBoxSpec
   159                 (CheckBoxSpec
   160                    label: 'Enable Lintrule Checking in Codeview (Load SmallSense Package)'
   160                    label: 'Enable Lintrule Checking in Codeview (Load SmallSense Package)'
   161                    name: 'CheckBox1'
   161                    name: 'CheckBox1'
   162                    activeHelpKey: smallSenseEnabled
   162                    activeHelpKey: smallSenseEnabled
   163                    enableChannel: hasSmallSenseNotLoaded
       
   164                    model: smallSenseEnabledHolder
   163                    model: smallSenseEnabledHolder
   165                    translateLabel: true
   164                    translateLabel: true
   166                    useDefaultExtent: true
   165                    useDefaultExtent: true
   167                  )
   166                  )
   168                 (ViewSpec
   167                 (ViewSpec
   485     ^ hasSelectionHolder
   484     ^ hasSelectionHolder
   486 
   485 
   487     "Modified: / 27-02-2013 / 11:24:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   486     "Modified: / 27-02-2013 / 11:24:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   488 !
   487 !
   489 
   488 
       
   489 hasSmallSenseLoaded
       
   490    ^ (Smalltalk at:#'SmallSense::SmalltalkChecker') notNil
       
   491 !
       
   492 
       
   493 hasSmallSenseNotLoaded
       
   494    ^ self hasSmallSenseLoaded not
       
   495 !
       
   496 
   490 rulesetList
   497 rulesetList
   491     "return/create the 'rulesetList' value holder (automatically generated)"
   498     "return/create the 'rulesetList' value holder (automatically generated)"
   492 
   499 
   493     rulesetList isNil ifTrue:[
   500     rulesetList isNil ifTrue:[
   494         rulesetList := List new.
   501         rulesetList := List new.
   521     "superclass AbstractSettingsApplication says that I am responsible to implement this method"
   528     "superclass AbstractSettingsApplication says that I am responsible to implement this method"
   522 
   529 
   523     |rbCompositeLintRuleClass|
   530     |rbCompositeLintRuleClass|
   524 
   531 
   525     self smallSenseEnabledHolder 
   532     self smallSenseEnabledHolder 
   526         value:((Smalltalk at:#'SmallSense::SmalltalkChecker') notNil
   533         value:(self hasSmallSenseLoaded
   527                and:[ UserPreferences current perform:#smallSenseEnabled ifNotUnderstood:false]).
   534                and:[ UserPreferences current perform:#smallSenseEnabled ifNotUnderstood:false]).
   528 
   535 
   529     rbCompositeLintRuleClass := Smalltalk at:#'RBCompositeLintRule'.
   536     rbCompositeLintRuleClass := Smalltalk at:#'RBCompositeLintRule'.
   530 
   537 
   531     rbCompositeLintRuleClass isNil ifTrue:[ 
   538     rbCompositeLintRuleClass isNil ifTrue:[ 
   583     oldRulesets removeAll:toRemove.
   590     oldRulesets removeAll:toRemove.
   584     oldRulesets addAll:toAdd.
   591     oldRulesets addAll:toAdd.
   585     rbCompositeLintRuleClass rulesetsUserDefined: oldRulesets.
   592     rbCompositeLintRuleClass rulesetsUserDefined: oldRulesets.
   586 
   593 
   587     "Modified: / 24-11-2014 / 11:21:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   594     "Modified: / 24-11-2014 / 11:21:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   588 !
       
   589 
       
   590 hasSmallSenseLoaded
       
   591    ^ (Smalltalk at:#'SmallSense::SmalltalkChecker') notNil
       
   592 !
       
   593 
       
   594 hasSmallSenseNotLoaded
       
   595    ^ self hasSmallSenseLoaded not
       
   596 !
   595 !
   597 
   596 
   598 helpFilename
   597 helpFilename
   599     "subclasses must return either the relative name of a helpFile
   598     "subclasses must return either the relative name of a helpFile
   600      in the doc/online/<language>/help directory,
   599      in the doc/online/<language>/help directory,
   647 ! !
   646 ! !
   648 
   647 
   649 !LintRuleSettingsApplication class methodsFor:'documentation'!
   648 !LintRuleSettingsApplication class methodsFor:'documentation'!
   650 
   649 
   651 version
   650 version
   652     ^ '$Header: /cvs/stx/stx/libtool/Tools__LintRuleSettingsApplication.st,v 1.24 2015-05-09 17:43:17 cg Exp $'
   651     ^ '$Header$'
   653 !
   652 !
   654 
   653 
   655 version_CVS
   654 version_CVS
   656     ^ '$Header: /cvs/stx/stx/libtool/Tools__LintRuleSettingsApplication.st,v 1.24 2015-05-09 17:43:17 cg Exp $'
   655     ^ '$Header$'
   657 ! !
   656 ! !
   658 
   657 
   659 
   658 
   660 LintRuleSettingsApplication initialize!
   659 LintRuleSettingsApplication initialize!