Support for built-in Lint rulesets
authorJan Vrany <jan.vrany@fit.cvut.cz>
Thu, 16 Oct 2014 12:52:08 +0200
changeset 14773 27ac58346f25
parent 14772 51c54abcf3cd
child 14774 9337fd51b990
Support for built-in Lint rulesets
Tools__LintRuleEditDialog.st
--- a/Tools__LintRuleEditDialog.st	Tue Oct 14 23:17:21 2014 +0200
+++ b/Tools__LintRuleEditDialog.st	Thu Oct 16 12:52:08 2014 +0200
@@ -29,7 +29,7 @@
 
 SimpleDialog subclass:#LintRuleEditDialog
 	instanceVariableNames:'ruleHolder nameHolder selectionHolder variablePanel
-		relativeCorners detailsShown listSelection'
+		relativeCorners detailsShown listSelection nameEditableHolder'
 	classVariableNames:''
 	poolDictionaries:''
 	category:'Interface-Lint'
@@ -115,164 +115,165 @@
     <resource: #canvas>
 
     ^ 
-     #(FullSpec
-        name: windowSpec
-        window: 
-       (WindowSpec
-          label: 'Select Lint Rules'
-          name: 'Select Lint Rules'
-          min: (Point 10 10)
-          bounds: (Rectangle 0 0 600 400)
-        )
-        component: 
-       (SpecCollection
-          collection: (
-           (VerticalPanelViewSpec
-              name: 'Content'
-              layout: (LayoutFrame 0 0 0 0 0 1 -30 1)
-              horizontalLayout: fit
-              verticalLayout: topFit
-              horizontalSpace: 3
-              verticalSpace: 3
-              component: 
-             (SpecCollection
-                collection: (
-                 (ViewSpec
-                    name: 'NameBox'
-                    component: 
-                   (SpecCollection
-                      collection: (
-                       (LabelSpec
-                          label: 'Name:'
-                          name: 'Label1'
-                          layout: (LayoutFrame 0 0 0 0 60 0 0 1)
-                          translateLabel: true
-                          adjust: left
-                        )
-                       (InputFieldSpec
-                          name: 'EntryField1'
-                          layout: (LayoutFrame 60 0 3 0 0 1 -2 1)
-                          model: nameHolder
-                          acceptOnReturn: true
-                          acceptOnTab: true
-                          acceptOnPointerLeave: true
-                        )
+    #(FullSpec
+       name: windowSpec
+       window: 
+      (WindowSpec
+         label: 'Select Lint Rules'
+         name: 'Select Lint Rules'
+         min: (Point 10 10)
+         bounds: (Rectangle 0 0 600 400)
+       )
+       component: 
+      (SpecCollection
+         collection: (
+          (VerticalPanelViewSpec
+             name: 'Content'
+             layout: (LayoutFrame 0 0 0 0 0 1 -30 1)
+             horizontalLayout: fit
+             verticalLayout: topFit
+             horizontalSpace: 3
+             verticalSpace: 3
+             component: 
+            (SpecCollection
+               collection: (
+                (ViewSpec
+                   name: 'NameBox'
+                   component: 
+                  (SpecCollection
+                     collection: (
+                      (LabelSpec
+                         label: 'Name:'
+                         name: 'Label1'
+                         layout: (LayoutFrame 0 0 0 0 60 0 0 1)
+                         translateLabel: true
+                         adjust: left
+                       )
+                      (InputFieldSpec
+                         name: 'EntryField1'
+                         layout: (LayoutFrame 60 0 3 0 0 1 -2 1)
+                         enableChannel: nameEditableHolder
+                         model: nameHolder
+                         acceptOnReturn: true
+                         acceptOnTab: true
+                         acceptOnPointerLeave: true
                        )
-                     
-                    )
-                    extent: (Point 600 25)
-                  )
-                 (ViewSpec
-                    name: 'Spacer'
-                    extent: (Point 600 7)
-                  )
-                 (LabelSpec
-                    label: 'Rules'
-                    name: 'Label2'
-                    translateLabel: true
-                    adjust: left
-                    extent: (Point 600 25)
-                  )
-                 (VariableVerticalPanelSpec
-                    name: 'VariableVerticalPanel1'
-                    component: 
-                   (SpecCollection
-                      collection: (
-                       (SubCanvasSpec
-                          name: 'RuleList'
-                          hasHorizontalScrollBar: false
-                          hasVerticalScrollBar: false
-                          majorKey: #'Tools::HierarchicalLintRuleList'
-                          subAspectHolders: 
-                         (Array
-                            
-                           (SubChannelInfoSpec
-                              subAspect: inGeneratorHolder
-                              aspect: allRulesHolder
-                            ) 
-                           (SubChannelInfoSpec
-                              subAspect: listSelection
-                              aspect: listSelection
-                            )
-                            
-                           (SubChannelInfoSpec
-                              subAspect: modeHolder
-                              aspect: modeHolder
-                            ) 
-                           (SubChannelInfoSpec
-                              subAspect: outGeneratorHolder
-                              aspect: selectedRulesHolder
-                            )
-                            
-                           (SubChannelInfoSpec
-                              subAspect: selectionHolder
-                              aspect: selectionHolder
-                            )
-                          )
-                          createNewApplication: true
-                          createNewBuilder: true
-                        )
-                       (SubCanvasSpec
-                          name: 'RuleDesc'
-                          hasHorizontalScrollBar: false
-                          hasVerticalScrollBar: false
-                          majorKey: #'Tools::LintRuleDetail'
-                          subAspectHolders: 
-                         (Array
-                            
-                           (SubChannelInfoSpec
-                              subAspect: ruleHolder
-                              aspect: listSelection
-                            )
-                          )
-                          createNewApplication: true
-                          createNewBuilder: true
-                        )
+                      )
+                    
+                   )
+                   extent: (Point 600 25)
+                 )
+                (ViewSpec
+                   name: 'Spacer'
+                   extent: (Point 600 7)
+                 )
+                (LabelSpec
+                   label: 'Rules'
+                   name: 'Label2'
+                   translateLabel: true
+                   adjust: left
+                   extent: (Point 600 25)
+                 )
+                (VariableVerticalPanelSpec
+                   name: 'VariableVerticalPanel1'
+                   component: 
+                  (SpecCollection
+                     collection: (
+                      (SubCanvasSpec
+                         name: 'RuleList'
+                         hasHorizontalScrollBar: false
+                         hasVerticalScrollBar: false
+                         majorKey: #'Tools::HierarchicalLintRuleList'
+                         subAspectHolders: 
+                        (Array
+                           
+                          (SubChannelInfoSpec
+                             subAspect: inGeneratorHolder
+                             aspect: allRulesHolder
+                           ) 
+                          (SubChannelInfoSpec
+                             subAspect: listSelection
+                             aspect: listSelection
+                           )
+                           
+                          (SubChannelInfoSpec
+                             subAspect: modeHolder
+                             aspect: modeHolder
+                           ) 
+                          (SubChannelInfoSpec
+                             subAspect: outGeneratorHolder
+                             aspect: selectedRulesHolder
+                           )
+                           
+                          (SubChannelInfoSpec
+                             subAspect: selectionHolder
+                             aspect: selectionHolder
+                           )
+                         )
+                         createNewApplication: true
+                         createNewBuilder: true
                        )
-                     
-                    )
-                    extent: (Point 600 304)
-                    handles: (Any 0.75 1.0)
-                  )
+                      (SubCanvasSpec
+                         name: 'RuleDesc'
+                         hasHorizontalScrollBar: false
+                         hasVerticalScrollBar: false
+                         majorKey: #'Tools::LintRuleDetail'
+                         subAspectHolders: 
+                        (Array
+                           
+                          (SubChannelInfoSpec
+                             subAspect: ruleHolder
+                             aspect: listSelection
+                           )
+                         )
+                         createNewApplication: true
+                         createNewBuilder: true
+                       )
+                      )
+                    
+                   )
+                   extent: (Point 600 304)
+                   handles: (Any 0.75000000000000011 1.0)
                  )
-               
-              )
-            )
-           (HorizontalPanelViewSpec
-              name: 'BottonPanel'
-              layout: (LayoutFrame 0 0 -30 1 0 1 0 1)
-              horizontalLayout: fitSpace
-              verticalLayout: center
-              horizontalSpace: 3
-              verticalSpace: 3
-              reverseOrderIfOKAtLeft: true
-              component: 
-             (SpecCollection
-                collection: (
-                 (ActionButtonSpec
-                    label: 'Cancel'
-                    name: 'CancelButton'
-                    translateLabel: true
-                    model: doCancel
-                    extent: (Point 295 22)
-                  )
-                 (ActionButtonSpec
-                    label: 'OK'
-                    name: 'OKButton'
-                    translateLabel: true
-                    model: doAccept
-                    isDefault: true
-                    defaultable: true
-                    extent: (Point 296 22)
-                  )
+                )
+              
+             )
+           )
+          (HorizontalPanelViewSpec
+             name: 'BottonPanel'
+             layout: (LayoutFrame 0 0 -30 1 0 1 0 1)
+             horizontalLayout: fitSpace
+             verticalLayout: center
+             horizontalSpace: 3
+             verticalSpace: 3
+             reverseOrderIfOKAtLeft: true
+             component: 
+            (SpecCollection
+               collection: (
+                (ActionButtonSpec
+                   label: 'Cancel'
+                   name: 'CancelButton'
+                   translateLabel: true
+                   model: doCancel
+                   extent: (Point 295 22)
                  )
-               
-              )
-            )
+                (ActionButtonSpec
+                   label: 'OK'
+                   name: 'OKButton'
+                   translateLabel: true
+                   model: doAccept
+                   isDefault: true
+                   defaultable: true
+                   extent: (Point 296 22)
+                 )
+                )
+              
+             )
            )
-         
-        )
-      )
+          )
+        
+       )
+     )
 ! !
 
 !LintRuleEditDialog methodsFor:'accessing'!
@@ -358,6 +359,17 @@
     "Created: / 15-04-2010 / 20:13:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
+nameEditableHolder
+    "return/create the 'nameEditableHolder' value holder (automatically generated)"
+
+    nameEditableHolder isNil ifTrue:[
+        nameEditableHolder := ValueHolder with: true.
+    ].
+    ^ nameEditableHolder
+
+    "Modified: / 16-10-2014 / 11:12:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 nameHolder
     "return/create the 'nameHolder' value holder (automatically generated)"
 
@@ -460,10 +472,10 @@
 !LintRuleEditDialog class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__LintRuleEditDialog.st,v 1.2 2014-03-24 09:08:10 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__LintRuleEditDialog.st,v 1.3 2014-10-16 10:52:08 vrany Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__LintRuleEditDialog.st,v 1.2 2014-03-24 09:08:10 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__LintRuleEditDialog.st,v 1.3 2014-10-16 10:52:08 vrany Exp $'
 ! !