Warn when trying to edit built-in ruleset (by double-clicking, for example)
authorJan Vrany <jan.vrany@fit.cvut.cz>
Thu, 20 Nov 2014 02:59:35 +0100
changeset 14868 2b290ffb8a95
parent 14867 ab1dc0b98507
child 14869 24a4abe69471
Warn when trying to edit built-in ruleset (by double-clicking, for example)
Tools__LintRuleSettingsApplication.st
--- a/Tools__LintRuleSettingsApplication.st	Thu Nov 20 00:23:43 2014 +0100
+++ b/Tools__LintRuleSettingsApplication.st	Thu Nov 20 02:59:35 2014 +0100
@@ -270,6 +270,11 @@
 doEdit: rule
     | edited dialog |    
 
+    rule isBuiltin ifTrue:[ 
+        Dialog warn: (resources string: 'Cannot edit built-in rule sets').
+        ^ self
+    ].
+
     dialog := LintRuleEditDialog new.
     dialog nameEditableHolder value: false.
     edited := rule deepCopy.
@@ -282,7 +287,7 @@
     ].
 
     "Created: / 14-10-2014 / 16:47:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 16-10-2014 / 11:12:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 20-11-2014 / 01:59:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 doExport
@@ -490,11 +495,11 @@
 !LintRuleSettingsApplication class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__LintRuleSettingsApplication.st,v 1.12 2014-11-19 20:57:25 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__LintRuleSettingsApplication.st,v 1.13 2014-11-20 01:59:35 vrany Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__LintRuleSettingsApplication.st,v 1.12 2014-11-19 20:57:25 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__LintRuleSettingsApplication.st,v 1.13 2014-11-20 01:59:35 vrany Exp $'
 ! !