150 ^Icon |
162 ^Icon |
151 constantNamed:#'ProjectBrowser prerequisitesIcon' |
163 constantNamed:#'ProjectBrowser prerequisitesIcon' |
152 ifAbsentPut:[(Depth4Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@A8@D(@RPA80@C@^@=HRT/)^D$@C7#@RLAI@G(@@@@b') ; yourself); yourself] |
164 ifAbsentPut:[(Depth4Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@A8@D(@RPA80@C@^@=HRT/)^D$@C7#@RLAI@G(@@@@b') ; yourself); yourself] |
153 |
165 |
154 "Modified: / 23.3.1999 / 14:28:11 / cg" |
166 "Modified: / 23.3.1999 / 14:28:11 / cg" |
155 ! ! |
167 ! |
|
168 |
|
169 projectsIcon |
|
170 "This resource specification was automatically generated |
|
171 by the ImageEditor of ST/X." |
|
172 |
|
173 "Do not manually edit this!! If it is corrupted, |
|
174 the ImageEditor may not be able to read the specification." |
|
175 |
|
176 " |
|
177 self projectsIcon inspect |
|
178 ImageEditor openOnClass:self andSelector:#projectsIcon |
|
179 " |
|
180 |
|
181 <resource: #image> |
|
182 |
|
183 ^Icon |
|
184 constantNamed:#'ProjectBrowser projectsIcon' |
|
185 ifAbsentPut:[(Depth4Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@"H"H"@@@@@"H"H"@ @@@"H"H"@"@@@@@@@@@"H@@BH"H"HBH @@H"H"H H"@@@"H"H"@"H@@BH"H"HBH @@H"H"H H @@@"H"H"@ @@@BH"H"H@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 0 0 132 255 128 128]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@G? ?>G?8??''?>_?9??''?>_?9??G?8_?A?8@@@@@@b') ; yourself); yourself]! ! |
156 |
186 |
157 !ProjectBrowser class methodsFor:'interface specs'! |
187 !ProjectBrowser class methodsFor:'interface specs'! |
158 |
188 |
159 emptyRightCanvasSpec |
189 emptyRightCanvasSpec |
160 "This resource specification was automatically generated |
190 "This resource specification was automatically generated |
529 ) |
559 ) |
530 ) |
560 ) |
531 ) |
561 ) |
532 ! |
562 ! |
533 |
563 |
534 rightCanvasSpecForPrerequisites |
564 rightCanvasSpecForPrerequisiteClasses |
535 "This resource specification was automatically generated |
565 "This resource specification was automatically generated |
536 by the UIPainter of ST/X." |
566 by the UIPainter of ST/X." |
537 |
567 |
538 "Do not manually edit this!! If it is corrupted, |
568 "Do not manually edit this!! If it is corrupted, |
539 the UIPainter may not be able to read the specification." |
569 the UIPainter may not be able to read the specification." |
540 |
570 |
541 " |
571 " |
542 UIPainter new openOnClass:ProjectBrowser andSelector:#rightCanvasSpecForPrerequisites |
572 UIPainter new openOnClass:ProjectBrowser andSelector:#rightCanvasSpecForPrerequisiteClasses |
543 ProjectBrowser new openInterface:#rightCanvasSpecForPrerequisites |
573 ProjectBrowser new openInterface:#rightCanvasSpecForPrerequisiteClasses |
544 " |
574 " |
545 |
575 |
546 <resource: #canvas> |
576 <resource: #canvas> |
547 |
577 |
548 ^ |
578 ^ |
549 #(#FullSpec |
579 #(#FullSpec |
550 #name: #rightCanvasSpecForPrerequisites |
580 #name: #rightCanvasSpecForPrerequisiteClasses |
551 #window: |
581 #window: |
552 #(#WindowSpec |
582 #(#WindowSpec |
553 #label: 'NewApplication' |
583 #label: 'NewApplication' |
554 #name: 'NewApplication' |
584 #name: 'NewApplication' |
555 #layout: #(#LayoutFrame 208 0 222 0 507 0 521 0) |
585 #layout: #(#LayoutFrame 216 0 173 0 515 0 472 0) |
556 #level: 0 |
586 #level: 0 |
557 #min: #(#Point 10 10) |
587 #min: #(#Point 10 10) |
558 #max: #(#Point 1280 1024) |
588 #max: #(#Point 1280 1024) |
559 #bounds: #(#Rectangle 208 222 508 522) |
589 #bounds: #(#Rectangle 216 173 516 473) |
560 #usePreferredExtent: false |
590 #usePreferredExtent: false |
561 #returnIsOKInDialog: true |
591 #returnIsOKInDialog: true |
562 #escapeIsCancelInDialog: true |
592 #escapeIsCancelInDialog: true |
563 ) |
593 ) |
564 #component: |
594 #component: |
565 #(#SpecCollection |
595 #(#SpecCollection |
566 #collection: #( |
596 #collection: #( |
567 #(#LabelSpec |
597 #(#LabelSpec |
568 #label: 'Known Projects' |
598 #label: 'Known Classes' |
569 #name: 'Label1' |
599 #name: 'Label1' |
570 #layout: #(#LayoutFrame 0 0 0 0 0 0.5 30 0) |
600 #layout: #(#LayoutFrame 0 0 0 0 0 0.5 30 0) |
571 #translateLabel: true |
601 #translateLabel: true |
572 ) |
602 ) |
573 #(#SequenceViewSpec |
603 #(#SequenceViewSpec |
574 #name: 'List1' |
604 #name: 'List1' |
575 #layout: #(#LayoutFrame 0 0 30 0 0 0.5 -62 1) |
605 #layout: #(#LayoutFrame 0 0 30 0 0 0.5 -62 1) |
576 #tabable: true |
606 #tabable: true |
577 #model: #selectedProjectInPrerequisites |
607 #model: #selectedClassInPrerequisites |
578 #hasHorizontalScrollBar: true |
608 #hasHorizontalScrollBar: true |
579 #hasVerticalScrollBar: true |
609 #hasVerticalScrollBar: true |
580 #miniScrollerHorizontal: true |
610 #miniScrollerHorizontal: true |
581 #miniScrollerVertical: true |
611 #miniScrollerVertical: true |
|
612 #doubleClickSelector: #addClassToPrerequisites |
|
613 #valueChangeSelector: #showInfoForRequiredClass: |
582 #useIndex: false |
614 #useIndex: false |
583 #sequenceList: #listOfAllProjectsInPrerequisites |
615 #sequenceList: #listOfAllClassesInPrerequisites |
584 ) |
616 ) |
585 #(#LabelSpec |
617 #(#LabelSpec |
586 #label: 'Prerequisites' |
618 #label: 'Required Classes' |
587 #name: 'Label2' |
619 #name: 'Label2' |
588 #layout: #(#LayoutFrame 0 0.5 0 0 0 1 30 0) |
620 #layout: #(#LayoutFrame 0 0.5 0 0 0 1 30 0) |
589 #translateLabel: true |
621 #translateLabel: true |
590 ) |
622 ) |
591 #(#SequenceViewSpec |
623 #(#SequenceViewSpec |
592 #name: 'List2' |
624 #name: 'List2' |
593 #layout: #(#LayoutFrame 0 0.5 30 0 0 1 -62 1) |
625 #layout: #(#LayoutFrame 0 0.5 30 0 0 1 -62 1) |
594 #tabable: true |
626 #tabable: true |
595 #model: #selectedRequiredProjectInPrerequisites |
627 #model: #selectedRequiredClassInPrerequisites |
596 #hasHorizontalScrollBar: true |
628 #hasHorizontalScrollBar: true |
597 #hasVerticalScrollBar: true |
629 #hasVerticalScrollBar: true |
598 #miniScrollerHorizontal: true |
630 #miniScrollerHorizontal: true |
599 #miniScrollerVertical: true |
631 #miniScrollerVertical: true |
|
632 #doubleClickSelector: #removeClassFromPrerequisites |
|
633 #valueChangeSelector: #showInfoForRequiredClass: |
600 #useIndex: false |
634 #useIndex: false |
601 #sequenceList: #listOfRequiredProjectsInPrerequisites |
635 #sequenceList: #listOfRequiredClassesInPrerequisites |
602 ) |
636 ) |
603 #(#HorizontalPanelViewSpec |
637 #(#HorizontalPanelViewSpec |
604 #name: 'HorizontalPanel2' |
638 #name: 'HorizontalPanel2' |
605 #layout: #(#LayoutFrame 0 0 -62 1 0 1 -32 1) |
639 #layout: #(#LayoutFrame 0 0 -62 1 0 1 -32 1) |
606 #horizontalLayout: #fitSpace |
640 #horizontalLayout: #fitSpace |
614 #label: 'Add' |
648 #label: 'Add' |
615 #name: 'addButton' |
649 #name: 'addButton' |
616 #translateLabel: true |
650 #translateLabel: true |
617 #resizeForLabel: false |
651 #resizeForLabel: false |
618 #tabable: true |
652 #tabable: true |
619 #model: #addToPrerequisites |
653 #model: #addClassToPrerequisites |
|
654 #enableChannel: #canAddSelectedClassToPrerequisites |
|
655 #actionValue: '' |
|
656 #useDefaultExtent: true |
|
657 ) |
|
658 #(#ActionButtonSpec |
|
659 #label: 'Remove' |
|
660 #name: 'removeButton' |
|
661 #translateLabel: true |
|
662 #resizeForLabel: false |
|
663 #tabable: true |
|
664 #model: #removeClassFromPrerequisites |
|
665 #enableChannel: #canRemoveSelectedClassFromPrerequisites |
|
666 #actionValue: '' |
|
667 #useDefaultExtent: true |
|
668 ) |
|
669 ) |
|
670 |
|
671 ) |
|
672 ) |
|
673 #(#HorizontalPanelViewSpec |
|
674 #name: 'HorizontalPanel1' |
|
675 #layout: #(#LayoutFrame 0 0.0 -30 1 0 1.0 0 1.0) |
|
676 #initiallyInvisible: true |
|
677 #horizontalLayout: #fitSpace |
|
678 #verticalLayout: #center |
|
679 #horizontalSpace: 3 |
|
680 #verticalSpace: 3 |
|
681 #component: |
|
682 #(#SpecCollection |
|
683 #collection: #( |
|
684 #(#ActionButtonSpec |
|
685 #label: 'Cancel' |
|
686 #name: 'Button1' |
|
687 #translateLabel: true |
|
688 #tabable: true |
|
689 #model: #cancel |
|
690 #useDefaultExtent: true |
|
691 ) |
|
692 #(#ActionButtonSpec |
|
693 #label: 'OK' |
|
694 #name: 'Button2' |
|
695 #translateLabel: true |
|
696 #tabable: true |
|
697 #model: #accept |
|
698 #useDefaultExtent: true |
|
699 ) |
|
700 ) |
|
701 |
|
702 ) |
|
703 ) |
|
704 ) |
|
705 |
|
706 ) |
|
707 ) |
|
708 ! |
|
709 |
|
710 rightCanvasSpecForPrerequisiteProjects |
|
711 "This resource specification was automatically generated |
|
712 by the UIPainter of ST/X." |
|
713 |
|
714 "Do not manually edit this!! If it is corrupted, |
|
715 the UIPainter may not be able to read the specification." |
|
716 |
|
717 " |
|
718 UIPainter new openOnClass:ProjectBrowser andSelector:#rightCanvasSpecForPrerequisiteProjects |
|
719 ProjectBrowser new openInterface:#rightCanvasSpecForPrerequisiteProjects |
|
720 " |
|
721 |
|
722 <resource: #canvas> |
|
723 |
|
724 ^ |
|
725 #(#FullSpec |
|
726 #name: #rightCanvasSpecForPrerequisiteProjects |
|
727 #window: |
|
728 #(#WindowSpec |
|
729 #label: 'NewApplication' |
|
730 #name: 'NewApplication' |
|
731 #layout: #(#LayoutFrame 216 0 173 0 515 0 472 0) |
|
732 #level: 0 |
|
733 #min: #(#Point 10 10) |
|
734 #max: #(#Point 1280 1024) |
|
735 #bounds: #(#Rectangle 216 173 516 473) |
|
736 #usePreferredExtent: false |
|
737 #returnIsOKInDialog: true |
|
738 #escapeIsCancelInDialog: true |
|
739 ) |
|
740 #component: |
|
741 #(#SpecCollection |
|
742 #collection: #( |
|
743 #(#LabelSpec |
|
744 #label: 'Known Projects' |
|
745 #name: 'Label1' |
|
746 #layout: #(#LayoutFrame 0 0 0 0 0 0.5 30 0) |
|
747 #translateLabel: true |
|
748 ) |
|
749 #(#SequenceViewSpec |
|
750 #name: 'List1' |
|
751 #layout: #(#LayoutFrame 0 0 30 0 0 0.5 -62 1) |
|
752 #tabable: true |
|
753 #model: #selectedProjectInPrerequisites |
|
754 #hasHorizontalScrollBar: true |
|
755 #hasVerticalScrollBar: true |
|
756 #miniScrollerHorizontal: true |
|
757 #miniScrollerVertical: true |
|
758 #doubleClickSelector: #addProjectToPrerequisites |
|
759 #useIndex: false |
|
760 #sequenceList: #listOfAllProjectsInPrerequisites |
|
761 ) |
|
762 #(#LabelSpec |
|
763 #label: 'Prerequisites' |
|
764 #name: 'Label2' |
|
765 #layout: #(#LayoutFrame 0 0.5 0 0 0 1 30 0) |
|
766 #translateLabel: true |
|
767 ) |
|
768 #(#SequenceViewSpec |
|
769 #name: 'List2' |
|
770 #layout: #(#LayoutFrame 0 0.5 30 0 0 1 -62 1) |
|
771 #tabable: true |
|
772 #model: #selectedRequiredProjectInPrerequisites |
|
773 #hasHorizontalScrollBar: true |
|
774 #hasVerticalScrollBar: true |
|
775 #miniScrollerHorizontal: true |
|
776 #miniScrollerVertical: true |
|
777 #doubleClickSelector: #removeProjectFromPrerequisites |
|
778 #useIndex: false |
|
779 #sequenceList: #listOfRequiredProjectsInPrerequisites |
|
780 ) |
|
781 #(#HorizontalPanelViewSpec |
|
782 #name: 'HorizontalPanel2' |
|
783 #layout: #(#LayoutFrame 0 0 -62 1 0 1 -32 1) |
|
784 #horizontalLayout: #fitSpace |
|
785 #verticalLayout: #center |
|
786 #horizontalSpace: 3 |
|
787 #verticalSpace: 3 |
|
788 #component: |
|
789 #(#SpecCollection |
|
790 #collection: #( |
|
791 #(#ActionButtonSpec |
|
792 #label: 'Add' |
|
793 #name: 'addButton' |
|
794 #translateLabel: true |
|
795 #resizeForLabel: false |
|
796 #tabable: true |
|
797 #model: #addProjectToPrerequisites |
620 #enableChannel: #canAddSelectedProjectToPrerequisites |
798 #enableChannel: #canAddSelectedProjectToPrerequisites |
621 #actionValue: '' |
799 #actionValue: '' |
622 #useDefaultExtent: true |
800 #useDefaultExtent: true |
623 ) |
801 ) |
624 #(#ActionButtonSpec |
802 #(#ActionButtonSpec |
625 #label: 'Remove' |
803 #label: 'Remove' |
626 #name: 'removeButton' |
804 #name: 'removeButton' |
627 #translateLabel: true |
805 #translateLabel: true |
628 #resizeForLabel: false |
806 #resizeForLabel: false |
629 #tabable: true |
807 #tabable: true |
630 #model: #removeFromPrerequisites |
808 #model: #removeProjectFromPrerequisites |
631 #enableChannel: #canRemoveSelectedProjectFromPrerequisites |
809 #enableChannel: #canRemoveSelectedProjectFromPrerequisites |
632 #actionValue: '' |
810 #actionValue: '' |
633 #useDefaultExtent: true |
811 #useDefaultExtent: true |
634 ) |
812 ) |
635 ) |
813 ) |
1487 ]. |
1701 ]. |
1488 SystemBrowser openInClass:cls selector:nil. |
1702 SystemBrowser openInClass:cls selector:nil. |
1489 |
1703 |
1490 ! |
1704 ! |
1491 |
1705 |
|
1706 canAddSelectedClassToPrerequisites |
|
1707 |holder| |
|
1708 |
|
1709 (holder := builder bindingAt:#canAddSelectedClassToPrerequisites) isNil ifTrue:[ |
|
1710 holder := BlockValue |
|
1711 with:[:m | self canAddClassToPrerequisites:m] |
|
1712 argument:(self selectedClassInPrerequisites). |
|
1713 builder aspectAt:#canAddSelectedClassToPrerequisites put:holder. |
|
1714 ]. |
|
1715 ^ holder. |
|
1716 |
|
1717 "Created: / 23.3.1999 / 14:18:05 / cg" |
|
1718 ! |
|
1719 |
1492 canAddSelectedProjectToPrerequisites |
1720 canAddSelectedProjectToPrerequisites |
1493 |holder| |
1721 |holder| |
1494 |
1722 |
1495 (holder := builder bindingAt:#canAddSelectedProjectToPrerequisites) isNil ifTrue:[ |
1723 (holder := builder bindingAt:#canAddSelectedProjectToPrerequisites) isNil ifTrue:[ |
1496 holder := BlockValue |
1724 holder := BlockValue |
1497 with:[:m | self canAddToPrerequisites:m] |
1725 with:[:m | self canAddProjectToPrerequisites:m] |
1498 argument:(self selectedProjectInPrerequisites). |
1726 argument:(self selectedProjectInPrerequisites). |
1499 builder aspectAt:#canAddSelectedProjectToPrerequisites put:holder. |
1727 builder aspectAt:#canAddSelectedProjectToPrerequisites put:holder. |
|
1728 ]. |
|
1729 ^ holder. |
|
1730 |
|
1731 "Created: / 23.3.1999 / 14:18:05 / cg" |
|
1732 ! |
|
1733 |
|
1734 canRemoveSelectedClassFromPrerequisites |
|
1735 |holder| |
|
1736 |
|
1737 (holder := builder bindingAt:#canRemoveSelectedClassFromPrerequisites) isNil ifTrue:[ |
|
1738 holder := BlockValue with:[:m | m notNil] argument:(self selectedRequiredClassInPrerequisites). |
|
1739 builder aspectAt:#canRemoveSelectedClassFromPrerequisites put:holder. |
1500 ]. |
1740 ]. |
1501 ^ holder. |
1741 ^ holder. |
1502 |
1742 |
1503 "Created: / 23.3.1999 / 14:18:05 / cg" |
1743 "Created: / 23.3.1999 / 14:18:05 / cg" |
1504 ! |
1744 ! |
1663 ^ holder. |
1903 ^ holder. |
1664 |
1904 |
1665 "Created: / 23.3.1999 / 14:18:05 / cg" |
1905 "Created: / 23.3.1999 / 14:18:05 / cg" |
1666 ! |
1906 ! |
1667 |
1907 |
|
1908 listOfAllClassesInPrerequisites |
|
1909 |holder classes| |
|
1910 |
|
1911 (holder := builder bindingAt:#listOfAllClassesInPrerequisites) isNil ifTrue:[ |
|
1912 builder aspectAt:#listOfAllClassesInPrerequisites put:(holder := SortedCollection new asValue). |
|
1913 |
|
1914 "/ all unloaded classes and classes which where |
|
1915 "/ loaded are candidates. |
|
1916 |
|
1917 classes := Smalltalk allClasses |
|
1918 select:[:cls | |
|
1919 cls isMeta not |
|
1920 and:[ |
|
1921 cls isLoaded not |
|
1922 or:[cls wasAutoloaded]] |
|
1923 ]. |
|
1924 |
|
1925 "/ mark currently loaded classes as bold; |
|
1926 "/ LATER: those which are superclasses of any of my classes bold-red. |
|
1927 |
|
1928 classes := classes collect:[:cls | |nm| |
|
1929 nm := cls name. |
|
1930 cls isLoaded ifTrue:[ |
|
1931 nm := nm asText allBold. |
|
1932 ]. |
|
1933 nm |
|
1934 ]. |
|
1935 holder value addAll:classes. |
|
1936 self currentProject wasLoadedFromFile ifFalse:[ |
|
1937 self updateListOfRequiredPrerequisiteClasses. |
|
1938 ] |
|
1939 ]. |
|
1940 ^ holder. |
|
1941 |
|
1942 "Created: / 23.3.1999 / 14:18:05 / cg" |
|
1943 ! |
|
1944 |
1668 listOfAllProjectsInPrerequisites |
1945 listOfAllProjectsInPrerequisites |
1669 "automatically generated by UIPainter ..." |
1946 "automatically generated by UIPainter ..." |
1670 |
1947 |
1671 |holder projects currentProject| |
1948 |holder projects currentProject| |
1672 |
1949 |
1673 (holder := builder bindingAt:#listOfAllProjectsInPrerequisites) isNil ifTrue:[ |
1950 (holder := builder bindingAt:#listOfAllProjectsInPrerequisites) isNil ifTrue:[ |
1674 builder aspectAt:#listOfAllProjectsInPrerequisites put:(holder := List new). |
1951 builder aspectAt:#listOfAllProjectsInPrerequisites put:(holder := SortedCollection new asValue). |
1675 |
1952 |
1676 currentProject := self currentProject. |
1953 currentProject := self currentProject. |
1677 |
1954 |
1678 projects := Set new. |
1955 projects := Set new. |
1679 Project allInstancesDo:[:p | |
1956 Project allInstancesDo:[:p | |
1680 (p ~~ currentProject |
1957 (p ~~ currentProject |
1681 and:[p ~~ Project defaultProject]) ifTrue:[ |
1958 and:[p ~~ Project defaultProject]) ifTrue:[ |
1682 projects add:p name. |
1959 projects add:p name. |
1683 ] |
1960 ] |
1684 ]. |
1961 ]. |
1685 projects := projects asOrderedCollection sort. |
1962 holder value addAll:projects. |
1686 holder addAll:projects. |
1963 ]. |
|
1964 ^ holder. |
|
1965 |
|
1966 "Created: / 23.3.1999 / 14:18:05 / cg" |
|
1967 ! |
|
1968 |
|
1969 listOfRequiredClassesInPrerequisites |
|
1970 "automatically generated by UIPainter ..." |
|
1971 |
|
1972 |holder| |
|
1973 |
|
1974 (holder := builder bindingAt:#listOfRequiredClassesInPrerequisites) isNil ifTrue:[ |
|
1975 builder aspectAt:#listOfRequiredClassesInPrerequisites put:(holder := SortedCollection new asValue). |
|
1976 self currentProject wasLoadedFromFile ifFalse:[ |
|
1977 self updateListOfRequiredPrerequisiteClasses. |
|
1978 ] |
1687 ]. |
1979 ]. |
1688 ^ holder. |
1980 ^ holder. |
1689 |
1981 |
1690 "Created: / 23.3.1999 / 14:18:05 / cg" |
1982 "Created: / 23.3.1999 / 14:18:05 / cg" |
1691 ! |
1983 ! |
1815 builder aspectAt:#rightCanvasTextHolder put:(holder := ValueHolder new). |
2107 builder aspectAt:#rightCanvasTextHolder put:(holder := ValueHolder new). |
1816 ]. |
2108 ]. |
1817 ^ holder. |
2109 ^ holder. |
1818 ! |
2110 ! |
1819 |
2111 |
|
2112 selectedClassInPrerequisites |
|
2113 "automatically generated by UIPainter ..." |
|
2114 |
|
2115 |holder| |
|
2116 |
|
2117 (holder := builder bindingAt:#selectedClassInPrerequisites) isNil ifTrue:[ |
|
2118 builder aspectAt:#selectedClassInPrerequisites put:(holder := ValueHolder new). |
|
2119 ]. |
|
2120 ^ holder. |
|
2121 |
|
2122 "Created: / 23.3.1999 / 14:18:05 / cg" |
|
2123 ! |
|
2124 |
1820 selectedProjectInPrerequisites |
2125 selectedProjectInPrerequisites |
1821 "automatically generated by UIPainter ..." |
2126 "automatically generated by UIPainter ..." |
1822 |
2127 |
1823 |holder| |
2128 |holder| |
1824 |
2129 |
1825 (holder := builder bindingAt:#selectedProjectInPrerequisites) isNil ifTrue:[ |
2130 (holder := builder bindingAt:#selectedProjectInPrerequisites) isNil ifTrue:[ |
1826 builder aspectAt:#selectedProjectInPrerequisites put:(holder := ValueHolder new). |
2131 builder aspectAt:#selectedProjectInPrerequisites put:(holder := ValueHolder new). |
|
2132 ]. |
|
2133 ^ holder. |
|
2134 |
|
2135 "Created: / 23.3.1999 / 14:18:05 / cg" |
|
2136 ! |
|
2137 |
|
2138 selectedRequiredClassInPrerequisites |
|
2139 "automatically generated by UIPainter ..." |
|
2140 |
|
2141 |holder| |
|
2142 |
|
2143 (holder := builder bindingAt:#selectedRequiredClassInPrerequisites) isNil ifTrue:[ |
|
2144 builder aspectAt:#selectedRequiredClassInPrerequisites put:(holder := ValueHolder new). |
1827 ]. |
2145 ]. |
1828 ^ holder. |
2146 ^ holder. |
1829 |
2147 |
1830 "Created: / 23.3.1999 / 14:18:05 / cg" |
2148 "Created: / 23.3.1999 / 14:18:05 / cg" |
1831 ! |
2149 ! |
2076 userDocNode add:(userRefManNode := ProjectTreeItem name:'Reference'). |
2426 userDocNode add:(userRefManNode := ProjectTreeItem name:'Reference'). |
2077 docNode add:(userDocNode := ProjectTreeItem name:'Error Reports'). |
2427 docNode add:(userDocNode := ProjectTreeItem name:'Error Reports'). |
2078 docNode add:(userDocNode := ProjectTreeItem name:'Other'). |
2428 docNode add:(userDocNode := ProjectTreeItem name:'Other'). |
2079 ]. |
2429 ]. |
2080 |
2430 |
2081 prerequisitesNode contents:#prerequisites. |
|
2082 prerequisitesNode icon:(self class prerequisitesIcon). |
2431 prerequisitesNode icon:(self class prerequisitesIcon). |
2083 prerequisitesNode spec:[self class rightCanvasSpecForPrerequisites]. |
2432 prerequisitesNode add:(prerequisiteProjectsNode := ProjectTreeItem name:'Projects'). |
|
2433 prerequisitesNode add:(prerequisiteClassesNode := ProjectTreeItem name:'Classes'). |
|
2434 prerequisitesNode info:'Other projects and classes required by the project'. |
|
2435 |
|
2436 prerequisiteProjectsNode contents:#prerequisiteProjects. |
|
2437 prerequisiteProjectsNode icon:(self class prerequisiteProjectsIcon). |
|
2438 prerequisiteProjectsNode spec:[self class rightCanvasSpecForPrerequisiteProjects]. |
|
2439 prerequisiteProjectsNode info:'Other projects required by the project'. |
|
2440 |
|
2441 prerequisiteClassesNode contents:#prerequisiteClasses. |
|
2442 prerequisiteClassesNode icon:(self class prerequisiteClassesIcon). |
|
2443 prerequisiteClassesNode spec:[self class rightCanvasSpecForPrerequisiteClasses]. |
|
2444 prerequisiteClassesNode info:'Other (autoloaded-) classes required by the project'. |
2084 |
2445 |
2085 classIcon := self class classIcon. |
2446 classIcon := self class classIcon. |
2086 |
2447 |
2087 classesNode contents:#classes. |
2448 classesNode contents:#classes. |
2088 classesNode icon:(self class classesIcon). |
2449 classesNode icon:(self class classesIcon). |
|
2450 classesNode info:'Classes contained in the project'. |
2089 ((aProject classes ? #()) copy sort:[:a :b | |
2451 ((aProject classes ? #()) copy sort:[:a :b | |
2090 |nmA nmB| |
2452 |nmA nmB| |
2091 |
2453 |
2092 nmA := a isSymbol ifTrue:[a] ifFalse:[a name]. |
2454 nmA := a isSymbol ifTrue:[a] ifFalse:[a name]. |
2093 nmB := b isSymbol ifTrue:[b] ifFalse:[b name]. |
2455 nmB := b isSymbol ifTrue:[b] ifFalse:[b name]. |
2101 cNode contents:(#class -> aClass). |
2463 cNode contents:(#class -> aClass). |
2102 cNode icon:classIcon. |
2464 cNode icon:classIcon. |
2103 classesNode add:cNode. |
2465 classesNode add:cNode. |
2104 ]. |
2466 ]. |
2105 |
2467 |
|
2468 |
2106 propertiesNode contents:#properties. |
2469 propertiesNode contents:#properties. |
2107 propertiesNode spec:[self class rightCanvasSpecForProperties]. |
2470 propertiesNode spec:[self class rightCanvasSpecForProperties]. |
|
2471 propertiesNode info:'Project propreties'. |
2108 |
2472 |
2109 filesNode contents:#files. |
2473 filesNode contents:#files. |
2110 filesNode icon:(self class filesIcon). |
2474 filesNode icon:(self class filesIcon). |
|
2475 filesNode info:'Other files (bitmaps, data) contained in the project'. |
2111 |
2476 |
2112 patchesNode contents:#patches. |
2477 patchesNode contents:#patches. |
2113 patchesNode icon:(self class methodsIcon). |
2478 patchesNode icon:(self class methodsIcon). |
|
2479 patchesNode info:'Patches (system-changes) contained in the project'. |
2114 |
2480 |
2115 deploymentNode icon:(self class deploymentIcon). |
2481 deploymentNode icon:(self class deploymentIcon). |
2116 deploymentNode spec:[self class rightCanvasSpecForDeployment]. |
2482 deploymentNode spec:[self class rightCanvasSpecForDeployment]. |
|
2483 deploymentNode info:'Deployment & packaging specification.'. |
2117 |
2484 |
2118 ^ pNode |
2485 ^ pNode |
2119 |
2486 |
2120 "Modified: / 23.3.1999 / 14:27:30 / cg" |
2487 "Modified: / 23.3.1999 / 14:27:30 / cg" |
2121 ! |
2488 ! |
2693 |
3056 |
2694 l := self classList. |
3057 l := self classList. |
2695 l removeAll. |
3058 l removeAll. |
2696 l addAll:classInfo. |
3059 l addAll:classInfo. |
2697 |
3060 |
|
3061 |
|
3062 ! |
|
3063 |
|
3064 updateListOfRequiredPrerequisiteClasses |
|
3065 "all autoloaded superclasses of my classes are definitely required" |
|
3066 |
|
3067 |p anyChange allInPre requiredInPre nMissing| |
|
3068 |
|
3069 p := self currentProject. |
|
3070 p isNil ifTrue:[^ self]. |
|
3071 anyChange := false. |
|
3072 nMissing := 0. |
|
3073 allInPre := self listOfAllClassesInPrerequisites value. |
|
3074 requiredInPre := self listOfRequiredClassesInPrerequisites value. |
|
3075 |
|
3076 self currentProjectsClassNames do:[:aClassName | |
|
3077 |cls| |
|
3078 |
|
3079 cls := Smalltalk at:aClassName asSymbol. |
|
3080 (cls notNil and:[cls isLoaded]) ifTrue:[ |
|
3081 cls allSuperclasses do:[:superClass | |
|
3082 |sName idx| |
|
3083 |
|
3084 (superClass notNil |
|
3085 and:[superClass isLoaded |
|
3086 and:[superClass wasAutoloaded]]) ifTrue:[ |
|
3087 |sName entry| |
|
3088 |
|
3089 sName := superClass name. |
|
3090 idx := allInPre findFirst:[:item | item string = sName]. |
|
3091 idx ~~ 0 ifTrue:[ |
|
3092 allInPre removeIndex:idx. |
|
3093 requiredInPre add:sName asText allBold. |
|
3094 anyChange := true. |
|
3095 ] |
|
3096 ] |
|
3097 ] |
|
3098 ] ifFalse:[ |
|
3099 nMissing := nMissing + 1. |
|
3100 ] |
|
3101 ]. |
|
3102 |
|
3103 anyChange ifTrue:[ |
|
3104 self listOfRequiredClassesInPrerequisites changed. |
|
3105 self listOfAllClassesInPrerequisites changed. |
|
3106 ]. |
|
3107 nMissing ~~ 0 ifTrue:[ |
|
3108 self information:'Update not complete - ' , nMissing printString |
|
3109 , ' of the projects classes are not loaded'. |
|
3110 ]. |
|
3111 self accept. |
|
3112 ! ! |
|
3113 |
|
3114 !ProjectBrowser methodsFor:'user actions - canvas'! |
|
3115 |
|
3116 accept |
|
3117 "save values from aspects into the project" |
|
3118 |
|
3119 self saveAspectsIntoProject. |
|
3120 modifiedChannel value:false. |
|
3121 |
|
3122 ! |
|
3123 |
|
3124 addClassToPrerequisites |
|
3125 |sel cls| |
|
3126 |
|
3127 sel := self selectedClassInPrerequisites value. |
|
3128 self listOfRequiredClassesInPrerequisites value add:sel. |
|
3129 self listOfAllClassesInPrerequisites value remove:sel. |
|
3130 self selectedClassInPrerequisites value:nil. |
|
3131 |
|
3132 "/ also add any autoloaded superclass(es) |
|
3133 |
|
3134 cls := Smalltalk at:sel asSymbol. |
|
3135 (cls notNil and:[cls isLoaded]) ifTrue:[ |
|
3136 cls allSuperclasses do:[:superClass | |
|
3137 |sName| |
|
3138 |
|
3139 (superClass notNil |
|
3140 and:[superClass isLoaded |
|
3141 and:[superClass wasAutoloaded]]) ifTrue:[ |
|
3142 |sName idx| |
|
3143 sName := superClass name. |
|
3144 idx := self listOfAllClassesInPrerequisites value findFirst:[:s | s string = sName]. |
|
3145 idx ~~ 0 ifTrue:[ |
|
3146 self listOfAllClassesInPrerequisites value removeIndex:idx. |
|
3147 self listOfRequiredClassesInPrerequisites value add:sName asString allBold. |
|
3148 ]. |
|
3149 ] |
|
3150 ] |
|
3151 ]. |
|
3152 self listOfRequiredClassesInPrerequisites changed. |
|
3153 self listOfAllClassesInPrerequisites changed. |
|
3154 self accept |
|
3155 ! |
|
3156 |
|
3157 addProjectToPrerequisites |
|
3158 |sel| |
|
3159 |
|
3160 sel := self selectedProjectInPrerequisites value. |
|
3161 self listOfRequiredProjectsInPrerequisites value add:sel. |
|
3162 self listOfAllProjectsInPrerequisites value remove:sel. |
|
3163 self selectedProjectInPrerequisites value:nil. |
|
3164 |
|
3165 self listOfRequiredProjectsInPrerequisites changed. |
|
3166 self listOfAllProjectsInPrerequisites changed. |
|
3167 self accept |
|
3168 |
|
3169 ! |
|
3170 |
|
3171 cancel |
|
3172 "reload aspects from the project" |
|
3173 |
|
3174 self readAspectsFromProject |
|
3175 ! |
|
3176 |
|
3177 removeClassFromPrerequisites |
|
3178 |sel cls myClasses| |
|
3179 |
|
3180 sel := self selectedRequiredClassInPrerequisites value. |
|
3181 cls := Smalltalk at:sel asSymbol. |
|
3182 |
|
3183 "/ check if this affects my classes |
|
3184 (cls notNil and:[cls isLoaded and:[cls wasAutoloaded]]) ifTrue:[ |
|
3185 myClasses := self currentProjectsClassNames. |
|
3186 cls allSubclassesDo:[:cls | |
|
3187 (myClasses includes:cls name) ifTrue:[ |
|
3188 self valueOfInfoLabel value:'Attention - this class is required by ' , cls name. |
|
3189 (self confirm:'Attention - this class is required by ' , cls name asText allBold, '.\(The project could later fail to load correctly)\\Really remove ?' withCRs) ifFalse:[ |
|
3190 ^ self |
|
3191 ]. |
|
3192 ]. |
|
3193 ] |
|
3194 ]. |
|
3195 |
|
3196 self listOfAllClassesInPrerequisites value add:sel. |
|
3197 self listOfRequiredClassesInPrerequisites value remove:sel. |
|
3198 self selectedRequiredClassInPrerequisites value:nil. |
|
3199 |
|
3200 "/ also remove any autoloaded subclass(es) |
|
3201 |
|
3202 (cls notNil and:[cls isLoaded and:[cls wasAutoloaded]]) ifTrue:[ |
|
3203 cls allSubclassesDo:[:cls | |
|
3204 |entry| |
|
3205 |
|
3206 entry := self listOfRequiredClassesInPrerequisites value remove:cls name ifAbsent:nil. |
|
3207 entry notNil ifTrue:[ |
|
3208 self listOfAllClassesInPrerequisites value add:cls name. |
|
3209 ] |
|
3210 ] |
|
3211 ]. |
|
3212 |
|
3213 self listOfRequiredClassesInPrerequisites changed. |
|
3214 self listOfAllClassesInPrerequisites changed. |
|
3215 self accept |
|
3216 |
|
3217 ! |
|
3218 |
|
3219 removeProjectFromPrerequisites |
|
3220 |sel| |
|
3221 |
|
3222 sel := self selectedRequiredProjectInPrerequisites value. |
|
3223 self listOfAllProjectsInPrerequisites value add:sel. |
|
3224 self listOfRequiredProjectsInPrerequisites value remove:sel. |
|
3225 self selectedRequiredProjectInPrerequisites value:nil. |
|
3226 |
|
3227 self listOfRequiredProjectsInPrerequisites changed. |
|
3228 self listOfAllProjectsInPrerequisites changed. |
|
3229 self accept |
|
3230 |
|
3231 ! |
|
3232 |
|
3233 showInfoForRequiredClass:entry |
|
3234 "show why a class is required" |
|
3235 |
|
3236 |cls myClasses| |
|
3237 |
|
3238 entry notNil ifTrue:[ |
|
3239 myClasses := self currentProjectsClassNames asSet. |
|
3240 |
|
3241 cls := Smalltalk at:entry string asSymbol. |
|
3242 cls allSubclasses do:[:subClass | |
|
3243 (myClasses includes:subClass name) ifTrue:[ |
|
3244 self valueOfInfoLabel value:('Required by ' , subClass name). |
|
3245 ^ self. |
|
3246 ] |
|
3247 ]. |
|
3248 ]. |
|
3249 self valueOfInfoLabel value:nil |
2698 ! ! |
3250 ! ! |
2699 |
3251 |
2700 !ProjectBrowser::ProjectTreeItem methodsFor:'accessing'! |
3252 !ProjectBrowser::ProjectTreeItem methodsFor:'accessing'! |
2701 |
3253 |
2702 action |
3254 action |