Tools__LintRuleSettingsApplication.st
changeset 14852 5dd39f1f7d2b
parent 14821 77f50f088501
child 14868 2b290ffb8a95
equal deleted inserted replaced
14851:eeee217e8bee 14852:5dd39f1f7d2b
   463 !LintRuleSettingsApplication methodsFor:'queries'!
   463 !LintRuleSettingsApplication methodsFor:'queries'!
   464 
   464 
   465 hasUnsavedChanges
   465 hasUnsavedChanges
   466     "superclass AbstractSettingsApplication says that I am responsible to implement this method"
   466     "superclass AbstractSettingsApplication says that I am responsible to implement this method"
   467 
   467 
       
   468     |defaultRules currentRules|
       
   469 
   468     RBCompositeLintRule isNil ifTrue:[^ false].
   470     RBCompositeLintRule isNil ifTrue:[^ false].
   469     SequenceableCollection missingClassInLiteralArrayErrorSignal handle:[:ex |
   471     SequenceableCollection missingClassInLiteralArrayErrorSignal handle:[:ex |
   470         "/ maybe we have to load additional packages...
   472         "/ maybe we have to load additional packages...
   471         (Smalltalk isPackageLoaded:'stx:goodies/refactoryBrowser/lint/spelling') ifFalse:[
   473         (Smalltalk isPackageLoaded:'stx:goodies/refactoryBrowser/lint/spelling') ifFalse:[
   472             Smalltalk loadPackage:'stx:goodies/refactoryBrowser/lint/spelling'.
   474             Smalltalk loadPackage:'stx:goodies/refactoryBrowser/lint/spelling'.
   473             ex restart.
   475             ex restart.
   474         ].
   476         ].
   475         ex reject.
   477         ex reject.
   476     ] do:[
   478     ] do:[
   477         ^ RBCompositeLintRule rulesetsUserDefined asArray ~= self rulesetList asArray
   479         defaultRules := RBCompositeLintRule rulesetsUserDefined copyAsOrderedCollection.
       
   480         currentRules := self rulesetList copyAsOrderedCollection.
       
   481         "/ I will always add the defaultRule
       
   482         defaultRules removeAllFoundIn:RBCompositeLintRule rulesetsBuiltin.
       
   483         currentRules removeAllFoundIn:RBCompositeLintRule rulesetsBuiltin.
       
   484         ^ defaultRules ~= currentRules
   478     ].
   485     ].
   479 
   486 
   480     "Modified: / 28-02-2013 / 10:03:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   487     "Modified: / 28-02-2013 / 10:03:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   481 ! !
   488 ! !
   482 
   489 
   483 !LintRuleSettingsApplication class methodsFor:'documentation'!
   490 !LintRuleSettingsApplication class methodsFor:'documentation'!
   484 
   491 
   485 version
   492 version
   486     ^ '$Header: /cvs/stx/stx/libtool/Tools__LintRuleSettingsApplication.st,v 1.11 2014-11-11 14:17:09 vrany Exp $'
   493     ^ '$Header: /cvs/stx/stx/libtool/Tools__LintRuleSettingsApplication.st,v 1.12 2014-11-19 20:57:25 cg Exp $'
   487 !
   494 !
   488 
   495 
   489 version_CVS
   496 version_CVS
   490     ^ '$Header: /cvs/stx/stx/libtool/Tools__LintRuleSettingsApplication.st,v 1.11 2014-11-11 14:17:09 vrany Exp $'
   497     ^ '$Header: /cvs/stx/stx/libtool/Tools__LintRuleSettingsApplication.st,v 1.12 2014-11-19 20:57:25 cg Exp $'
   491 ! !
   498 ! !
   492 
   499 
   493 
   500 
   494 LintRuleSettingsApplication initialize!
   501 LintRuleSettingsApplication initialize!