"the set of all classes defined in the latest edition of a config map" | aSet theMapName | aSet := Set new. theMapName := 'BPA Base'. ((EmConfigurationMap editionsFor: theMapName) first applicationNames collect: [:appName | Smalltalk at: appName asSymbol]) do: [:app | app withAllSubApplications inject: aSet into: [:theSet :eachApp | theSet addAll: eachApp classes; yourself]]. ^aSet asSortedCollection: [ :a :b | a name < b name]. "--------------" "the set of all applications that have ever held a class" | aSet theClassName | theClassName := 'GPMenuView'. aSet := Set new. EmConfigurationMap configurationMapNames do: [:mapName | (EmConfigurationMap editionsFor: mapName) do: [:edition | edition shadowApplications do: [:app | app withAllSubApplications do: [:eachApp | (eachApp classes contains: [:c | c name = theClassName asSymbol]) ifTrue: [aSet add: app]]]]]. ^aSet asSortedCollection "--------------" "the set of all config maps that have ever held an application" | aSet theAppName | theAppName := 'FileSystem'. aSet := Set new. EmConfigurationMap configurationMapNames do: [ :name | (EmConfigurationMap editionsFor: name) do: [ :edition | (edition applicationNames includes: theAppName) ifTrue: [ aSet add: name ]]]. ^aSet asSortedCollection "--------------" "the set of all config maps where the latest edition holds an application" | aSet theAppName | theAppName := 'FileSystem'. aSet := Set new. EmConfigurationMap configurationMapNames do: [ :name | ((EmConfigurationMap editionsFor: name) first applicationNames includes: theAppName) ifTrue: [ aSet add: name ]]. ^aSet asSortedCollection "--------------" "the set of all config maps that have ever pre-req'd a given config map" | aSet theMapName | theMapName := 'VisualWorks Oracle Connect'. aSet := Set new. EmConfigurationMap configurationMapNames do: [ :name | (EmConfigurationMap editionsFor: name) do: [ :edition | (edition requiredMaps select: [ :m | m name = theMapName]) notEmpty ifTrue: [ aSet add: edition name ]]]. ^aSet asSortedCollection "--------------" "the set of all applications in a given config map" | aSet theMapName theMap newMap | theMapName := 'SWCTestMap'. aSet := Set new. theMap := (EmConfigurationMap editionsFor: theMapName) first. theMap areApplicationsLoaded ifTrue: [ theMap applicationNames do: [ :name | aSet add: name asClass]]. ^aSet "--------------" "the create new editions of all applications in a given config map" | theMapName theMap newMap | theMapName := 'SWCTestMap'. theMap := (EmConfigurationMap editionsFor: theMapName) first. (theMap areApplicationsLoaded and: [theMap manager = EmUser current]) ifTrue: [ newMap := theMap newEdition. newMap applicationNames do: [ :name | | app oldUser | app := name asClass. oldUser := EmUser current. (EmUser classPool declareVariable: 'CurrentUser') value: app manager. app newEdition. (EmUser classPool declareVariable: 'CurrentUser') value: oldUser. newMap addApplication: app.]. newMap]. " $Id: snippet.txt,v 1.1.1.1 2003/09/04 11:44:16 Owner Exp $ "