Tools__ProjectBuilderAssistantApplication.st
changeset 2668 a762eafe51eb
parent 2659 bec4c94bc628
child 2669 3e0023b75ad9
equal deleted inserted replaced
2667:6cf6c1523e0c 2668:a762eafe51eb
    18 	classVariableNames:''
    18 	classVariableNames:''
    19 	poolDictionaries:''
    19 	poolDictionaries:''
    20 	category:'System-Support-Projects'
    20 	category:'System-Support-Projects'
    21 !
    21 !
    22 
    22 
       
    23 !ProjectBuilderAssistantApplication class methodsFor:'documentation'!
       
    24 
       
    25 documentation
       
    26 "
       
    27     a user friendly interface to the build process.
       
    28     Simply wraps up existing tools like the CodeGeneratorTool, the browsers
       
    29     and the ProjetBuilder
       
    30 
       
    31     [see also:]
       
    32         CodeGeneratorTool
       
    33         ProjectBuilder
       
    34         ProjectDefinition
       
    35 
       
    36     [author:]
       
    37         Claus Gittinger
       
    38 "
       
    39 ! !
    23 
    40 
    24 !ProjectBuilderAssistantApplication class methodsFor:'interface specs'!
    41 !ProjectBuilderAssistantApplication class methodsFor:'interface specs'!
    25 
    42 
    26 page1_projectTypeSelectionSpec
    43 page1_projectTypeSelectionSpec
    27     "This resource specification was automatically generated
    44     "This resource specification was automatically generated
   971     |appClass|
   988     |appClass|
   972 
   989 
   973     self hasApplicationSelected ifTrue:[
   990     self hasApplicationSelected ifTrue:[
   974         appClass := self listOfApplicationsInProject value at:(self selectedApplicationIndexHolder value).
   991         appClass := self listOfApplicationsInProject value at:(self selectedApplicationIndexHolder value).
   975         UserPreferences systemBrowserClass 
   992         UserPreferences systemBrowserClass 
   976             openInClass:appClass.
   993             openInClass:appClass class selector:#windowSpec.
   977     ].
   994     ].
   978 !
   995 !
   979 
   996 
   980 doBrowseProject
   997 doBrowseProject
   981     <resource: #uiCallback>
   998     <resource: #uiCallback>
  1001     |startupClass|
  1018     |startupClass|
  1002 
  1019 
  1003     self hasStartupClassSelected ifTrue:[
  1020     self hasStartupClassSelected ifTrue:[
  1004         startupClass := self listOfStartupClassesInProject value at:(self selectedStartupClassIndexHolder value).
  1021         startupClass := self listOfStartupClassesInProject value at:(self selectedStartupClassIndexHolder value).
  1005         UserPreferences systemBrowserClass 
  1022         UserPreferences systemBrowserClass 
  1006             openInClass:startupClass.
  1023             openInClass:startupClass class selector:#main:.
  1007     ].
  1024     ].
  1008 !
  1025 !
  1009 
  1026 
  1010 doGenerateProjectContentsDefinition
  1027 doGenerateProjectContentsDefinition
  1011     self generatePackageContentsMethods
  1028     self generatePackageContentsMethods
  1674     ].
  1691     ].
  1675     self selectedProjectsComment value:comment.
  1692     self selectedProjectsComment value:comment.
  1676 !
  1693 !
  1677 
  1694 
  1678 updateListOfApplicationsInProject
  1695 updateListOfApplicationsInProject
  1679     |applicationClasses package startUpClassName startUpClass appClassIndex|
  1696     |oldList applicationClasses package startUpClassName startUpClass 
       
  1697      appClass appClassIndex|
  1680 
  1698 
  1681     appClassIndex := nil.
  1699     appClassIndex := nil.
  1682     self selectedApplicationIndexHolder value:nil.
       
  1683 
  1700 
  1684     selectedProjectDefinition isNil ifTrue:[
  1701     selectedProjectDefinition isNil ifTrue:[
  1685         applicationClasses := #()
  1702         applicationClasses := #()
  1686     ] ifFalse:[
  1703     ] ifFalse:[
  1687         package := selectedProjectDefinition package.
  1704         package := selectedProjectDefinition package.
  1692                                         and:[ cls isSubclassOf:ApplicationModel ])
  1709                                         and:[ cls isSubclassOf:ApplicationModel ])
  1693                                     ].
  1710                                     ].
  1694         applicationClasses := applicationClasses asOrderedCollection.
  1711         applicationClasses := applicationClasses asOrderedCollection.
  1695         applicationClasses sort:[:a :b | a name < b name].
  1712         applicationClasses sort:[:a :b | a name < b name].
  1696 
  1713 
  1697         startUpClassName := [ selectedProjectDefinition startupClassName ] ifError:[ nil ].
  1714 "/        startUpClassName := [ selectedProjectDefinition startupClassName ] ifError:[ nil ].
  1698         startUpClassName notNil ifTrue:[
  1715 "/        startUpClassName notNil ifTrue:[
  1699             startUpClass := Smalltalk classNamed:startUpClassName.
  1716 "/            startUpClass := Smalltalk classNamed:startUpClassName.
  1700             startUpClass notNil ifTrue:[
  1717 "/            startUpClass notNil ifTrue:[
  1701                 appClassIndex := applicationClasses indexOf:startUpClass.
  1718 "/                appClassIndex := applicationClasses indexOf:startUpClass.
  1702                 appClassIndex == 0 ifTrue:[ appClassIndex := nil ].
  1719 "/                appClassIndex == 0 ifTrue:[ appClassIndex := nil ].
  1703             ].
  1720 "/            ].
  1704         ].
  1721 "/        ].
  1705     ].
  1722     ].
  1706     self listOfApplicationsInProject value:applicationClasses.
  1723 
  1707 
  1724     oldList := self listOfApplicationsInProject value.
  1708     self selectedApplicationIndexHolder value:appClassIndex.
  1725     oldList = applicationClasses ifFalse:[
       
  1726         appClass := selectedApplication.
       
  1727         appClassIndex := applicationClasses indexOf:appClass.
       
  1728         appClassIndex == 0 ifTrue:[ appClassIndex := nil ].
       
  1729 
       
  1730         self listOfApplicationsInProject value:applicationClasses.
       
  1731         self selectedApplicationIndexHolder value:appClassIndex.
       
  1732     ].
  1709 !
  1733 !
  1710 
  1734 
  1711 updateListOfClassesInProject
  1735 updateListOfClassesInProject
  1712     self listOfClassesInProject value:(selectedProjectDefinition classNames).
  1736     self listOfClassesInProject value:(selectedProjectDefinition classNames).
  1713 !
  1737 !