356 ProjectBrowser new openInterface:#emptyRightCanvasSpec |
356 ProjectBrowser new openInterface:#emptyRightCanvasSpec |
357 " |
357 " |
358 |
358 |
359 <resource: #canvas> |
359 <resource: #canvas> |
360 |
360 |
361 ^ |
361 ^ |
362 |
362 #(#FullSpec |
363 #(#FullSpec |
363 #name: #emptyRightCanvasSpec |
364 #window: |
364 #window: |
365 #(#WindowSpec |
365 #(#WindowSpec |
366 #name: 'NewApplication' |
366 #label: 'NewApplication' |
367 #layout: #(#LayoutFrame 216 0 173 0 515 0 472 0) |
367 #name: 'NewApplication' |
368 #label: 'NewApplication' |
368 #min: #(#Point 10 10) |
369 #min: #(#Point 10 10) |
369 #max: #(#Point 1280 1024) |
370 #max: #(#Point 1280 1024) |
370 #bounds: #(#Rectangle 10 20 310 320) |
371 #bounds: #(#Rectangle 216 173 516 473) |
371 ) |
372 #usePreferredExtent: false |
372 #component: |
373 ) |
373 #(#SpecCollection |
374 #component: |
374 #collection: #( |
375 #(#SpecCollection |
375 #(#TextEditorSpec |
376 #collection: |
376 #name: 'TextEditor1' |
377 #( |
377 #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
378 #(#TextEditorSpec |
378 #initiallyInvisible: true |
379 #name: 'TextEditor1' |
379 #model: #rightCanvasTextHolder |
380 #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
380 #hasHorizontalScrollBar: true |
381 #model: #rightCanvasTextHolder |
381 #hasVerticalScrollBar: true |
382 #hasHorizontalScrollBar: true |
382 #miniScrollerHorizontal: true |
383 #hasVerticalScrollBar: true |
383 #isReadOnly: true |
384 #miniScrollerHorizontal: true |
384 ) |
385 #isReadOnly: true |
385 ) |
386 ) |
386 |
387 ) |
387 ) |
388 ) |
|
389 ) |
388 ) |
390 ! |
389 ! |
391 |
390 |
392 rightCanvasSpecForClassList |
391 rightCanvasSpecForClassList |
393 "This resource specification was automatically generated |
392 "This resource specification was automatically generated |
693 |
692 |
694 "Do not manually edit this!! If it is corrupted, |
693 "Do not manually edit this!! If it is corrupted, |
695 the UIPainter may not be able to read the specification." |
694 the UIPainter may not be able to read the specification." |
696 |
695 |
697 " |
696 " |
698 UIPainter new openOnClass:ProjectBrowser andSelector:#emptyRightCanvasSpec |
697 UIPainter new openOnClass:ProjectBrowser andSelector:#rightCanvasSpecForEditableText |
699 ProjectBrowser new openInterface:#emptyRightCanvasSpec |
698 ProjectBrowser new openInterface:#rightCanvasSpecForEditableText |
700 " |
699 " |
701 |
700 |
702 <resource: #canvas> |
701 <resource: #canvas> |
703 |
702 |
704 ^ |
703 ^ |
705 |
704 #(#FullSpec |
706 #(#FullSpec |
705 #name: #rightCanvasSpecForEditableText |
707 #window: |
706 #window: |
708 #(#WindowSpec |
707 #(#WindowSpec |
709 #name: 'NewApplication' |
708 #label: 'NewApplication' |
710 #layout: #(#LayoutFrame 216 0 173 0 515 0 472 0) |
709 #name: 'NewApplication' |
711 #label: 'NewApplication' |
710 #min: #(#Point 10 10) |
712 #min: #(#Point 10 10) |
711 #max: #(#Point 1280 1024) |
713 #max: #(#Point 1280 1024) |
712 #bounds: #(#Rectangle 216 173 516 473) |
714 #bounds: #(#Rectangle 216 173 516 473) |
713 ) |
715 #usePreferredExtent: false |
714 #component: |
716 ) |
715 #(#SpecCollection |
717 #component: |
716 #collection: #( |
718 #(#SpecCollection |
717 #(#TextEditorSpec |
719 #collection: |
718 #name: 'TextEditor1' |
720 #( |
719 #layout: #(#LayoutFrame 0 0.0 30 0.0 0 1.0 0 1.0) |
721 #(#TextEditorSpec |
720 #model: #rightCanvasTextHolder |
722 #name: 'TextEditor1' |
721 #hasHorizontalScrollBar: true |
723 #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
722 #hasVerticalScrollBar: true |
724 #model: #rightCanvasTextHolder |
723 #miniScrollerHorizontal: true |
725 #hasHorizontalScrollBar: true |
724 ) |
726 #hasVerticalScrollBar: true |
725 #(#LabelSpec |
727 #miniScrollerHorizontal: true |
726 #label: 'Label' |
728 #isReadOnly: false |
727 #name: 'Label1' |
729 ) |
728 #layout: #(#LayoutFrame 0 0 0 0 0 1 30 0) |
730 ) |
729 #translateLabel: true |
731 ) |
730 #labelChannel: #textCanvasLabelHolder |
|
731 #adjust: #left |
|
732 ) |
|
733 ) |
|
734 |
|
735 ) |
732 ) |
736 ) |
733 ! |
737 ! |
734 |
738 |
735 rightCanvasSpecForFiles |
739 rightCanvasSpecForFiles |
736 "This resource specification was automatically generated |
740 "This resource specification was automatically generated |
1417 |
1421 |
1418 "Do not manually edit this!! If it is corrupted, |
1422 "Do not manually edit this!! If it is corrupted, |
1419 the UIPainter may not be able to read the specification." |
1423 the UIPainter may not be able to read the specification." |
1420 |
1424 |
1421 " |
1425 " |
1422 UIPainter new openOnClass:ProjectBrowser andSelector:#emptyRightCanvasSpec |
1426 UIPainter new openOnClass:ProjectBrowser andSelector:#rightCanvasSpecForReadOnlyText |
1423 ProjectBrowser new openInterface:#emptyRightCanvasSpec |
1427 ProjectBrowser new openInterface:#rightCanvasSpecForReadOnlyText |
1424 " |
1428 " |
1425 |
1429 |
1426 <resource: #canvas> |
1430 <resource: #canvas> |
1427 |
1431 |
1428 ^ |
1432 ^ |
1429 |
1433 #(#FullSpec |
1430 #(#FullSpec |
1434 #name: #rightCanvasSpecForReadOnlyText |
1431 #window: |
1435 #window: |
1432 #(#WindowSpec |
1436 #(#WindowSpec |
1433 #name: 'NewApplication' |
1437 #label: 'NewApplication' |
1434 #layout: #(#LayoutFrame 216 0 173 0 515 0 472 0) |
1438 #name: 'NewApplication' |
1435 #label: 'NewApplication' |
1439 #min: #(#Point 10 10) |
1436 #min: #(#Point 10 10) |
1440 #max: #(#Point 1280 1024) |
1437 #max: #(#Point 1280 1024) |
1441 #bounds: #(#Rectangle 216 173 516 473) |
1438 #bounds: #(#Rectangle 216 173 516 473) |
1442 ) |
1439 #usePreferredExtent: false |
1443 #component: |
1440 ) |
1444 #(#SpecCollection |
1441 #component: |
1445 #collection: #( |
1442 #(#SpecCollection |
1446 #(#TextEditorSpec |
1443 #collection: |
1447 #name: 'TextEditor1' |
1444 #( |
1448 #layout: #(#LayoutFrame 0 0.0 30 0.0 0 1.0 0 1.0) |
1445 #(#TextEditorSpec |
1449 #model: #rightCanvasTextHolder |
1446 #name: 'TextEditor1' |
1450 #hasHorizontalScrollBar: true |
1447 #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
1451 #hasVerticalScrollBar: true |
1448 #model: #rightCanvasTextHolder |
1452 #miniScrollerHorizontal: true |
1449 #hasHorizontalScrollBar: true |
1453 #isReadOnly: true |
1450 #hasVerticalScrollBar: true |
1454 ) |
1451 #miniScrollerHorizontal: true |
1455 #(#LabelSpec |
1452 #isReadOnly: true |
1456 #label: 'Label' |
1453 ) |
1457 #name: 'Label1' |
1454 ) |
1458 #layout: #(#LayoutFrame 0 0 0 0 0 1 30 0) |
1455 ) |
1459 #translateLabel: true |
|
1460 #labelChannel: #textCanvasLabelHolder |
|
1461 #adjust: #left |
|
1462 ) |
|
1463 ) |
|
1464 |
|
1465 ) |
1456 ) |
1466 ) |
1457 ! |
1467 ! |
1458 |
1468 |
1459 windowSpec |
1469 windowSpec |
1460 "This resource specification was automatically generated |
1470 "This resource specification was automatically generated |
1604 #enabled: #hasClassesSelectedHolder |
1614 #enabled: #hasClassesSelectedHolder |
1605 ) |
1615 ) |
1606 #(#MenuItem |
1616 #(#MenuItem |
1607 #label: 'Add Classes found in image' |
1617 #label: 'Add Classes found in image' |
1608 #translateLabel: true |
1618 #translateLabel: true |
1609 #value: #addClassesImage |
1619 #value: #addClassesFromImage |
1610 #enabled: #hasClassesSelectedHolder |
1620 #enabled: #hasClassesSelectedHolder |
1611 ) |
1621 ) |
1612 #(#MenuItem |
1622 #(#MenuItem |
1613 #label: 'Add Classes from files found in directory' |
1623 #label: 'Add Classes from files found in directory' |
1614 #translateLabel: true |
1624 #translateLabel: true |
2912 holder onChangeSend:#projectFilterChanged to:self. |
2922 holder onChangeSend:#projectFilterChanged to:self. |
2913 ]. |
2923 ]. |
2914 ^ holder. |
2924 ^ holder. |
2915 |
2925 |
2916 "Created: / 23.3.1999 / 14:18:05 / cg" |
2926 "Created: / 23.3.1999 / 14:18:05 / cg" |
|
2927 ! |
|
2928 |
|
2929 textCanvasLabelHolder |
|
2930 "automatically generated by UIPainter ..." |
|
2931 |
|
2932 |holder| |
|
2933 |
|
2934 (holder := builder bindingAt:#textCanvasLabelHolder) isNil ifTrue:[ |
|
2935 builder aspectAt:#textCanvasLabelHolder put:(holder :='' asValue). |
|
2936 ]. |
|
2937 ^ holder. |
2917 ! ! |
2938 ! ! |
2918 |
2939 |
2919 !ProjectBrowser methodsFor:'change & update'! |
2940 !ProjectBrowser methodsFor:'change & update'! |
2920 |
2941 |
2921 update:something with:aParameter from:changedObject |
2942 update:something with:aParameter from:changedObject |
3255 docNode add:(userDocNode := ProjectTreeItem name:'Error Reports'). |
3276 docNode add:(userDocNode := ProjectTreeItem name:'Error Reports'). |
3256 docNode add:(userDocNode := ProjectTreeItem name:'Other'). |
3277 docNode add:(userDocNode := ProjectTreeItem name:'Other'). |
3257 ]. |
3278 ]. |
3258 |
3279 |
3259 prerequisitesNode icon:(self class prerequisitesIcon). |
3280 prerequisitesNode icon:(self class prerequisitesIcon). |
3260 prerequisitesNode add:(prerequisiteProjectsNode := ProjectTreeItem name:'Projects'). |
3281 prerequisitesNode add:(prerequisiteProjectsNode := ProjectTreeItem name:'Packages'). |
3261 prerequisitesNode add:(prerequisiteClassesNode := ProjectTreeItem name:'Classes'). |
3282 prerequisitesNode add:(prerequisiteClassesNode := ProjectTreeItem name:'Classes'). |
3262 prerequisitesNode info:'Other projects and classes required by the project'. |
3283 prerequisitesNode info:'Other projects and classes required by the project'. |
3263 |
3284 |
3264 prerequisiteProjectsNode contents:#prerequisiteProjects. |
3285 prerequisiteProjectsNode contents:#prerequisiteProjects. |
3265 prerequisiteProjectsNode icon:(self class prerequisiteProjectsIcon). |
3286 prerequisiteProjectsNode icon:(self class prerequisiteProjectsIcon). |
3371 |
3392 |
3372 self deliverCompiledBinary value:(p propertyAt:#deliverCompiledBinary) ? false. |
3393 self deliverCompiledBinary value:(p propertyAt:#deliverCompiledBinary) ? false. |
3373 self deliverByteCode value:(p propertyAt:#deliverByteCode) ? false. |
3394 self deliverByteCode value:(p propertyAt:#deliverByteCode) ? false. |
3374 self deliverGZipArchive value:(p propertyAt:#deliverGZipArchive) ? false. |
3395 self deliverGZipArchive value:(p propertyAt:#deliverGZipArchive) ? false. |
3375 self deliverZipArchive value:(p propertyAt:#deliverZipArchive) ? false. |
3396 self deliverZipArchive value:(p propertyAt:#deliverZipArchive) ? false. |
|
3397 self deliverTarArchive value:(p propertyAt:#deliverTarArchive) ? false. |
3376 self deliverLoadAllFile value:(p propertyAt:#deliverLoadAllFile) ? false. |
3398 self deliverLoadAllFile value:(p propertyAt:#deliverLoadAllFile) ? false. |
3377 self deliverSources value:(p propertyAt:#deliverSources) ? false. |
3399 self deliverSources value:(p propertyAt:#deliverSources) ? false. |
3378 self deliverMakefiles value:(p propertyAt:#deliverMakefiles) ? false. |
3400 self deliverMakefiles value:(p propertyAt:#deliverMakefiles) ? false. |
3379 |
3401 |
3380 self installDirectoryUnix |
3402 self installDirectoryUnix |
3419 |
3441 |
3420 p := self currentProject. |
3442 p := self currentProject. |
3421 selectedNodeType := self selectedTreeNode contents. |
3443 selectedNodeType := self selectedTreeNode contents. |
3422 |
3444 |
3423 selectedNodeType == #comment ifTrue:[ |
3445 selectedNodeType == #comment ifTrue:[ |
|
3446 self halt. |
3424 ^ self rightCanvasTextHolder value ~= p comment |
3447 ^ self rightCanvasTextHolder value ~= p comment |
3425 ]. |
3448 ]. |
3426 selectedNodeType == #deployment ifTrue:[ |
3449 selectedNodeType == #deployment ifTrue:[ |
3427 (self deliverByteCode value ~= (p propertyAt:#deliverByteCode)) ifTrue:[^ true]. |
3450 (self deliverByteCode value ~= (p propertyAt:#deliverByteCode)) ifTrue:[^ true]. |
3428 (self deliverCompiledBinary value ~= (p propertyAt:#deliverCompiledBinary)) ifTrue:[^ true]. |
3451 (self deliverCompiledBinary value ~= (p propertyAt:#deliverCompiledBinary)) ifTrue:[^ true]. |
3449 ((p propertyAt:#installDirectory) ? |
3472 ((p propertyAt:#installDirectory) ? |
3450 'SYS$SMALLTALKX:[PACKAGES]')) ifTrue:[^ true]. |
3473 'SYS$SMALLTALKX:[PACKAGES]')) ifTrue:[^ true]. |
3451 |
3474 |
3452 ^ false |
3475 ^ false |
3453 ]. |
3476 ]. |
|
3477 selectedNodeType == #files ifTrue:[ |
|
3478 ^ true. |
|
3479 (self methodsFile value ~= (p propertyAt:#methodsFile)) ifTrue:[^ true]. |
|
3480 ^ false |
|
3481 ]. |
3454 self halt. |
3482 self halt. |
3455 (self methodsFile value ~~ (p propertyAt:#methodsFile)) ifTrue:[^ true]. |
3483 |
3456 (self projectType value ~~ p type) ifTrue:[^ true]. |
3484 (self projectType value ~~ p type) ifTrue:[^ true]. |
3457 (self projectDirectory value ~= p directory) ifTrue:[^ true]. |
3485 (self projectDirectory value ~= p directory) ifTrue:[^ true]. |
3458 (self projectPackage value ~= p package) ifTrue:[^ true]. |
3486 (self projectPackage value ~= p package) ifTrue:[^ true]. |
3459 (self projectNamespace value ~= (p defaultNameSpace ? Smalltalk) name) ifTrue:[^ true]. |
3487 (self projectNamespace value ~= (p defaultNameSpace ? Smalltalk) name) ifTrue:[^ true]. |
3460 |
3488 |
3514 ] ifFalse:[ |
3542 ] ifFalse:[ |
3515 ns := Namespace name:s |
3543 ns := Namespace name:s |
3516 ]. |
3544 ]. |
3517 p defaultNameSpace:ns. |
3545 p defaultNameSpace:ns. |
3518 |
3546 |
|
3547 p propertyAt:#methodsFile put:self methodsFile value. |
|
3548 |
3519 p propertyAt:#deliverCompiledBinary put:self deliverCompiledBinary value. |
3549 p propertyAt:#deliverCompiledBinary put:self deliverCompiledBinary value. |
3520 p propertyAt:#deliverByteCode put:self deliverByteCode value. |
3550 p propertyAt:#deliverByteCode put:self deliverByteCode value. |
|
3551 p propertyAt:#deliverTarArchive put:self deliverTarArchive value. |
3521 p propertyAt:#deliverZipArchive put:self deliverZipArchive value. |
3552 p propertyAt:#deliverZipArchive put:self deliverZipArchive value. |
3522 p propertyAt:#deliverGZipArchive put:self deliverGZipArchive value. |
3553 p propertyAt:#deliverGZipArchive put:self deliverGZipArchive value. |
3523 p propertyAt:#deliverLoadAllFile put:self deliverLoadAllFile value. |
3554 p propertyAt:#deliverLoadAllFile put:self deliverLoadAllFile value. |
3524 p propertyAt:#deliverSources put:self deliverSources value. |
3555 p propertyAt:#deliverSources put:self deliverSources value. |
3525 p propertyAt:#deliverMakefiles put:self deliverMakefiles value. |
3556 p propertyAt:#deliverMakefiles put:self deliverMakefiles value. |
3526 |
3557 |
3527 p propertyAt:#installDirectoryUnix put:self installDirectoryUnix value. |
3558 p propertyAt:#installDirectoryUnix put:self installDirectoryUnix value. |
3528 p propertyAt:#installDirectoryWin32 put:self installDirectoryWin32 value. |
3559 p propertyAt:#installDirectoryWin32 put:self installDirectoryWin32 value. |
3529 p propertyAt:#installDirectoryVMS put:self installDirectoryVMS value. |
3560 p propertyAt:#installDirectoryVMS put:self installDirectoryVMS value. |
3530 p propertyAt:#installDirectoryMacOS put:self installDirectoryMacOS value. |
3561 p propertyAt:#installDirectoryMacOS put:self installDirectoryMacOS value. |
|
3562 |
3531 p prerequisiteClasses:(self listOfRequiredClassesInPrerequisites value |
3563 p prerequisiteClasses:(self listOfRequiredClassesInPrerequisites value |
3532 collect:[:entry | entry string asSymbol]). |
3564 collect:[:entry | entry string asSymbol]). |
3533 |
3565 |
3534 p addDependent:self. |
3566 p addDependent:self. |
3535 ]. |
3567 ]. |
3637 self rightCanvasTextHolder value:''. |
3669 self rightCanvasTextHolder value:''. |
3638 |
3670 |
3639 "Modified: / 23.3.1999 / 14:16:02 / cg" |
3671 "Modified: / 23.3.1999 / 14:16:02 / cg" |
3640 ! ! |
3672 ! ! |
3641 |
3673 |
|
3674 !ProjectBrowser methodsFor:'private - building'! |
|
3675 |
|
3676 checkForMakeProtoFor:aProject |
|
3677 |f| |
|
3678 |
|
3679 "/ check for project directory ... |
|
3680 (self checkForProjectDirectoryFor:aProject) ifFalse:[ |
|
3681 ^ false |
|
3682 ]. |
|
3683 |
|
3684 "/ check for Make.proto ... |
|
3685 f := aProject directory asFilename construct:'Make.proto'. |
|
3686 f exists ifFalse:[ |
|
3687 (self confirm:'''Make.proto'' does not exist in project directory\\Create ?' withCRs) ifFalse:[ |
|
3688 ^ false |
|
3689 ]. |
|
3690 self buildMakefiles. |
|
3691 ]. |
|
3692 ^ true |
|
3693 ! |
|
3694 |
|
3695 checkForMakefileFor:aProject |
|
3696 |f| |
|
3697 |
|
3698 "/ check for project directory ... |
|
3699 (self checkForProjectDirectoryFor:aProject) ifFalse:[ |
|
3700 ^ false |
|
3701 ]. |
|
3702 |
|
3703 "/ check for Makefile ... |
|
3704 f := aProject directory asFilename construct:'Makefile'. |
|
3705 f exists ifFalse:[ |
|
3706 (self confirm:'''Makefile'' does not exist in project directory\\Create ?' withCRs) ifFalse:[ |
|
3707 ^ false |
|
3708 ]. |
|
3709 (self checkForMakeProtoFor:aProject) ifFalse:[ |
|
3710 ^ false |
|
3711 ]. |
|
3712 self buildMakefiles. |
|
3713 ]. |
|
3714 ^ true |
|
3715 ! |
|
3716 |
|
3717 checkForProjectDirectoryFor:aProject |
|
3718 |dir| |
|
3719 |
|
3720 "/ check for project directory ... |
|
3721 dir := aProject directory asFilename. |
|
3722 dir exists ifFalse:[ |
|
3723 (self confirm:'Project directory does not exist\\Create ?' withCRs) ifFalse:[ |
|
3724 ^ false |
|
3725 ]. |
|
3726 dir recursiveMakeDirectory. |
|
3727 ]. |
|
3728 ^ true |
|
3729 |
|
3730 |
|
3731 ! ! |
|
3732 |
3642 !ProjectBrowser methodsFor:'private - table col access'! |
3733 !ProjectBrowser methodsFor:'private - table col access'! |
3643 |
3734 |
3644 classFilenameFromClassInfo:cInfo |
3735 classFilenameFromClassInfo:cInfo |
3645 ^ cInfo classFileName |
3736 ^ cInfo classFileName |
3646 ! |
3737 ! |
3668 selectorFromPatchesInfo:pInfo |
3759 selectorFromPatchesInfo:pInfo |
3669 ^ pInfo methodSelector |
3760 ^ pInfo methodSelector |
3670 ! ! |
3761 ! ! |
3671 |
3762 |
3672 !ProjectBrowser methodsFor:'user actions'! |
3763 !ProjectBrowser methodsFor:'user actions'! |
|
3764 |
|
3765 addClass |
|
3766 "ask fo, and add a single class" |
|
3767 |
|
3768 |p className cls| |
|
3769 |
|
3770 p := self currentProject. |
|
3771 |
|
3772 className := Dialog request:'Class to add:'. |
|
3773 className size == 0 ifTrue:[^ self]. |
|
3774 cls := Smalltalk classNamed:className. |
|
3775 cls isNil ifTrue:[ |
|
3776 "/ a new one |
|
3777 (self confirm:'This is a new class. Add ?') ifFalse:[ |
|
3778 ^ self |
|
3779 ]. |
|
3780 p |
|
3781 addClass:className |
|
3782 classFileName:((Smalltalk fileNameForClass:className) , '.st'). |
|
3783 ] ifFalse:[ |
|
3784 cls package ~= p package ifTrue:[ |
|
3785 "/ a new one |
|
3786 (self confirm:'Change the classes package from ' , cls package , ' to ' , p package , ' ?') ifFalse:[ |
|
3787 ^ self |
|
3788 ]. |
|
3789 cls package:p package. |
|
3790 ]. |
|
3791 p |
|
3792 addClass:cls name |
|
3793 classFileName:(cls classFilename |
|
3794 ? ((Smalltalk fileNameForClass:cls) , '.st')). |
|
3795 ]. |
|
3796 |
|
3797 self updateClassListForProject:p |
|
3798 |
|
3799 ! |
|
3800 |
|
3801 addClasses |
|
3802 "ask fo, and add a single class" |
|
3803 |
|
3804 |p className cls oldPackage| |
|
3805 |
|
3806 p := self currentProject. |
|
3807 |
|
3808 className := Dialog request:'Class to add:'. |
|
3809 className size == 0 ifTrue:[^ self]. |
|
3810 cls := Smalltalk classNamed:className. |
|
3811 cls isNil ifTrue:[ |
|
3812 "/ a new one |
|
3813 (self confirm:'This is a new class. Add ?') ifFalse:[ |
|
3814 ^ self |
|
3815 ]. |
|
3816 p |
|
3817 addClass:className |
|
3818 classFileName:((Smalltalk fileNameForClass:className) , '.st'). |
|
3819 ] ifFalse:[ |
|
3820 (oldPackage := cls package) ~= p package ifTrue:[ |
|
3821 "/ a new one |
|
3822 (self confirm:'Change the classes package from ' , oldPackage , ' to ' , p package , ' ?') ifFalse:[ |
|
3823 ^ self |
|
3824 ]. |
|
3825 cls package:p package. |
|
3826 ]. |
|
3827 "/ find the other package .. |
|
3828 oldPackage := Project projectWithId:oldPackage. |
|
3829 oldPackage notNil ifTrue:[ |
|
3830 oldPackage removeClass:cls |
|
3831 ]. |
|
3832 |
|
3833 p |
|
3834 addClass:cls name |
|
3835 classFileName:(cls classFilename |
|
3836 ? ((Smalltalk fileNameForClass:cls) , '.st')). |
|
3837 ]. |
|
3838 |
|
3839 self updateClassListForProject:p |
|
3840 |
|
3841 ! |
3673 |
3842 |
3674 addClassesFromFilesInDirectory |
3843 addClassesFromFilesInDirectory |
3675 self addClassesFromFilesInDirectoryWithFilter:nil |
3844 self addClassesFromFilesInDirectoryWithFilter:nil |
3676 ! |
3845 ! |
3677 |
3846 |
3736 self information:'No st-sourcefiles found in ' , prjDirectory pathName. |
3905 self information:'No st-sourcefiles found in ' , prjDirectory pathName. |
3737 ] |
3906 ] |
3738 ] |
3907 ] |
3739 ! |
3908 ! |
3740 |
3909 |
3741 addClassesImage |
3910 addClassesFromImage |
|
3911 "add classes with this packageId found in the image" |
|
3912 |
3742 |project| |
3913 |project| |
3743 |
3914 |
3744 project := self currentProject. |
3915 project := self currentProject. |
3745 Smalltalk allClassesDo:[:aClass | |
3916 Smalltalk allClassesDo:[:aClass | |
3746 aClass isMeta ifFalse:[ |
3917 aClass isMeta ifFalse:[ |
3831 ]. |
4006 ]. |
3832 |
4007 |
3833 "/ now, deploy ... |
4008 "/ now, deploy ... |
3834 |
4009 |
3835 (p propertyAt:#deliverZipArchive) == true ifTrue:[ |
4010 (p propertyAt:#deliverZipArchive) == true ifTrue:[ |
3836 p createLoadAllFile |
4011 p buildZipArchive |
3837 ]. |
4012 ]. |
3838 |
4013 |
|
4014 (p propertyAt:#deliverTarArchive) == true ifTrue:[ |
|
4015 p buildTarArchive |
|
4016 ]. |
|
4017 |
3839 (p propertyAt:#deliverGZipArchive) == true ifTrue:[ |
4018 (p propertyAt:#deliverGZipArchive) == true ifTrue:[ |
3840 p createLoadAllFile |
4019 p buildGZipArchive |
3841 ]. |
4020 ]. |
3842 |
|
3843 |
|
3844 ]. |
4021 ]. |
3845 |
4022 |
3846 |
4023 |
3847 ! |
4024 ! |
3848 |
4025 |
3849 buildCompiledClassLibrary |
4026 buildCompiledClassLibrary |
3850 "compile a binary class library in the projects directory" |
4027 "compile a binary class library in the projects directory" |
3851 |p dir f diagnosticFile diagnostic error textBox| |
4028 |p diagnosticFile diagnostic error textBox| |
3852 |
4029 |
3853 p := self currentProject. |
4030 p := self currentProject. |
3854 p isNil ifTrue:[ |
4031 p isNil ifTrue:[ |
3855 self information:'No project selected'. |
4032 self information:'No project selected'. |
3856 ^ self |
4033 ^ self |
3857 ]. |
4034 ]. |
3858 |
4035 |
3859 "/ check for project directory ... |
4036 "/ check for directory ... |
3860 dir := p directory asFilename. |
4037 (self checkForProjectDirectoryFor:p) ifFalse:[ |
3861 dir exists ifFalse:[ |
4038 ^ self |
3862 (self confirm:'Project directory does not exist\\Create ?' withCRs) ifFalse:[ |
|
3863 ^ self |
|
3864 ]. |
|
3865 dir recursiveMakeDirectory. |
|
3866 ]. |
4039 ]. |
3867 |
4040 |
3868 "/ check for Make.proto ... |
4041 "/ check for Make.proto ... |
3869 f := dir construct:'Make.proto'. |
4042 (self checkForMakeProtoFor:p) ifFalse:[ |
3870 f exists ifFalse:[ |
4043 ^ self |
3871 (self confirm:'''Make.proto'' does not exist in project directory\\Create ?' withCRs) ifFalse:[ |
|
3872 ^ self |
|
3873 ]. |
|
3874 self buildMakefiles. |
|
3875 ]. |
4044 ]. |
3876 |
4045 |
3877 "/ check for Makefile ... |
4046 "/ check for Makefile ... |
3878 f := dir construct:'Makefile'. |
4047 (self checkForMakefileFor:p) ifFalse:[ |
3879 f exists ifFalse:[ |
4048 ^ self |
3880 (self confirm:'''Makefile'' does not exist in project directory\\Create ?' withCRs) ifFalse:[ |
|
3881 ^ self |
|
3882 ]. |
|
3883 p createMakefile. |
|
3884 ]. |
4049 ]. |
3885 |
4050 |
3886 "/ now, execute the makefile found there ... |
4051 "/ now, execute the makefile found there ... |
3887 diagnosticFile := Filename newTemporary. |
4052 diagnosticFile := Filename newTemporary. |
3888 diagnostic := diagnosticFile writeStream. |
4053 diagnostic := diagnosticFile writeStream. |
4033 |item action info p| |
4198 |item action info p| |
4034 |
4199 |
4035 self withWaitCursorDo:[ |
4200 self withWaitCursorDo:[ |
4036 self updateRightCanvas. |
4201 self updateRightCanvas. |
4037 ]. |
4202 ]. |
|
4203 index isNil ifTrue:[ |
|
4204 modifiedChannel value:false. |
|
4205 ^ self |
|
4206 ]. |
|
4207 |
4038 self readAspectsFromProject. |
4208 self readAspectsFromProject. |
4039 |
4209 |
4040 item := self projectTreeHolder value at:index. |
4210 item := self projectTreeHolder value at:index. |
4041 action := item action. |
4211 action := item action. |
4042 action notNil ifTrue:[ |
4212 action notNil ifTrue:[ |
4341 |
4512 |
4342 newNode == self selectedTreeNode ifTrue:[ |
4513 newNode == self selectedTreeNode ifTrue:[ |
4343 ^ true |
4514 ^ true |
4344 ]. |
4515 ]. |
4345 (modifiedChannel value |
4516 (modifiedChannel value |
4346 and:[self reallyModified]) ifTrue:[ |
4517 and:[true "self reallyModified"]) ifTrue:[ |
4347 answer := Dialog confirmWithCancel:'Accept changes ?'. |
4518 answer := Dialog confirmWithCancel:'Accept changes ?'. |
4348 answer isNil ifTrue:[ |
4519 answer isNil ifTrue:[ |
4349 ^ false |
4520 ^ false |
4350 ]. |
4521 ]. |
4351 answer == true ifTrue:[ |
4522 answer == true ifTrue:[ |