Skip to content

Commit

Permalink
Cut dependencies of Iceberg on UI
Browse files Browse the repository at this point in the history
- Remove #morphicOpen: that is dead code
- Move IceMergeResolationRequest>>defaultAction to Iceberg-TipUI since it is here to open the Tip UI
- Move IceExperimentalFeature to Iceberg since this is raised in Iceberg's code and not in the UI code
  • Loading branch information
jecisc committed Jun 24, 2024
1 parent 4c9079e commit b5f7711
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 43 deletions.
19 changes: 19 additions & 0 deletions Iceberg-TipUI/IceMergeResolutionRequest.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Extension { #name : 'IceMergeResolutionRequest' }

{ #category : '*Iceberg-TipUI' }
IceMergeResolutionRequest >> defaultAction [

| window mergeMorph |
mergeMorph := (IceTipMergeMorph forMerger: merge).

mergeMorph
fromDescription: merge sourceDescription;
toDescription: merge targetDescription.

window := mergeMorph newWindow
title: 'Merge';
yourself.

window openModal.
^ mergeMorph merged
]
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ This is useful to guarantee the correct keeping of the changes.
Class {
#name : 'IceExperimentalFeature',
#superclass : 'IceWarning',
#category : 'Iceberg-TipUI-Exceptions',
#package : 'Iceberg-TipUI',
#tag : 'Exceptions'
#category : 'Iceberg-Errors',
#package : 'Iceberg',
#tag : 'Errors'
}

{ #category : 'visiting' }
Expand Down
18 changes: 0 additions & 18 deletions Iceberg/IceMergeResolutionRequest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,6 @@ Class {
#tag : 'Errors'
}

{ #category : 'exception description' }
IceMergeResolutionRequest >> defaultAction [

| window mergeMorph |
mergeMorph := (IceTipMergeMorph forMerger: merge).

mergeMorph
fromDescription: merge sourceDescription;
toDescription: merge targetDescription.

window := mergeMorph newWindow
title: 'Merge';
yourself.

window openModal.
^ mergeMorph merged
]

{ #category : 'accessing' }
IceMergeResolutionRequest >> merge [
^ merge
Expand Down
18 changes: 0 additions & 18 deletions Iceberg/IceMetacelloRepositoryAdapter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -124,24 +124,6 @@ IceMetacelloRepositoryAdapter >> loadPackageNamed: aName intoLoader: aLoader [
self }
]

{ #category : 'MonticelloGUI' }
IceMetacelloRepositoryAdapter >> morphicOpen: workingCopy [

| shouldOpenIceberg |
shouldOpenIceberg :=
SpApplication defaultApplication newConfirm
title: 'Browsing an iceberg repository';
label: ('{1} belongs to {2} and cannot be browsed here.
Do you want to open the Iceberg Browser instead?' format: {
workingCopy packageName.
self repository name });
acceptLabel: 'Open';
cancelLabel: 'Cancel';
openModal.
shouldOpenIceberg ifFalse: [ ^ self ].
IceTipRepositoriesBrowser new open
]

{ #category : 'accessing' }
IceMetacelloRepositoryAdapter >> packageNamed: aName [

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
"
I'm a general warning in the context of iceberg UI.
I'm a general warning in the context of iceberg.
"
Class {
#name : 'IceWarning',
#superclass : 'Warning',
#category : 'Iceberg-TipUI-Exceptions',
#package : 'Iceberg-TipUI',
#tag : 'Exceptions'
#category : 'Iceberg-Errors',
#package : 'Iceberg',
#tag : 'Errors'
}

{ #category : 'visiting' }
Expand Down

0 comments on commit b5f7711

Please sign in to comment.