Skip to content

Commit

Permalink
Remove duplication + add comments + add printons
Browse files Browse the repository at this point in the history
  • Loading branch information
jecisc committed Oct 31, 2018
1 parent cc206ae commit eea1d75
Show file tree
Hide file tree
Showing 18 changed files with 59 additions and 30 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
printing
printOn: aStream
super printOn: aStream.
aStream
nextPut: $[;
nextPutAll: self name;
nextPut: $]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
printing
printOn: aStream
super printOn: aStream.
aStream nextPut: $(.
self realObject printOn: aStream.
aStream nextPut: $)
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,10 @@ initializeBranchesList
dataSource: (dataSource := self newBranchListDataSource);
bindKeyCombination: Character cr toAction: [ self accept ];
onAnnouncement: FTStrongSelectionChanged do: [ self accept ].


"
We would prefere to have this implementation but for now we have a bug with the caches because #branchModels return the same cache used by the datasource but not #defaultBranchSelection. If we correct that later we can clean the code bellow.
self model defaultBranchSelection ifNotNil: [ :branchModel | branchesList widget selectRowIndex: (dataSource elements indexOf: branchModel) ]."

self model branchModels detect: #isHead ifFound: [ :head | branchesList widget selectRowIndex: (dataSource elements indexOf: head) ] ifNone: [ self model hasBranches ifTrue: [ branchesList widget selectFirstVisibleRow ] ]

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
branches
^ self entity branches

This file was deleted.

12 changes: 7 additions & 5 deletions Iceberg-TipUI.package/IceTipRemoteModel.class/properties.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{
"classtraitcomposition" : "TWithBranchModel classTrait",
"classvars" : [ ],
"instvars" : [ ],
"name" : "IceTipRemoteModel",
"commentStamp" : "EstebanLorenzano 5/30/2018 14:33",
"super" : "IceTipEntityModel",
"category" : "Iceberg-TipUI-Model",
"traitcomposition" : "TWithBranchModel",
"type" : "normal",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [ ],
"name" : "IceTipRemoteModel",
"type" : "normal"
"category" : "Iceberg-TipUI-Model"
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
branches
^ self entity localBranches

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"classtraitcomposition" : "TIceCopyCommitId classTrait",
"classtraitcomposition" : "TIceCopyCommitId classTrait + TWithBranchModel classTrait",
"classvars" : [ ],
"instvars" : [ ],
"name" : "IceTipRepositoryModel",
"commentStamp" : "EstebanLorenzano 5/30/2018 14:33",
"super" : "IceTipEntityModel",
"traitcomposition" : "TIceCopyCommitId",
"traitcomposition" : "TIceCopyCommitId + TWithBranchModel",
"type" : "normal",
"classinstvars" : [ ],
"pools" : [ ],
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
branches
branchModels
^ self branches collect: [ :each | (IceTipBranchModel repositoryModel: self repositoryModel on: each) beCached ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
branches
branches
^ self explicitRequirement
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
accessing
defaultBranchSelection
^ self branchModels
detect: #isHead
ifNone: [ self hasBranches
ifTrue: [ self branchModels ifNotEmpty: #anyOne ] ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
testing
hasBranches
^ self branches isNotEmpty
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
repositoryModel
^ self explicitRequirement
7 changes: 7 additions & 0 deletions Iceberg-TipUI.package/TWithBranchModel.trait/properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"commentStamp" : "",
"classinstvars" : [ ],
"category" : "Iceberg-TipUI-Model",
"instvars" : [ ],
"name" : "TWithBranchModel"
}

0 comments on commit eea1d75

Please sign in to comment.