Merge jv
authorMerge Script
Mon, 21 Sep 2015 06:43:47 +0200
branchjv
changeset 15854 2a3fc1ba9489
parent 15850 b23c2ebcf7ae (current diff)
parent 15853 00d7a229b2f0 (diff)
child 15856 8436d7f427c9
Merge
Tools__CheckinInfoDialog.st
Tools__TagList.st
--- a/Tools__CheckinInfoDialog.st	Thu Sep 17 06:36:19 2015 +0200
+++ b/Tools__CheckinInfoDialog.st	Mon Sep 21 06:43:47 2015 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 2005 eXept Software AG
               All Rights Reserved
@@ -57,6 +59,28 @@
 "
 ! !
 
+!CheckinInfoDialog class methodsFor:'constants'!
+
+reasonBugfix
+    ^ #reasonBugfix
+!
+
+reasonDocumentation
+    ^ #reasonDocumentation
+!
+
+reasonFeature
+    ^ #reasonFeature
+!
+
+reasonOther
+    ^ #reasonOther
+!
+
+reasonRefactoring
+    ^ #reasonRefactoring
+! !
+
 !CheckinInfoDialog class methodsFor:'help specs'!
 
 flyByHelpSpec
@@ -94,6 +118,21 @@
 #checkinReason
 'Adds a keyword to the checkin info, to allow automatic generation of revision information from the log later'
 
+#checkinReasonDocumentation
+'Only documentation, comments etc. were added/changed.\Tells others, that there is no need to test/verify/review the changes'
+
+#checkinReasonBugfix
+'Some bug was fixed.\Please describe what was changed and\if possible, add a bug identifier (issue-ID) to the checkin info'
+
+#checkinReasonFeature
+'A new feature was added.\Please describe what was changed and\if possible, add a requirement identifier (issue-ID) to the checkin info'
+
+#checkinReasonRefactoring
+'The code was refactored/improved for better structure or maintainability'
+
+#checkinReasonOther
+'Some other change, which does not fit into one of the above.\Please describe in detail what you did in the checkin info'
+
 )
 ! !
 
