Skip to content

Commit

Permalink
Merge pull request #1144 from pharo-vcs/dev-1.0
Browse files Browse the repository at this point in the history
Preparing release of v1.5.2
  • Loading branch information
tesonep authored Jan 8, 2019
2 parents 2daec22 + c6b9078 commit 07f556a
Show file tree
Hide file tree
Showing 61 changed files with 293 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ commander: spec
baseline: 'Commander'
with: [
spec
repository: 'github://pharo-ide/Commander:v0.7.1/src';
repository: 'github://pharo-ide/Commander:v0.7.2/src';
loads: #('Core' 'AllActivators' 'Commander-SpecSupport') ]
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ baseline
tonel: spec
spec
baseline: 'Tonel'
with: [ spec repository: 'github://pharo-vcs/tonel:v1.0.11' ]
with: [ spec repository: 'github://pharo-vcs/tonel:v1.0.12' ]
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ mcRepository
createRepository)
register ].

^ repository metacelloAdapter
^ repository metacelloAdapter: repository head description.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ mcRepository
| baseRepo |

self guessRegisteredRepository
ifNotNil: [ :repo | ^ repo metacelloAdapter ].
ifNotNil: [ :repo | ^ repo metacelloAdapter: self projectVersion ].

baseRepo := self mcRepositoryClass location: self location.
^ (Iceberg icebergRepositoriesURLs includes: baseRepo scpUrl)
Expand All @@ -12,5 +12,5 @@ mcRepository
see https://github.com/pharo-vcs/iceberg/issues/168"
baseRepo ]
ifFalse: [
baseRepo getOrCreateIcebergRepository metacelloAdapter ]
baseRepo getOrCreateIcebergRepository metacelloAdapter: self projectVersion ]

Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ accessing
guessRegisteredRepository
"I get the project name and try to find it into the already registered projects.
If I find it, I will use this instead cloning a new one."
| projectName |

projectName := (self location substrings: '/') third copyUpTo: $:.

^ IceRepository registry
detect: [ : each | each name = projectName ]
detect: [ : each | each name = self projectName ]
ifNone: [ nil ]
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ mcRepository
| baseRepo |

self guessRegisteredRepository
ifNotNil: [ :repo | ^ repo metacelloAdapter ].
ifNotNil: [ :repo | ^ repo metacelloAdapter: self projectVersion ].

baseRepo := self mcRepositoryClass location: self location.
^ baseRepo getOrCreateIcebergRepository metacelloAdapter
^ baseRepo getOrCreateIcebergRepository metacelloAdapter: self projectVersion
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
projectName

^ (self location substrings: '/') third copyUpTo: $:
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
projectVersion

^ (location substrings: '/') third copyAfter: $:
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
testing
isAbstract

^ self name = #AbstractIceMetacelloIntegrationTests
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"commentStamp" : "",
"super" : "IceParameterizedTestCase",
"category" : "Iceberg-Tests-MetacelloIntegration",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [
"repository",
"conflictingRepository"
],
"name" : "AbstractIceMetacelloIntegrationTests",
"type" : "normal"
}
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
{
"commentStamp" : "",
"super" : "IceParameterizedTestCase",
"super" : "AbstractIceMetacelloIntegrationTests",
"category" : "Iceberg-Tests-MetacelloIntegration",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [
"CommitishToUse"
],
"instvars" : [
"repository",
"conflictingRepository"
],
"instvars" : [ ],
"name" : "IceMetacelloIntegrationTests",
"type" : "normal"
}
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
configuring
repositoryName

^ 'test-project-source-properties-tonel'
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
tests
tearDown

super tearDown.

