diff -r 644ed357b524 -r 379bd54db35b ProjectBrowser.st --- a/ProjectBrowser.st Tue Oct 05 19:01:00 1999 +0200 +++ b/ProjectBrowser.st Wed Oct 06 14:32:45 1999 +0200 @@ -14,7 +14,8 @@ ToolApplicationModel subclass:#ProjectBrowser - instanceVariableNames:'projectTree modifiedChannel selectedTreeNodeHolder' + instanceVariableNames:'projectTree modifiedChannel selectedTreeNodeHolder + lastMoveToProject' classVariableNames:'AlreadCheckedExistingModulesAndPackages' poolDictionaries:'' category:'Interface-Smalltalk' @@ -1849,7 +1850,7 @@ #name: 'ProjectBrowser' #min: #(#Point 10 10) #max: #(#Point 1024 768) - #bounds: #(#Rectangle 509 332 1112 883) + #bounds: #(#Rectangle 20 94 623 645) #menu: #mainMenu #icon: #bigProjectBrowserIcon ) @@ -1903,8 +1904,12 @@ #handles: #(#Any 0.389718 1.0) ) #(#ArbitraryComponentSpec - #name: 'ArbitraryComponent1' + #name: 'commandOutputView' + #hasHorizontalScrollBar: true + #hasVerticalScrollBar: true + #miniScrollerHorizontal: true #hasBorder: false + #component: #TextCollector ) ) @@ -3741,6 +3746,20 @@ ! +makeTranscriptVisible + |transcript| + + transcript := self transcript. + + (transcript relativeCorner y - transcript relativeOrigin y) < 0.1 ifTrue:[ + (self builder componentAt:#VariableVerticalPanel1) + resizeSubViewsTo:#(0.7 0.3) + ]. + + + +! + nodeFor:aProject "generate and return a treeNode for some project" @@ -4126,6 +4145,10 @@ ^ mthd ! +transcript + ^ self builder componentAt:#commandOutputView +! + updateProjectTree |tree moduleRoots root showWhat| @@ -5198,41 +5221,46 @@ ^ self ]. + self makeTranscriptVisible. + self withCursor:Cursor wait do:[ "/ prepare the building ... - (p propertyAt:#deliverLoadAllFile) == true ifTrue:[ - p createLoadAllFile - ]. - - (p propertyAt:#deliverSources) == true ifTrue:[ - p createSourceFiles - ]. - - (p propertyAt:#deliverMakefiles) == true ifTrue:[ - self buildMakefiles - ]. - - (p propertyAt:#deliverCompiledBinary) == true ifTrue:[ - self buildCompiledClassLibrary - ]. - - (p propertyAt:#deliverByteCode) == true ifTrue:[ - self buildByteCodeClassLibrary - ]. - - "/ now, deploy ... - - (p propertyAt:#deliverZipArchive) == true ifTrue:[ - p buildZipArchive - ]. - - (p propertyAt:#deliverTarArchive) == true ifTrue:[ - p buildTarArchive - ]. - - (p propertyAt:#deliverGZipArchive) == true ifTrue:[ - p buildGZipArchive + TextCollector transcriptQuerySignal answer:self transcript + do:[ + (p propertyAt:#deliverLoadAllFile) == true ifTrue:[ + p createLoadAllFile + ]. + + (p propertyAt:#deliverSources) == true ifTrue:[ + p createSourceFiles + ]. + + (p propertyAt:#deliverMakefiles) == true ifTrue:[ + self buildMakefiles + ]. + + (p propertyAt:#deliverCompiledBinary) == true ifTrue:[ + self buildCompiledClassLibrary + ]. + + (p propertyAt:#deliverByteCode) == true ifTrue:[ + self buildByteCodeClassLibrary + ]. + + "/ now, deploy ... + + (p propertyAt:#deliverZipArchive) == true ifTrue:[ + p buildZipArchive + ]. + + (p propertyAt:#deliverTarArchive) == true ifTrue:[ + p buildTarArchive + ]. + + (p propertyAt:#deliverGZipArchive) == true ifTrue:[ + p buildGZipArchive + ]. ]. ]. @@ -5242,7 +5270,7 @@ buildCompiledClassLibrary "compile a binary class library in the projects directory" - |p diagnosticFile diagnostic error textBox| + |p diagnostic error textBox| p := self currentProject. p isNil ifTrue:[ @@ -5265,38 +5293,26 @@ ^ self ]. + self makeTranscriptVisible. + "/ now, execute the makefile found there ... - diagnosticFile := Filename newTemporary. - diagnostic := diagnosticFile writeStream. + diagnostic := self transcript. + error := false. - - [ - self withCursor:Cursor wait do:[ - OperatingSystem - executeCommand:'make' - inputFrom:nil - outputTo:diagnostic - errorTo:diagnostic - inDirectory:(p directory asFilename pathName) - onError:[error := true]. - ]. - - diagnostic close. - - textBox := TextBox new. - textBox initialText:(diagnosticFile readStream contents). - textBox title:'Make Diagnostic output:'. - textBox readOnly:true. - textBox noCancel. - textBox label:'Make Diagnostic output'. - textBox extent:(600@250); sizeFixed:true. - textBox showAtPointer. - - ] valueNowOrOnUnwindDo:[ - diagnosticFile delete + diagnostic nextPutLine:('Building compiled class library...' asText emphasizeAllWith:#color->Color blue). + + self withCursor:Cursor wait do:[ + OperatingSystem + executeCommand:'make' + inputFrom:nil + outputTo:diagnostic + errorTo:diagnostic + inDirectory:(p directory asFilename pathName) + onError:[error := true]. ]. + ! buildLoadAllFile @@ -5311,7 +5327,11 @@ ]. self withCursor:Cursor wait do:[ - p createLoadAllFile. + self makeTranscriptVisible. + TextCollector transcriptQuerySignal answer:self transcript + do:[ + p createLoadAllFile. + ] ] ! @@ -5327,8 +5347,12 @@ ]. self withCursor:Cursor wait do:[ - p createProtoMakefile. - p createMakefile + self makeTranscriptVisible. + TextCollector transcriptQuerySignal answer:self transcript + do:[ + p createProtoMakefile. + p createMakefile + ] ]. ! @@ -5464,12 +5488,15 @@ mthd := self selectedMethod. mthd notNil ifTrue:[ - newPackage := Dialog request:'Move to project:'. - (newPackage size > 0 and:[newPackage ~= p package]) ifTrue:[ - mthd package:newPackage asSymbol. - p removeMethod:mthd. - self updatePatchesListForProject:p. - self projectTree remove:self selectedTreeNode. + newPackage := Dialog request:'Move to project:' initialAnswer:lastMoveToProject. + newPackage size > 0 ifTrue:[ + lastMoveToProject := newPackage. + newPackage ~= p package ifTrue:[ + mthd package:newPackage asSymbol. + p removeMethod:mthd. + self updatePatchesListForProject:p. + self projectTree remove:self selectedTreeNode. + ] ] ]. !