@@ -121,8 +160,8 @@
       (WindowSpec
          label: 'Enter Log Message'
          name: 'Enter Log Message'
-         min: (Point 10 10)
-         bounds: (Rectangle 0 0 574 456)
+         min: (Point 538 387)
+         bounds: (Rectangle 0 0 579 506)
        )
        component: 
       (SpecCollection
@@ -170,7 +209,7 @@
            )
           (TextEditorSpec
              name: 'TextEditor1'
-             layout: (LayoutFrame 2 0.0 68 0 -2 1 -250 1)
+             layout: (LayoutFrame 2 0.0 68 0 -2 1 -275 1)
              activeHelpKey: logMessage
              model: logMessageHolder
              hasHorizontalScrollBar: true
@@ -179,14 +218,14 @@
            )
           (LabelSpec
              name: 'Label4'
-             layout: (LayoutFrame 0 0.0 -245 1 0 1.0 -223 1)
+             layout: (LayoutFrame 0 0.0 -269 1 0 1.0 -247 1)
              translateLabel: true
              labelChannel: warningMessageHolder
            )
           (CheckBoxSpec
              label: 'Quick Checkin (Only Classes in ChangeSet)'
              name: 'CheckInChangedOnlyCheckbox'
-             layout: (LayoutFrame 3 0 -220 1 -3 1 -198 1)
+             layout: (LayoutFrame 3 0 -244 1 -3 1 -222 1)
              activeHelpKey: quickCheckin
              visibilityChannel: quickCheckInVisibleHolder
              enableChannel: quickCheckInEnabledHolder
@@ -196,7 +235,7 @@
           (CheckBoxSpec
              label: 'Validate Package Consistency'
              name: 'CheckBox1'
-             layout: (LayoutFrame 3 0 -193 1 -3 1 -171 1)
+             layout: (LayoutFrame 3 0 -217 1 -3 1 -195 1)
              activeHelpKey: validateConsistency
              visibilityChannel: validateConsistencyVisibleHolder
              enableChannel: validateConsistencyEnabledHolder
@@ -206,7 +245,7 @@
           (CheckBoxSpec
              label: 'Mark as Stable'
              name: 'MarkStableCheckBox'
-             layout: (LayoutFrame 3 0 -166 1 -3 1 -144 1)
+             layout: (LayoutFrame 3 0 -190 1 -3 1 -168 1)
              activeHelpKey: markAsStable
              model: isStableHolder
              translateLabel: true
@@ -214,14 +253,14 @@
           (LabelSpec
              label: 'Tag:'
              name: 'Label3'
-             layout: (LayoutFrame -40 0.5 -165 1 0 0.5 -143 1)
+             layout: (LayoutFrame -40 0.5 -189 1 0 0.5 -167 1)
              activeHelpKey: tag
              translateLabel: true
              adjust: right
            )
           (ComboBoxSpec
              name: 'ComboBox1'
-             layout: (LayoutFrame 0 0.5 -166 1 -3 1 -144 1)
+             layout: (LayoutFrame 0 0.5 -190 1 -3 1 -168 1)
              activeHelpKey: tag
              enableChannel: notMarkAsStableHolder
              model: tagHolder
@@ -234,7 +273,7 @@
           (LabelSpec
              label: 'Reason for Checkin:'
              name: 'Label6'
-             layout: (AlignmentOrigin -126 0.5 -122 1 1 0.5)
+             layout: (AlignmentOrigin -126 0.5 -146 1 1 0.5)
              activeHelpKey: checkinReason
              translateLabel: true
              resizeForLabel: true
@@ -243,8 +282,8 @@
           (RadioButtonSpec
              label: 'Bugfix'
              name: 'RadioButton1'
-             layout: (LayoutFrame -123 0.5 -133 1 -126 1 -111 1)
-             activeHelpKey: checkinReason
+             layout: (LayoutFrame -123 0.5 -157 1 -126 1 -135 1)
+             activeHelpKey: checkinReasonBugfix
              translateLabel: true
              model: checkinReasonHolder
              isTriggerOnDown: true
@@ -253,8 +292,8 @@
           (RadioButtonSpec
              label: 'Feature / Enhancement'
              name: 'RadioButton2'
-             layout: (LayoutFrame -123 0.5 -109 1 -126 1 -87 1)
-             activeHelpKey: checkinReason
+             layout: (LayoutFrame -123 0.5 -133 1 -126 1 -111 1)
+             activeHelpKey: checkinReasonFeature
              translateLabel: true
              model: checkinReasonHolder
              isTriggerOnDown: true
@@ -263,18 +302,28 @@
           (RadioButtonSpec
              label: 'Refactoring / Code Cleanup'
              name: 'RadioButton3'
-             layout: (LayoutFrame -123 0.5 -85 1 -126 1 -63 1)
-             activeHelpKey: checkinReason
+             layout: (LayoutFrame -123 0.5 -109 1 -126 1 -87 1)
+             activeHelpKey: checkinReasonRefactoring
              translateLabel: true
              model: checkinReasonHolder
              isTriggerOnDown: true
              select: reasonRefactoring
            )
           (RadioButtonSpec
+             label: 'Documentation / Comment Only'
+             name: 'RadioButton5'
+             layout: (LayoutFrame -123 0.5 -85 1 -126 1 -63 1)
+             activeHelpKey: checkinReasonDocumentation
+             translateLabel: true
+             model: checkinReasonHolder
+             isTriggerOnDown: true
+             select: reasonDocumentation
+           )
+          (RadioButtonSpec
              label: 'None of the Above'
              name: 'RadioButton4'
              layout: (LayoutFrame -123 0.5 -61 1 -126 1 -39 1)
-             activeHelpKey: checkinReason
+             activeHelpKey: checkinReasonOther
              translateLabel: true
              model: checkinReasonHolder
              isTriggerOnDown: true
@@ -296,14 +345,14 @@
                    name: 'Button2'
                    translateLabel: true
                    model: doCancel
-                   extent: (Point 274 22)
+                   extent: (Point 277 22)
                  )
                 (ActionButtonSpec
                    label: 'OK'
                    name: 'Button1'
                    translateLabel: true
                    model: doAccept
-                   extent: (Point 275 22)
+                   extent: (Point 277 22)
                  )
                 )
               
@@ -424,22 +473,6 @@
     "
 
     "Created: / 12-03-2012 / 12:36:26 / cg"
-!
-
-reasonBugfix
-    ^ #reasonBugfix
-!
-
-reasonFeature
-    ^ #reasonFeature
-!
-
-reasonOther
-    ^ #reasonOther
-!
-
-reasonRefactoring
-    ^ #reasonRefactoring
 ! !
 
 !CheckinInfoDialog methodsFor:'accessing'!
@@ -457,13 +490,13 @@
 !
 
 checkinReason
-    "returns one of: #(reasonBugfix reasonFeature reasonRefactoring reasonOther)"
+    "returns one of: #(reasonBugfix reasonFeature reasonRefactoring reasonDocumentation reasonOther)"
 
     ^ self checkinReasonHolder value
 !
 
 checkinReason:aSymbolicReason
-    self assert:( #(reasonBugfix reasonFeature reasonRefactoring reasonOther) includes:aSymbolicReason).
+    self assert:( #(reasonBugfix reasonFeature reasonRefactoring reasonDocumentation reasonOther) includes:aSymbolicReason).
     self checkinReasonHolder value:aSymbolicReason
 !
 
--- a/Tools__TagList.st	Thu Sep 17 06:36:19 2015 +0200
+++ b/Tools__TagList.st	Mon Sep 21 06:43:47 2015 +0200
@@ -2716,9 +2716,11 @@
 additionalCTagsInFile:aFilePath
     "additional tags, which are not found by the standard ctags utility:
         case foo:   - case label tags
+        switch:     - case label tags
+        label:      - label tags (if there is a corresponding goto)
     "
 
-    |targets line lineNr s caseLabel l|
+    |targets line lineNr s caseLabel l gotoTargets possibleLabels|
 
     self hideLabels ifTrue:[^ #()].
     showOnly notNil ifTrue:[^ #()].
@@ -2726,16 +2728,20 @@
     Tag autoload.
 
     targets := OrderedCollection new.
+    gotoTargets := Set new.
+    possibleLabels := OrderedCollection new.
+
     s := aFilePath asFilename readStream.
     s notNil ifTrue:[
+        lineNr := 0.
         s := LineNumberReadStream readingFrom:s.
         [s atEnd] whileFalse:[
+            lineNr := lineNr + 1.
             line := s nextLine withoutSeparators.
             ((line startsWith:'case ') and:[line includes:$:]) ifTrue:[
                 l := line readStream. 
                 l skip:5.
                 caseLabel := l upTo:$:.
-                lineNr := s lineNumber - 1.
                 targets add:(Tag::TCaseLabel
                                 label:'case ' allItalic , caseLabel",' <case>' allItalic"
                                 pattern:nil
@@ -2743,17 +2749,64 @@
                                 lineNumber:lineNr).
             ] ifFalse:[
                 (line startsWith:'default:') ifTrue:[
-                    lineNr := s lineNumber - 1.
                     targets add:(Tag::TCaseLabel
-                                    label:'case ' allItalic, 'default'",' <case>' allItalic"
+                                    label:'case ' allItalic, 'default'
                                     pattern:nil
                                     type:nil
                                     lineNumber:lineNr).
-                ].
+                ] ifFalse:[
+                    ((line startsWith:'switch') and:[line includes:$(]) ifTrue:[
+                        l := line readStream. 
+                        l skip:6.
+                        l skipSeparators.
+                        l peek == $( ifTrue:[
+                            l next.
+                            caseLabel := (l upTo:$)) withoutSeparators.
+                            caseLabel notEmpty ifTrue:[
+                                caseLabel := 'switch (',caseLabel,')'.
+                                targets add:(Tag::TCaseLabel
+                                            label:'case ' allItalic , caseLabel
+                                            pattern:nil
+                                            type:nil
+                                            lineNumber:lineNr).
+                            ]
+                        ]
+                    ] ifFalse:[
+                        (line startsWith:'goto ') ifTrue:[
+                            |targetLabel|
+                            l := line readStream. 
+                            l skip:5.
+                            l skipSeparators.
+                            targetLabel := (l upTo:$; ) withoutSeparators.
+                            targetLabel notEmpty ifTrue:[
+                                gotoTargets add:targetLabel.
+                            ]
+                        ] ifFalse:[
+                            (line includes:$:) ifTrue:[
+                                |label|
+                                label := (line upTo:$:) withoutSeparators.
+                                label notEmpty ifTrue:[
+                                    ((label first isLetter or:[label first = $_])
+                                    and:[ label conform:[:ch | ch isLetterOrDigit or:[ch = $_]]]) ifTrue:[
+                                        possibleLabels 
+                                            add:(Tag::TCaseLabel
+                                                label:'label ' allItalic , label
+                                                pattern:label
+                                                type:nil
+                                                lineNumber:lineNr)
+                                    ].
+                                ].
+                            ].
+                        ].
+                    ]
+                ]
             ].
         ].
         s close
     ].
+    possibleLabels 
+        select:[:lbl | gotoTargets includes:lbl pattern]
+        thenDo:[:lbl | targets add:lbl].
     ^ targets
 !