Add the possibility to rename a local template
ADD
src/PharoLauncher-Core.package/PhLAbstractTemplate.class/instance/renameTo..st
+as yet unclassified
+renameTo: aString
+ name := aString
\ No newline at end of file

ADD
src/PharoLauncher-Core.package/PhLLocalTemplate.class/instance/renameTo..st
+as yet unclassified
+renameTo: aString
+ super renameTo: aString.
+ zipFile renameTo: aString, '.zip'
\ No newline at end of file

MODIFY
src/PharoLauncher-Core.package/PhLRemoveTemplateCommand.class/class/group.st
src/PharoLauncher-Core.package/PhLRemoveTemplateCommand.class/class/group.st
accessing
group
- ^ 2
\ No newline at end of file
+ ^ 3
\ No newline at end of file

MODIFY
src/PharoLauncher-Core.package/PhLRemoveTemplateCommand.class/properties.json
src/PharoLauncher-Core.package/PhLRemoveTemplateCommand.class/properties.json
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
- "instvars" : [
- "newImageName"
- ],
+ "instvars" : [ ],
"name" : "PhLRemoveTemplateCommand",
"type" : "normal"
}
\ No newline at end of file

ADD
src/PharoLauncher-Core.package/PhLRenameTemplateCommand.class/README.md
+Rename the selected template
\ No newline at end of file

ADD
src/PharoLauncher-Core.package/PhLRenameTemplateCommand.class/class/group.st
+accessing
+group
+ ^ 2
\ No newline at end of file

ADD
src/PharoLauncher-Core.package/PhLRenameTemplateCommand.class/class/icon.st
+accessing
+icon
+ ^ self iconNamed: #workspace
\ No newline at end of file

ADD
src/PharoLauncher-Core.package/PhLRenameTemplateCommand.class/class/title.st
+accessing
+title
+ ^ 'Rename template'
\ No newline at end of file

ADD
src/PharoLauncher-Core.package/PhLRenameTemplateCommand.class/instance/execute.st
+action
+execute
+ | name |
+ name := self newImageName.
+ name ifNil: [ ^ self ].
+ self
+ ensure: (context isNewLocalTemplateNameValid: name).
+ context singleTemplate renameTo: name.
+ context templateRepositoryChanged
\ No newline at end of file

ADD
src/PharoLauncher-Core.package/PhLRenameTemplateCommand.class/instance/isApplicable.st
+testing
+isApplicable
+ ^ super isApplicable and: [ context hasSingleLocalTemplateSelected ]
\ No newline at end of file

ADD
src/PharoLauncher-Core.package/PhLRenameTemplateCommand.class/instance/newImageName.st
+accessing
+newImageName
+ ^ newImageName ifNil: [ newImageName := context requestNewImageName: context singleTemplateName ]
\ No newline at end of file

ADD
src/PharoLauncher-Core.package/PhLRenameTemplateCommand.class/properties.json
+{
+ "commentStamp" : "VincentBlondeau 5/24/2018 13:30",
+ "super" : "PhLTemplateCommand",
+ "category" : "PharoLauncher-Core-Commands",
+ "classinstvars" : [ ],
+ "pools" : [ ],
+ "classvars" : [ ],
+ "instvars" : [
+ "newImageName"
+ ],
+ "name" : "PhLRenameTemplateCommand",
+ "type" : "normal"
+}
\ No newline at end of file

Add the possibility to rename a local template