-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
26 additions
and
3 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
src/Squot.package/SqueakWorkingCopy.class/instance/basicName..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
basicName: aString | ||
name := aString. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
src/Squot.package/SquotBrowser.class/instance/actionRenameActiveProject.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters