For class and method PO's label, update "changed code" style each time label is returned
authorJan Vrany <jan.vrany@fit.cvut.cz>
Thu, 17 Jan 2019 09:27:00 +0000
changeset 1081 42b3820ab722
parent 1078 0770d24b5310
child 1084 7b23a4b2aec3
child 1113 d3d128acedc1
child 1124 d5b11626ff79
For class and method PO's label, update "changed code" style each time label is returned ...to reflect actual situation, not the situation at the time of PO creation. Therefore, the "recent searches" list in navigator shows always up-to-date info.
SmallSense__ClassPO.st
SmallSense__MethodPO.st
--- a/SmallSense__ClassPO.st	Wed Nov 14 13:09:49 2018 +0100
+++ b/SmallSense__ClassPO.st	Thu Jan 17 09:27:00 2019 +0000
@@ -114,15 +114,18 @@
         ] ifFalse:[
             label := klass nameWithoutNameSpacePrefix.
         ].
-        (ChangeSet current includesChangeForClass: klass) ifTrue:[ 
-            label := label asText emphasisAllAdd:(UserPreferences current emphasisForChangedCode)         
+    ].
+    (ChangeSet current includesChangeForClass: klass) ifTrue:[ 
+        label := label asText emphasisAllAdd:(UserPreferences current emphasisForChangedCode)         
+    ] ifFalse:[ 
+        label isText ifTrue:[ 
+            label := label string.
         ].
     ].
-
-    ^label
+    ^ label
 
     "Created: / 20-05-2014 / 11:29:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 03-11-2015 / 07:28:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 16-01-2019 / 23:53:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 showPrefix
--- a/SmallSense__MethodPO.st	Wed Nov 14 13:09:49 2018 +0100
+++ b/SmallSense__MethodPO.st	Thu Jan 17 09:27:00 2019 +0000
@@ -110,10 +110,17 @@
             label := (someClass compiledMethodAt: selector) printStringForBrowserWithSelector: selector.
         ]
     ].
+    (classes size == 1 and:[ChangeSet current includesChangeForClass: classes anElement selector: selector]) ifTrue:[ 
+        label := label asText emphasisAllAdd:(UserPreferences current emphasisForChangedCode)         
+    ] ifFalse:[ 
+        label isText ifTrue:[ 
+            label := label string.
+        ].
+    ].      
     ^ label
 
     "Created: / 07-04-2011 / 09:56:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 20-05-2014 / 10:28:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 16-01-2019 / 23:54:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 selector