--- a/Tools__ProjectBuilderAssistantApplication.st Thu Jan 19 13:47:04 2012 +0100
+++ b/Tools__ProjectBuilderAssistantApplication.st Thu Jan 19 15:49:31 2012 +0100
@@ -30,7 +30,7 @@
newStartupClassName usedCompilerHolder listOfNewProjectsName
newProjectsNameListExtendedComboBox productNameHolder
companyNameHolder compilerWarnMessageHolder
- compilerWarnMessageVisibleHolder'
+ compilerWarnMessageVisibleHolder listOfPrerequisitesInProject'
classVariableNames:''
poolDictionaries:''
category:'System-Support-Projects'
@@ -250,6 +250,14 @@
)
(AssistantPageSpec
+ pageTitle: 'Specify Prerequisites'
+ windowSpecSelector: page5b_specifyPrerequisitePackages
+ enterCallbackSelector: enterPrerequisitesSpecification
+ canEnterQuerySelector: #canEnterPrerequisitesSelection
+ infoText: 'Define which (other) packages are needed as prerequisites. Press "<I>Scan</I>" to search for prerequisites; browse to edit the list manually.'
+ )
+
+ (AssistantPageSpec
pageTitle: 'Specify Project Attributes'
windowSpecSelector: page6a_specifyProjectAttributes
infoText: 'Define additional attributes.'
@@ -281,7 +289,7 @@
)
) decodeAsLiteralArray.
- "Modified: / 12-11-2010 / 12:27:56 / cg"
+ "Modified: / 19-01-2012 / 15:36:05 / cg"
! !
!ProjectBuilderAssistantApplication class methodsFor:'defaults'!
@@ -967,6 +975,91 @@
)
!
+page5b_specifyPrerequisitePackages
+ "This resource specification was automatically generated
+ by the UIPainter of ST/X."
+
+ "Do not manually edit this!! If it is corrupted,
+ the UIPainter may not be able to read the specification."
+
+ "
+ UIPainter new openOnClass:Tools::ProjectBuilderAssistantApplication andSelector:#page5b_specifyPrerequisitePackages
+ Tools::ProjectBuilderAssistantApplication new openInterface:#page5b_specifyPrerequisitePackages
+ "
+
+ <resource: #canvas>
+
+ ^
+ #(FullSpec
+ name: #'page5b_specifyPrerequisitePackages'
+ window:
+ (WindowSpec
+ label: 'Project Selection'
+ name: 'Project Selection'
+ min: (Point 0 0)
+ bounds: (Rectangle 0 0 521 400)
+ )
+ component:
+ (SpecCollection
+ collection: (
+ (FramedBoxSpec
+ label: 'Prerequisite Packages'
+ name: 'FramedBox3'
+ layout: (LayoutFrame 0 0.0 5 0 4 1.0 -30 1)
+ labelPosition: topLeft
+ translateLabel: true
+ component:
+ (SpecCollection
+ collection: (
+ (SequenceViewSpec
+ name: 'List1'
+ layout: (LayoutFrame 0 0 0 0 0 1 0 1)
+ initiallyDisabled: true
+ hasHorizontalScrollBar: true
+ hasVerticalScrollBar: true
+ useIndex: false
+ sequenceList: listOfPrerequisitesInProject
+ )
+ )
+
+ )
+ )
+ (HorizontalPanelViewSpec
+ name: 'HorizontalPanel1'
+ layout: (LayoutFrame 0 0 -30 1 0 1 0 1)
+ horizontalLayout: center
+ verticalLayout: center
+ horizontalSpace: 3
+ verticalSpace: 3
+ component:
+ (SpecCollection
+ collection: (
+ (ActionButtonSpec
+ label: 'Browse Project Definition'
+ name: 'Button3'
+ translateLabel: true
+ model: doBrowseProjectDefinitionClass
+ extent: (Point 180 22)
+ )
+ (ActionButtonSpec
+ label: 'Update Prerequisites (Scan)'
+ name: 'Button4'
+ translateLabel: true
+ model: doGenerateProjectPrerequisitesDefinition
+ extent: (Point 180 22)
+ )
+ )
+
+ )
+ )
+ )
+
+ )
+ )
+
+ "Modified: / 19-01-2012 / 15:45:14 / cg"
+!
+
page6a_specifyProjectAttributes
"This resource specification was automatically generated
by the UIPainter of ST/X."
@@ -1540,6 +1633,12 @@
self generatePackageContentsMethods
!
+doGenerateProjectPrerequisitesDefinition
+ self generatePackageContentsMethods
+
+ "Created: / 19-01-2012 / 15:44:23 / cg"
+!
+
doLaunchApplication
<resource: #uiCallback>
@@ -1903,6 +2002,17 @@
^ #('gcc')
!
+listOfPrerequisitesInProject
+ <resource: #uiAspect>
+
+ listOfPrerequisitesInProject isNil ifTrue:[
+ listOfPrerequisitesInProject := ValueHolder new.
+ ].
+ ^ listOfPrerequisitesInProject.
+
+ "Created: / 19-01-2012 / 15:39:34 / cg"
+!
+
listOfStartupClassesInProject
<resource: #uiAspect>
@@ -2303,17 +2413,23 @@
].
].
(prj class compiledMethodAt:#startupClassName) package == prj package ifFalse:[
- self infoHolder value:('startup class method (#startupClassName) must be in package "%1" (is in "%2")'
- bindWith:prj package
- with:(prj class compiledMethodAt:#startupClassName) package).
- ^ false
+ (prj class compiledMethodAt:#startupClassName) package == PackageId noProjectID ifFalse:[
+ self infoHolder value:('startup class method (#startupClassName) of %3 must be in package "%1" (is in "%2")'
+ bindWith:prj package
+ with:(prj class compiledMethodAt:#startupClassName) package
+ with:prj class name).
+ ^ false
+ ].
].
(prj class compiledMethodAt:#startupSelector) notNil ifTrue:[
(prj class compiledMethodAt:#startupSelector) package == prj package ifFalse:[
- self infoHolder value:('startup class method (#startupSelector) must be in package "%1" (is in "%2")'
- bindWith:prj package
- with:(prj class compiledMethodAt:#startupSelector) package).
- ^ false
+ (prj class compiledMethodAt:#startupSelector) package == PackageId noProjectID ifFalse:[
+ self infoHolder value:('startup class method (#startupSelector) of %3 must be in package "%1" (is in "%2")'
+ bindWith:prj package
+ with:(prj class compiledMethodAt:#startupSelector) package
+ with:prj class name).
+ ^ false
+ ]
].
].
cls := Smalltalk classNamed:prj startupClassName.
@@ -2331,7 +2447,7 @@
].
^ true.
- "Modified: / 04-12-2011 / 20:18:12 / cg"
+ "Modified: / 19-01-2012 / 15:30:54 / cg"
!
canEnterDeploy
@@ -2344,6 +2460,18 @@
"Modified: / 23-08-2011 / 12:13:23 / cg"
!
+canEnterPrerequisitesSelection
+ |prj cls impl|
+
+ self hasProjectSelected ifFalse:[
+ self infoHolder value:'no project selected'.
+ ^ false
+ ].
+ ^ true.
+
+ "Created: / 19-01-2012 / 15:37:30 / cg"
+!
+
canEnterStartupClassSelection
self hasProjectSelected ifFalse:[
self infoHolder value:'no project selected'.
@@ -2455,6 +2583,32 @@
self updateListOfClassesInProject.
!
+enterPrerequisitesSpecification
+ |toAdd|
+
+ self updateListOfPrerequisitesInProject.
+
+"/ toAdd := OrderedCollection new.
+"/
+"/ "/ ensure that startup & app-class are in the list
+"/ selectedApplication notNil ifTrue:[
+"/ (selectedProjectDefinition classNames includes:selectedApplication name) ifFalse:[
+"/ toAdd add:selectedApplication.
+"/ ].
+"/ ].
+"/ selectedStartupClass notNil ifTrue:[
+"/ (selectedProjectDefinition classNames includes:selectedStartupClass name) ifFalse:[
+"/ toAdd add:selectedStartupClass.
+"/ ].
+"/ ].
+"/
+"/ selectedProjectDefinition includeClasses:toAdd usingCompiler:nil.
+"/
+"/ self updateListOfClassesInProject.
+
+ "Created: / 19-01-2012 / 15:36:47 / cg"
+!
+
rememberMakeOutputsContents
makeOutputHolder value:(makeOutputWindow contents)
!
@@ -2625,6 +2779,12 @@
self listOfNewProjectsName value:loadedProjectIDsWithoutProjectDefinition.
!
+updateListOfPrerequisitesInProject
+ self listOfPrerequisitesInProject value:(selectedProjectDefinition preRequisites).
+
+ "Created: / 19-01-2012 / 15:39:15 / cg"
+!
+
updateListOfStartupClassesInProject
|startupClasses package startUpClassName startUpClass startupClassIndex|