add parsing .xml in /hoe/user/.config/launcher/templates
MODIFY
src/Pharo-Launcher-Core.package/PharoLauncherModelExistingImage.class/properties.json
src/Pharo-Launcher-Core.package/PharoLauncherModelExistingImage.class/properties.json
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
- "instvars" : [
- "listElement",
- "url"
- ],
+ "instvars" : [ ],
"name" : "PharoLauncherModelExistingImage",
"type" : "normal"
}
\ No newline at end of file

ADD
src/Pharo-Launcher-Core.package/PharoLauncherModelLocalTemplate.class/README.md
+A PharoLauncherModelLocalTemplate is a specific model to fetch if templates exists in the (default directory)/templates/
\ No newline at end of file

ADD
src/Pharo-Launcher-Core.package/PharoLauncherModelLocalTemplate.class/class/category..st
+as yet unclassified
+category: aString
+ "Default directory where a .xml should be there, doesn't matter about the string ... for the moment..."
+ ^ self category: aString
+ url: self imageDirectory / 'templates'
\ No newline at end of file

ADD
src/Pharo-Launcher-Core.package/PharoLauncherModelLocalTemplate.class/instance/buildList..st
+as yet unclassified
+buildList: aString
+ ^ self buildList
\ No newline at end of file

ADD
src/Pharo-Launcher-Core.package/PharoLauncherModelLocalTemplate.class/instance/buildList.st
+as yet unclassified
+buildList
+ | list |
+ list := OrderedCollection new.
+ self listElement do:[ :each |
+ list add: (each name) asString ].
+ ^list sorted: [:a :b | a name < b name].
\ No newline at end of file

ADD
src/Pharo-Launcher-Core.package/PharoLauncherModelLocalTemplate.class/instance/fetchOnlineImage..st
+as yet unclassified
+fetchOnlineImage: aFileName
+
+ | xmlDoc list |
+ xmlDoc := XMLDOMParser parseFileNamed: aFileName.
+ list := OrderedCollection new.
+ xmlDoc allElementsNamed: #template do: [:each |
+ list add: (PharoLauncherElement
+ name: (each nodes elementAt: #name) nodes first asString
+ url: (each nodes elementAt: #url) nodes first asString
+ category: (each nodes elementAt: #category) nodes first asString )].
+ ^ list
\ No newline at end of file

ADD
src/Pharo-Launcher-Core.package/PharoLauncherModelLocalTemplate.class/instance/fetchOnlineImage.st
+as yet unclassified
+fetchOnlineImage
+
+ self listElement: OrderedCollection new.
+ (FileList new directory: self url) fileList do:[ :each |
+ self listElement add: (self fetchOnlineImage: each)].
\ No newline at end of file

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

add parsing .xml in /hoe/user/.config/launcher/templates