Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Call Chain from StateSpecs Load Conflict
MetacelloAllowConflictingProjectUpgrade>>defaultAction
UndefinedObject>>handleSignal:
Context>>handleSignal:
Context>>handleSignal:
MetacelloAllowConflictingProjectUpgrade(Exception)>>pass
[ ^ exception pass ] in MetacelloScriptEngine>>handleConflict: in Block: [ ^ exception pass ]
Dictionary>>at:ifAbsent:
MetacelloScriptEngine>>handleConflict:
MetacelloAllowConflictingProjectUpgrade>>handleResolutionFor:
[ :ex | "option handlers need to be outermost set of handlers ... last line of defense before users are involved" ex handleResolutionFor: self ] in [ [ actionBlock
on:
MetacelloLookupProjectSpec , MetacelloLookupProjectSpecForLoad
, MetacelloProjectSpecLoadedNotification
, MetacelloScriptEnsureProjectLoadedForDevelopment
, MetacelloLookupBaselineSpecForEnsureLoad
do:
[ :ex | "lookup and registration handlers need to be innermost set of handlers ...they may throw option notifications" ex handleResolutionFor: self ] ]
on:
MetacelloAllowProjectDowngrade , MetacelloAllowProjectUpgrade
, MetacelloAllowConflictingProjectUpgrade
do:
[ :ex | "option handlers need to be outermost set of handlers ... last line of defense before users are involved" ex handleResolutionFor: self ] ] in [ [ [ actionBlock
on:
MetacelloLookupProjectSpec , MetacelloLookupProjectSpecForLoad
, MetacelloProjectSpecLoadedNotification
, MetacelloScriptEnsureProjectLoadedForDevelopment
, MetacelloLookupBaselineSpecForEnsureLoad
do:
[ :ex | "lookup and registration handlers need to be innermost set of handlers ...they may throw option notifications" ex handleResolutionFor: self ] ]
on:
MetacelloAllowProjectDowngrade , MetacelloAllowProjectUpgrade
, MetacelloAllowConflictingProjectUpgrade
do:
[ :ex | "option handlers need to be outermost set of handlers ... last line of defense before users are involved" ex handleResolutionFor: self ] ]
on: MetacelloAllowLockedProjectChange
do:
[ :ex | "MetacelloAllowLockedProjectChange need to be outermost handler ... since it is signaled from second line of handlers" ex handleResolutionFor: self ] ] in MetacelloScriptEngine>>handleNotificationsForAction: in Block: [ :ex | "option handlers need to be outermost set ...etc...
BlockClosure>>cull:
Context>>evaluateSignal:
Context>>handleSignal:
MetacelloAllowConflictingProjectUpgrade(Exception)>>signal
[ :existing :new |
(existing hasLoadConflicts: new)
ifTrue: [ ((existing canUpgradeTo: new)
ifTrue: [ MetacelloAllowProjectUpgrade new ]
ifFalse: [ (existing canDowngradeTo: new)
ifTrue: [ MetacelloAllowProjectDowngrade new ]
ifFalse: [ MetacelloAllowConflictingProjectUpgrade new ] ])
existingProjectRegistration: existing;
newProjectRegistration: new;
signal ]
ifFalse: [ new ] ] in MetacelloScriptEngine>>lookupProjectSpecFor: in Block: [ :existing :new | ...
[ :existing | ^ presentBlock value: existing value: newRegistration ] in MetacelloProjectRegistration class>>registrationForProjectSpec:ifAbsent:ifPresent: in Block: [ :existing | ^ presentBlock value: existing value...etc...
[ :existing | ^ presentBlock value: existing ] in MetacelloProjectRegistry>>registrationFor:ifPresent:ifAbsent: in Block: [ :existing | ^ presentBlock value: existing ]
BlockClosure>>cull:
Dictionary>>at:ifPresent:
MetacelloProjectRegistry>>registrationFor:ifPresent:ifAbsent:
MetacelloProjectRegistration class>>registrationForProjectSpec:ifAbsent:ifPresent:
MetacelloScriptEngine>>lookupProjectSpecFor:
MetacelloScriptEngine>>handleLookupProjectSpecForLoad:
MetacelloLookupProjectSpecForLoad>>handleResolutionFor:
[ :ex | "lookup and registration handlers need to be innermost set of handlers ...they may throw option notifications" ex handleResolutionFor: self ] in [ actionBlock
on:
MetacelloLookupProjectSpec , MetacelloLookupProjectSpecForLoad
, MetacelloProjectSpecLoadedNotification
, MetacelloScriptEnsureProjectLoadedForDevelopment
, MetacelloLookupBaselineSpecForEnsureLoad
do:
[ :ex | "lookup and registration handlers need to be innermost set of handlers ...they may throw option notifications" ex handleResolutionFor: self ] ] in [ [ actionBlock
on:
MetacelloLookupProjectSpec , MetacelloLookupProjectSpecForLoad
, MetacelloProjectSpecLoadedNotification
, MetacelloScriptEnsureProjectLoadedForDevelopment
, MetacelloLookupBaselineSpecForEnsureLoad
do:
[ :ex | "lookup and registration handlers need to be innermost set of handlers ...they may throw option notifications" ex handleResolutionFor: self ] ]
on:
MetacelloAllowProjectDowngrade , MetacelloAllowProjectUpgrade
, MetacelloAllowConflictingProjectUpgrade
do:
[ :ex | "option handlers need to be outermost set of handlers ... last line of defense before users are involved" ex handleResolutionFor: self ] ] in [ [ [ actionBlock
on:
MetacelloLookupProjectSpec , MetacelloLookupProjectSpecForLoad
, MetacelloProjectSpecLoadedNotification
, MetacelloScriptEnsureProjectLoadedForDevelopment
, MetacelloLookupBaselineSpecForEnsureLoad
do:
[ :ex | "lookup and registration handlers need to be innermost set of handlers ...they may throw option notifications" ex handleResolutionFor: self ] ]
on:
MetacelloAllowProjectDowngrade , MetacelloAllowProjectUpgrade
, MetacelloAllowConflictingProjectUpgrade
do:
[ :ex | "option handlers need to be outermost set of handlers ... last line of defense before users are involved" ex handleResolutionFor: self ] ]
on: MetacelloAllowLockedProjectChange
do:
[ :ex | "MetacelloAllowLockedProjectChange need to be outermost handler ... since it is signaled from second line of handlers" ex handleResolutionFor: self ] ] in MetacelloScriptEngine>>handleNotificationsForAction: in Block: [ :ex | "lookup and registration handlers need to ...etc...
BlockClosure>>cull:
Context>>evaluateSignal:
Context>>handleSignal:
Context>>handleSignal:
MetacelloLookupProjectSpecForLoad(Exception)>>signal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment