Skip to content

Commit

Permalink
Add rename project menu item
Browse files Browse the repository at this point in the history
  • Loading branch information
MariusDoe committed Dec 8, 2023
1 parent a3ec3ac commit e99cc2c
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
basicName: aString
name := aString.
9 changes: 8 additions & 1 deletion src/Squot.package/SqueakWorkingCopy.class/instance/name..st
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
accessing
name: aString
name := aString
self name = aString ifTrue: [^ self].
self isRegistered ifFalse: [^ self basicName: aString].
(self class isNameRegistered: aString)
ifTrue: [^ self error: 'Cannot rename to a name that is already taken.'].
self
unregister;
basicName: aString;
register.
3 changes: 3 additions & 0 deletions src/Squot.package/SqueakWorkingCopy.class/instance/rename.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
rename
self name: ((self class requestUnregisteredNameFrom: self name) ifNil: [^ self]).
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"allMappers" : "mad 10/21/2023 22:58",
"allReferences" : "mad 11/30/2023 21:44",
"basicHeadRef" : "mad 11/30/2023 13:15",
"basicName:" : "mad 12/8/2023 17:30",
"branchName:" : "mad 6/4/2023 16:09",
"branchesBaseName" : "mad 6/4/2023 16:09",
"changeSetsFromCommit:toCommit:" : "mad 9/6/2023 19:28",
Expand Down Expand Up @@ -109,7 +110,7 @@
"mergeCommit:into:withBase:" : "mad 8/23/2023 19:49",
"mergeFSCommit:into:withBase:" : "mad 9/20/2023 13:01",
"name" : "mad 9/19/2023 11:52",
"name:" : "mad 9/19/2023 11:52",
"name:" : "mad 12/8/2023 17:31",
"pushRef:" : "mad 9/18/2023 20:07",
"refChanged:" : "mad 9/15/2023 11:05",
"refName:" : "mad 6/3/2023 14:17",
Expand All @@ -124,6 +125,7 @@
"remoteRefName:" : "mad 11/29/2023 16:15",
"removeCredentialsFor:" : "mad 10/17/2023 12:01",
"removeMapper:" : "mad 9/20/2023 17:30",
"rename" : "mad 12/8/2023 17:33",
"repository" : "mad 11/30/2023 17:02",
"repositoryExists" : "mad 11/30/2023 17:03",
"requestCredentialsFor:ifCanceled:" : "mad 9/18/2023 12:49",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
actions
actionRenameActiveProject
| workingCopy |
workingCopy := self activeWorkingCopyIfNilInformAnd: [^ self].
workingCopy rename.
self activeWorkingCopy: workingCopy. "gets reset to nil during rename"
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ projectListMenu: aMenu
self activeWorkingCopy ifNotNil: [
aMenu
target: self;
add: 'Rename this project' action: #actionRenameActiveProject;
add: 'Remove this project' action: #actionRemoveActiveProject;
add: 'Manage remotes'
target: SquotRemotesBrowser
Expand Down
3 changes: 2 additions & 1 deletion src/Squot.package/SquotBrowser.class/methodProperties.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"actionPush:" : "mad 9/26/2023 16:57",
"actionRefreshRefList" : "mad 10/24/2023 19:54",
"actionRemoveActiveProject" : "mad 9/21/2023 11:55",
"actionRenameActiveProject" : "mad 12/8/2023 18:46",
"actionResetToActiveCommit" : "mad 11/29/2023 16:38",
"actionResetToActiveCommitAndRestoreIt" : "mad 11/29/2023 16:39",
"actionSelfUpdate" : "mad 10/16/2023 23:03",
Expand Down Expand Up @@ -92,7 +93,7 @@
"openDialogToShowChangeSetsFromCommit:to:" : "mad 10/22/2023 00:56",
"openDialogToShowChangeSetsFromImageTo:" : "mad 11/29/2023 16:48",
"otherMenu:" : "mad 10/24/2023 17:14",
"projectListMenu:" : "mad 11/3/2023 15:11",
"projectListMenu:" : "mad 12/8/2023 17:24",
"refChanged:" : "mad 9/15/2023 11:04",
"refList" : "mad 11/30/2023 21:44",
"refListMenu:" : "mad 11/29/2023 16:16",
Expand Down

0 comments on commit e99cc2c

Please sign in to comment.