(IceRepository registry select: [ :e | e name = 'test-project-with-dep' ]) do: [ :each | each ifNotNil: [ :repo |
repo unload.
repo forget.
repo location ifNotNil: #ensureDeleteAll ] ].

"Cleanup Metacello registry to avoid conflicts"
MetacelloProjectRegistration registry baselineRegistry
detect: [ :registration | registration projectName = 'TestProjectWithDep' ]
ifFound: [ :registration | registration unregisterProject ].

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
tests
testConflictDetectedWithProjectWithDependency

Metacello new
baseline: 'PharoGitTest';
repository:'github://pharo-vcs/test-project-source-properties-tonel';
load.

self assert: self repositoryForTest head description equals: 'master'.
self assert: (Smalltalk classNamed: #Test) new versionNumber equals: 700.

self should: [Metacello new
baseline: 'TestProjectWithDep';
repository:'github://pharo-vcs/test-project-with-dep';
load] raise: MetacelloConflictingProjectError.

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
tests
testIncommingWhenProjectWithDependency

Metacello new
baseline: 'PharoGitTest';
repository:'github://pharo-vcs/test-project-source-properties-tonel';
load.

self assert: self repositoryForTest head description equals: 'master'.
self assert: (Smalltalk classNamed: #Test) new versionNumber equals: 700.

Metacello new
baseline: 'TestProjectWithDep';
repository:'github://pharo-vcs/test-project-with-dep';
onConflictUseIncoming;
load.

self assert: self repositoryForTest head description equals: '1.2.3'.
self assert: (Smalltalk classNamed: #Test) new versionNumber equals: 697.

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
tests
testKeepExistingWhenProjectWithDependency

Metacello new
baseline: 'PharoGitTest';
repository:'github://pharo-vcs/test-project-source-properties-tonel';
load.

self assert: self repositoryForTest head description equals: 'master'.
self assert: (Smalltalk classNamed: #Test) new versionNumber equals: 700.

Metacello new
baseline: 'TestProjectWithDep';
repository:'github://pharo-vcs/test-project-with-dep';
onConflictUseLoaded;
load.

self assert: self repositoryForTest head description equals: 'master'.
self assert: (Smalltalk classNamed: #Test) new versionNumber equals: 700.

Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
tests
testUpdateProjectShouldCheckoutTheNewVersion

Metacello new
baseline: 'PharoGitTest';
repository:'github://pharo-vcs/test-project-source-properties-tonel';
load.

self assert: self repositoryForTest head description equals: 'master'.
self assert: (Smalltalk classNamed: #Test) new versionNumber equals: 700.

Metacello new
baseline: 'PharoGitTest';
repository:'github://pharo-vcs/test-project-source-properties-tonel:1.2.3';
onConflictUseIncoming;
load.

self assert: self repositoryForTest head description equals: '1.2.3'.
self assert: (Smalltalk classNamed: #Test) new versionNumber equals: 697.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"commentStamp" : "",
"super" : "AbstractIceMetacelloIntegrationTests",
"category" : "Iceberg-Tests-MetacelloIntegration",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [ ],
"name" : "IceMetacelloIntegrationUpdateALoadedVersionTest",
"type" : "normal"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*Iceberg-TipUI
toggle
self isExpanded
ifTrue: [ self collapseAndRefresh ]
ifFalse: [ self expandAndRefresh ]
3 changes: 3 additions & 0 deletions Iceberg-TipUI.package/FTBasicItem.extension/properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"name" : "FTBasicItem"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
TOMOVE
colorModified
self flag: #todo. "Make themable"
^ Color r: 0 g: 0.5 b: 0
^ Smalltalk ui theme successTextColor
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Description
--------------------

I am a cell used to render the header of an outline datasource.

Since the header should not be part of the tree, to collapse it we do not have a button but I am clickable. (I show a web cursor to show the feature to the user)
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
instance creation
dataSource: aDataSource item: anItem
^ self new
dataSource: aDataSource;
item: anItem;
yourself
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
dataSource: aDataSource
dataSource := aDataSource
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
initialize
defaultColor
^ self theme backgroundColor negated alpha: 0.05
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
event handling
handlesMouseDown: evt
^ true
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
event handling
handlesMouseOver: evt
^ true
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
item: anItem
item := anItem
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
event handling
mouseEnter: evt
self currentHand showTemporaryCursor: Cursor webLink.
super mouseEnter: evt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
event handling
mouseLeave: evt
self currentHand showTemporaryCursor: nil.
super mouseLeave: evt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
event handling
mouseUp: evt
((dataSource canDisplayChildrenOf: item) and: [ item children isNotEmpty ])
ifTrue: [ item toggle ].
super mouseUp: evt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"commentStamp" : "CyrilFerlicot 11/8/2018 12:00",
"super" : "FTCellMorph",
"category" : "Iceberg-TipUI-View-DataSource",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [
"dataSource",
"item"
],
"name" : "IceTipOutlineHeaderCellMorph",
"type" : "normal"
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
private factory
newSidebarTreeDataSource
^ IceTipTreeDataSource new
^ IceTipTreeOutlineDataSource new
tool: self;
rootForItems: self model repositoryModelsByGroup;
childrenBlock: [ :each | each children ];
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Description
--------------------

I'm a tree datasource to generate an Outline component.

My roots are displayed as section and not as part of the tree.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
instance creation
cellColumn: column row: rowIndex
| item |

item := self elementAt: rowIndex.
^ item depth = 0
ifTrue: [ self newRootCellFor: item ]
ifFalse: [ self newCellFor: item ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
private factory
cellIndentFor: item
^ ((item depth - 1) * 16) + 3
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
instance creation
newRootCellFor: item
| cell |
cell := IceTipOutlineHeaderCellMorph dataSource: self item: item.
(self iconFor: item data) ifNotNil: [ :icon | cell addMorphBack: icon asMorph ].
cell addMorphBack: (self toString: item data) asMorph asReadOnlyMorph.
cell addMorphBack: (AlignmentMorph newSpacer: Color transparent).
cell addMorphBack: item children size asMorph asReadOnlyMorph.
"Since we might have a scroll bar we do not want to have the number of children displayed at the extreme right."
cell addMorphBack: (Morph newBounds: (0 @ 0 corner: 20 @ 0) color: Color transparent) asReadOnlyMorph.
^ cell
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"commentStamp" : "CyrilFerlicot 11/8/2018 12:01",
"super" : "IceTipTreeDataSource",
"category" : "Iceberg-TipUI-View-DataSource",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [ ],
"name" : "IceTipTreeOutlineDataSource",
"type" : "normal"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
commitish: aCommittish

committish := aCommittish
Loading

0 comments on commit 07f556a

Please sign in to comment.