-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
even if there is an intromission from "IceLog" class that need to be …
…reviewed
- Loading branch information
Showing
35 changed files
with
166 additions
and
33 deletions.
There are no files selected for viewing
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
4 changes: 1 addition & 3 deletions
4
Iceberg-Plugin.package/IcePluginManager.class/class/managerFor..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 |
---|---|---|
@@ -1,5 +1,3 @@ | ||
instance creation | ||
managerFor: aRepository | ||
^ self managers | ||
at: aRepository | ||
ifAbsentPut: [ self basicNew initializeRepository: aRepository ]. | ||
^ self basicNew initializeRepository: aRepository |
3 changes: 0 additions & 3 deletions
3
Iceberg-Plugin.package/IcePluginManager.class/class/managers.st
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
Iceberg-Plugin.package/IcePluginManager.class/instance/availablePluginsFor..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
3 changes: 3 additions & 0 deletions
3
Iceberg-Plugin.package/IcePluginManager.class/instance/configurePluginsFor..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 | ||
configurePluginsFor: aRepository | ||
plugins := self availablePluginsFor: aRepository |
2 changes: 1 addition & 1 deletion
2
Iceberg-Plugin.package/IcePluginManager.class/instance/initializeRepository..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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
initialization | ||
initializeRepository: aRepository. | ||
self initialize. | ||
plugins := self availablePluginsFor: aRepository | ||
self configurePluginsFor: aRepository |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
SystemOrganization addCategory: #'Iceberg-Plugin'! | ||
SystemOrganization addCategory: 'Iceberg-Plugin-Base'! | ||
SystemOrganization addCategory: 'Iceberg-Plugin-General'! | ||
SystemOrganization addCategory: 'Iceberg-Plugin-Pharo-FogBugz'! | ||
SystemOrganization addCategory: #'Iceberg-Plugin-Base'! | ||
SystemOrganization addCategory: #'Iceberg-Plugin-General'! | ||
SystemOrganization addCategory: #'Iceberg-Plugin-Pharo-FogBugz'! |
6 changes: 4 additions & 2 deletions
6
Iceberg-UI.package/IceAbstractModel.class/class/compactIfNeeded.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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
private | ||
compactIfNeeded | ||
| newModelCache | | ||
self models size > 250 ifFalse: [ ^ self ]. | ||
"it looks like rehash will do what I need :)" | ||
modelCache rehash | ||
newModelCache := self models select: [ :each | each notNil ]. | ||
modelCache := newModelCache | ||
|
21 changes: 12 additions & 9 deletions
21
Iceberg-UI.package/IceAbstractModel.class/class/modelFor..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 |
---|---|---|
@@ -1,14 +1,17 @@ | ||
instance creation | ||
modelFor: entity | ||
| model | | ||
"We are using a WeakSet for keeping models because using a dictionary (sorted by | ||
name) has problems when cleaning. This should be efficient enough, but we'll see." | ||
model := self models | ||
detect: [ :each | each entity name = entity name ] | ||
ifNone: [ nil ]. | ||
"We are using WeakValueDictionary to keep this sinchronized (in case you have more than | ||
one window open, you want always same model). Now, it has to be cleaned when windows are | ||
no longer around, but associations will be nil... so we cannot use a simple ifAbsentPut:. | ||
Yep, ugly... but effective." | ||
|
||
model := self models at: entity name ifAbsent: [ nil ]. | ||
^ model ifNil: [ | ||
self compactIfNeeded. | ||
self models add: (self basicNew | ||
entity: entity; | ||
initialize; | ||
yourself) ] | ||
self models | ||
at: entity name | ||
put: (self basicNew | ||
entity: entity; | ||
initialize; | ||
yourself) ] |
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
3 changes: 3 additions & 0 deletions
3
Iceberg-UI.package/IceCloneRepositoryModel.class/instance/configureRepository..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 @@ | ||
private | ||
configureRepository: aRepository | ||
aRepository 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
3 changes: 1 addition & 2 deletions
3
Iceberg-UI.package/IceRepositoryModel.class/instance/restore.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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
actions | ||
restore | ||
self repository backend cloneRepository. | ||
self repository refresh. | ||
(IceRestoreRepositoryModel repository: self repository) openWithSpec |
Empty file.
3 changes: 3 additions & 0 deletions
3
Iceberg-UI.package/IceRestoreRepositoryModel.class/class/new.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 @@ | ||
instance creation | ||
new | ||
self error: 'Use #repository:' |
5 changes: 5 additions & 0 deletions
5
Iceberg-UI.package/IceRestoreRepositoryModel.class/class/repository..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,5 @@ | ||
instance creation | ||
repository: aRepository | ||
^ self basicNew | ||
initializeRepository: aRepository; | ||
yourself |
6 changes: 6 additions & 0 deletions
6
Iceberg-UI.package/IceRestoreRepositoryModel.class/instance/configureRepository..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 @@ | ||
private | ||
configureRepository: aRepository | ||
repository location = aRepository location | ||
ifFalse: [ repository location: aRepository location ]. | ||
repository subdirectory = aRepository subdirectory | ||
ifFalse: [ repository subdirectory: aRepository subdirectory ] |
8 changes: 8 additions & 0 deletions
8
Iceberg-UI.package/IceRestoreRepositoryModel.class/instance/initializeRepository..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,8 @@ | ||
initialization | ||
initializeRepository: aRepository | ||
repository := aRepository. | ||
self initialize. | ||
repository location ifNotNil: [ | ||
remoteUrl text: repository origin url. | ||
localDirectoryLocation location: repository location ]. | ||
subdirectory text: repository subdirectory |
13 changes: 13 additions & 0 deletions
13
Iceberg-UI.package/IceRestoreRepositoryModel.class/properties.json
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,13 @@ | ||
{ | ||
"commentStamp" : "", | ||
"super" : "IceCloneRepositoryModel", | ||
"category" : "Iceberg-UI-View", | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ ], | ||
"instvars" : [ | ||
"repository" | ||
], | ||
"name" : "IceRestoreRepositoryModel", | ||
"type" : "normal" | ||
} |
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,4 +1,4 @@ | ||
querying | ||
mergeBaseWith: anotherCommit | ||
^ self repository commitAt: | ||
(self repository backend mergeBaseBetween: self id and: anotherCommit id) | ||
(self repository mergeBaseBetween: self id and: anotherCommit id) |
Empty file.
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,5 @@ | ||
instance creation | ||
for: aRepository | ||
^ self basicNew | ||
initializeRepository: aRepository; | ||
yourself |
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 @@ | ||
instance creation | ||
new | ||
self error: '#for:' |
4 changes: 4 additions & 0 deletions
4
Iceberg.package/IceLog.class/instance/cypressClassOrTraitName..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,4 @@ | ||
private | ||
cypressClassOrTraitName: aMethod | ||
^ aMethod origin name, (self cypressMethodClassExtension: aMethod) | ||
|
5 changes: 5 additions & 0 deletions
5
Iceberg.package/IceLog.class/instance/cypressMethodClassExtension..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,5 @@ | ||
private | ||
cypressMethodClassExtension: aMethod | ||
aMethod isExtension ifTrue: [ ^ '.extension' ]. | ||
aMethod origin isTrait ifTrue: [ ^ '.trait' ]. | ||
^ '.class' |
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 @@ | ||
private | ||
cypressMethodName: aMethod | ||
^ (MCFileTreeStCypressWriter fileNameForSelector: aMethod selector asString), '.st' |
5 changes: 5 additions & 0 deletions
5
Iceberg.package/IceLog.class/instance/cypressMethodSideName..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,5 @@ | ||
private | ||
cypressMethodSideName: aMethod | ||
^ aMethod origin isClassSide | ||
ifTrue: [ 'class' ] | ||
ifFalse: [ 'instance' ] |
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 @@ | ||
private | ||
cypressPackageName: aPackage | ||
^ aPackage name, '.package' |
15 changes: 15 additions & 0 deletions
15
Iceberg.package/IceLog.class/instance/fileNameForMethod..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,15 @@ | ||
private | ||
fileNameForMethod: aMethod | ||
| path | | ||
|
||
path := OrderedCollection new. | ||
self repository subdirectory | ||
ifNotEmpty: [ :subDir | path add: subDir ]. | ||
path | ||
add: (self cypressPackageName: aMethod origin package); | ||
add: (self cypressClassOrTraitName: aMethod); | ||
add: (self cypressMethodSideName: aMethod); | ||
add: (self cypressMethodName: aMethod). | ||
|
||
^ String streamContents: [ :stream | | ||
path asStringOn: stream delimiter: '/' ] |
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,27 @@ | ||
accessing | ||
historyOfMethod: aMethod | ||
| path commit pathSpec options history | | ||
|
||
path := self fileNameForMethod: aMethod. | ||
|
||
commit := self repository branch lastCommit. | ||
pathSpec := LGitPathSpec withAll: { path }. | ||
options := LGitDiffOptions defaults. | ||
options pathspec: (LGitStringArray withAll: { path }). | ||
|
||
history := OrderedCollection new. | ||
self repository newCommitWalk | ||
fromCommit: commit; | ||
rawResultsDo: [ :eachCommit | | parents tree | | ||
parents := eachCommit numberOfParents. | ||
tree := eachCommit tree. | ||
parents = 0 | ||
ifTrue: [ | ||
(tree matchesPathSpec: pathSpec) | ||
ifTrue: [ history add: eachCommit ] ] | ||
ifFalse: [ | ||
eachCommit parents do: [ :eachParent | | diff | | ||
diff := tree diffTo: eachParent tree options: options. | ||
diff numberOfDeltas > 0 | ||
ifTrue: [ history add: eachCommit ] ] ] ]. | ||
^ history collect: [ :each | IceLibgitLocalRepository parseCommitInfo: each ] |
4 changes: 4 additions & 0 deletions
4
Iceberg.package/IceLog.class/instance/initializeRepository..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,4 @@ | ||
initialization | ||
initializeRepository: aRepository | ||
repository := aRepository. | ||
self initialize |
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 | ||
repository | ||
^ repository |
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,13 @@ | ||
{ | ||
"commentStamp" : "", | ||
"super" : "Object", | ||
"category" : "Iceberg-Changes", | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ ], | ||
"instvars" : [ | ||
"repository" | ||
], | ||
"name" : "IceLog", | ||
"type" : "normal" | ||
} |
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 | ||
log | ||
^ IceLog for: self |