After 'creating an image' from a network repository, the 'Local' templates are not updated. Fixed by adding class PhLCaceLocalTemplateGroup, method #refreshLocal, and related refactoring.
(https://pharo.fogbugz.com/f/cases/11614)
ADD
src/Pharo-Launcher-Core.package/PhLCacheLocalTemplateGroup.class/README.md
src/Pharo-Launcher-Core.package/PhLCacheLocalTemplateGroup.class/README.md
ADD
src/Pharo-Launcher-Core.package/PhLCacheLocalTemplateGroup.class/instance/refreshLocal.st
+action
+refreshLocal
+ self refresh
\ No newline at end of file

ADD
src/Pharo-Launcher-Core.package/PhLCacheLocalTemplateGroup.class/instance/reset.st
+action
+reset
+ "Request for showing up to date information *without* refreshing groups that would take time to refresh."
+ "So its okay to refresh cache of local template groups."
+ self refresh.
\ No newline at end of file

ADD
src/Pharo-Launcher-Core.package/PhLCacheLocalTemplateGroup.class/properties.json
+{
+ "commentStamp" : "",
+ "super" : "PhLCacheTemplateGroup",
+ "category" : "Pharo-Launcher-Core",
+ "classinstvars" : [ ],
+ "pools" : [ ],
+ "classvars" : [ ],
+ "instvars" : [ ],
+ "name" : "PhLCacheLocalTemplateGroup",
+ "type" : "normal"
+}
\ No newline at end of file

ADD
src/Pharo-Launcher-Core.package/PhLCacheTemplateGroup.class/instance/refreshLocal.st
+action
+refreshLocal
+"For network template group cache, do nothing. Overriden by subclass for local template group cache"
\ No newline at end of file

MODIFY
src/Pharo-Launcher-Core.package/PhLCacheTemplateGroup.class/instance/reset.st
src/Pharo-Launcher-Core.package/PhLCacheTemplateGroup.class/instance/reset.st
action
reset
"Request for showing up to date information *without* refreshing groups that would take time to refresh."
-
- delegate isLocal
- ifTrue: [ self refresh ]
- ifFalse: [
- "We replace the content by an indication that a full refresh is necessary"
- templatesAndGroups := Array with: PhLEmptyError new ]
\ No newline at end of file
+ "For network cache we replace the content by an indication that a full refresh is necessary"
+ templatesAndGroups := Array with: PhLEmptyError new.
\ No newline at end of file

MODIFY
src/Pharo-Launcher-Core.package/PhLTemplateGroupRepository.class/instance/addGroup..st
src/Pharo-Launcher-Core.package/PhLTemplateGroupRepository.class/instance/addGroup..st
private
addGroup: aGroup
- | cache |
- cache := PhLCacheTemplateGroup group: aGroup. "wrap all groups inside a cache."
- aGroup isLocal "always put the local groups before the rest for rapid access"
- ifTrue: [ groupCaches addFirst: cache ]
- ifFalse: [ groupCaches addLast: cache ]
\ No newline at end of file
+ "Always put the local groups before the rest for rapid access"
+ aGroup isLocal
+ ifTrue:
+ [ groupCaches addFirst: (PhLCacheLocalTemplateGroup group: aGroup)
+ ]
+ ifFalse:
+ [ groupCaches addLast: (PhLCacheTemplateGroup group: aGroup)
+ ]
\ No newline at end of file

ADD
src/Pharo-Launcher-Core.package/PhLTemplateGroupRepository.class/instance/refreshLocal.st
+action
+refreshLocal
+ groupCaches do: #refreshLocal
\ No newline at end of file

After 'creating an image' from a network repository, the 'Local' templates are not updated. Fixed by adding class PhLCaceLocalTemplateGroup, method #refreshLocal, and related refactoring.
(https://pharo.fogbugz.com/f/cases/11614)