190 |
190 |
191 ^Icon |
191 ^Icon |
192 constantNamed:#'ProjectBrowser filesIcon' |
192 constantNamed:#'ProjectBrowser filesIcon' |
193 ifAbsentPut:[(Depth4Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@DQDQ@P@@@@@P@@@@@@@@@A@QDQDA@@@@DA@@@@@@@@@PDADQDPD@@A@PDQDQ@Q@@DA@QDQD@@@@PDADQDQDQ@A@PDQDQDQD@@A@QDQDQDP@@DADQDQDQ@@@@DQDQDQD@@@@QDQDQDP@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@C? O?@?>C?<O?8??3??/??????????O?<??0??C?<b') ; yourself); yourself]! |
193 ifAbsentPut:[(Depth4Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@DQDQ@P@@@@@P@@@@@@@@@A@QDQDA@@@@DA@@@@@@@@@PDADQDPD@@A@PDQDQ@Q@@DA@QDQD@@@@PDADQDQDQ@A@PDQDQDQD@@A@QDQDQDP@@DADQDQDQ@@@@DQDQDQD@@@@QDQDQDP@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@C? O?@?>C?<O?8??3??/??????????O?<??0??C?<b') ; yourself); yourself]! |
194 |
194 |
|
195 methodIcon |
|
196 "This resource specification was automatically generated |
|
197 by the ImageEditor of ST/X." |
|
198 |
|
199 "Do not manually edit this!! If it is corrupted, |
|
200 the ImageEditor may not be able to read the specification." |
|
201 |
|
202 " |
|
203 self methodIcon inspect |
|
204 ImageEditor openOnClass:self andSelector:#methodIcon |
|
205 " |
|
206 |
|
207 <resource: #image> |
|
208 |
|
209 ^Icon |
|
210 constantNamed:#'ProjectBrowser methodIcon' |
|
211 ifAbsentPut:[(Depth4Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@DH@@@@@@@@4QA@@@@@@@TQDPP@@@@@@MDQDH@@@@@@PQDQA@@@@@@LTQA@@@@@@@@I@L@@@@@@@@QD@@@@@@@@@H@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 0 0 132 132 0 0 132 0 132 255 0 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@B@@\@C8@_0A? C?@G<@O @\@@ @@@@@@@@@b') ; yourself); yourself]! |
|
212 |
195 methodsIcon |
213 methodsIcon |
196 "This resource specification was automatically generated |
214 "This resource specification was automatically generated |
197 by the ImageEditor of ST/X." |
215 by the ImageEditor of ST/X." |
198 |
216 |
199 "Do not manually edit this!! If it is corrupted, |
217 "Do not manually edit this!! If it is corrupted, |
239 |
257 |
240 <resource: #image> |
258 <resource: #image> |
241 |
259 |
242 ^Icon |
260 ^Icon |
243 constantNamed:#'ProjectBrowser prerequisitesIcon' |
261 constantNamed:#'ProjectBrowser prerequisitesIcon' |
244 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] |
262 ifAbsentPut:[(Depth4Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@Q@@@@@@@@@AD@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@DP@@@@@AD@@Q@@@@@@DP@@@@@@@@@Q@@@@@@@@@@@@@@@@@@@@@@@AD@@@@@@@@@DP@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 127 127 127]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@A8@G(@^PA80@C@^@=8S7//^D<@C7#@^LA9@G(@@@@b') ; yourself); yourself]! |
245 |
|
246 "Modified: / 23.3.1999 / 14:28:11 / cg" |
|
247 ! |
|
248 |
263 |
249 projectsIcon |
264 projectsIcon |
250 "This resource specification was automatically generated |
265 "This resource specification was automatically generated |
251 by the ImageEditor of ST/X." |
266 by the ImageEditor of ST/X." |
252 |
267 |
323 ProjectBrowser new openInterface:#rightCanvasSpecForClassList |
338 ProjectBrowser new openInterface:#rightCanvasSpecForClassList |
324 " |
339 " |
325 |
340 |
326 <resource: #canvas> |
341 <resource: #canvas> |
327 |
342 |
328 ^ |
343 ^ |
329 |
344 #(#FullSpec |
330 #(#FullSpec |
345 #name: #rightCanvasSpecForClassList |
331 #window: |
346 #window: |
332 #(#WindowSpec |
347 #(#WindowSpec |
333 #name: 'NewApplication' |
348 #label: 'NewApplication' |
334 #layout: #(#LayoutFrame 216 0 173 0 515 0 472 0) |
349 #name: 'NewApplication' |
335 #level: 0 |
350 #min: #(#Point 10 10) |
336 #label: 'NewApplication' |
351 #max: #(#Point 1280 1024) |
337 #min: #(#Point 10 10) |
352 #bounds: #(#Rectangle 420 49 720 349) |
338 #max: #(#Point 1280 1024) |
353 ) |
339 #bounds: #(#Rectangle 216 173 516 473) |
354 #component: |
340 #usePreferredExtent: false |
355 #(#SpecCollection |
341 ) |
356 #collection: #( |
342 #component: |
357 #(#DataSetSpec |
343 #(#SpecCollection |
358 #name: 'classTable' |
344 #collection: |
359 #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
345 #( |
360 #hasHorizontalScrollBar: true |
346 #(#DataSetSpec |
361 #hasVerticalScrollBar: true |
347 #name: 'classTable' |
362 #miniScrollerHorizontal: true |
348 #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
363 #dataList: #classList |
349 #hasHorizontalScrollBar: true |
364 #has3Dsepartors: false |
350 #hasVerticalScrollBar: true |
365 #columnHolder: #classTableColumns |
351 #dataList: #classList |
366 #columnAdaptor: #classTableAdaptor |
352 #has3Dsepartors: false |
367 ) |
353 #columnHolder: #classTableColumns |
368 ) |
354 #columnAdaptor: #classTableAdaptor |
369 |
355 ) |
370 ) |
356 ) |
|
357 ) |
|
358 ) |
371 ) |
359 ! |
372 ! |
360 |
373 |
361 rightCanvasSpecForDeployment |
374 rightCanvasSpecForDeployment |
362 "This resource specification was automatically generated |
375 "This resource specification was automatically generated |
615 ) |
628 ) |
616 ) |
629 ) |
617 ) |
630 ) |
618 ! |
631 ! |
619 |
632 |
|
633 rightCanvasSpecForFiles |
|
634 "This resource specification was automatically generated |
|
635 by the UIPainter of ST/X." |
|
636 |
|
637 "Do not manually edit this!! If it is corrupted, |
|
638 the UIPainter may not be able to read the specification." |
|
639 |
|
640 " |
|
641 UIPainter new openOnClass:ProjectBrowser andSelector:#rightCanvasSpecForFiles |
|
642 ProjectBrowser new openInterface:#rightCanvasSpecForFiles |
|
643 " |
|
644 |
|
645 <resource: #canvas> |
|
646 |
|
647 ^ |
|
648 #(#FullSpec |
|
649 #name: #rightCanvasSpecForFiles |
|
650 #window: |
|
651 #(#WindowSpec |
|
652 #label: 'NewApplication' |
|
653 #name: 'NewApplication' |
|
654 #min: #(#Point 10 10) |
|
655 #max: #(#Point 1280 1024) |
|
656 #bounds: #(#Rectangle 240 31 601 394) |
|
657 ) |
|
658 #component: |
|
659 #(#SpecCollection |
|
660 #collection: #( |
|
661 #(#FramedBoxSpec |
|
662 #label: 'File for system extensions & patches' |
|
663 #name: 'FramedBox2' |
|
664 #layout: #(#LayoutFrame 0 0.0 62 0.0 0 1.0 122 0) |
|
665 #labelPosition: #topLeft |
|
666 #translateLabel: true |
|
667 #component: |
|
668 #(#SpecCollection |
|
669 #collection: #( |
|
670 #(#InputFieldSpec |
|
671 #name: 'methodsFileEntryField' |
|
672 #layout: #(#LayoutFrame 0 0.0 1 0 0 1.0 23 0) |
|
673 #activeHelpKey: #projectDir |
|
674 #enableChannel: #currentProjectWasNotLoadedFromFile |
|
675 #model: #methodsFile |
|
676 #acceptChannel: #acceptChannel |
|
677 #modifiedChannel: #modifiedChannel |
|
678 #acceptOnPointerLeave: false |
|
679 ) |
|
680 ) |
|
681 |
|
682 ) |
|
683 ) |
|
684 #(#HorizontalPanelViewSpec |
|
685 #name: 'HorizontalPanel1' |
|
686 #layout: #(#LayoutFrame 0 0 -30 1 0 1 0 1) |
|
687 #horizontalLayout: #fitSpace |
|
688 #verticalLayout: #center |
|
689 #horizontalSpace: 3 |
|
690 #verticalSpace: 3 |
|
691 #component: |
|
692 #(#SpecCollection |
|
693 #collection: #( |
|
694 #(#ActionButtonSpec |
|
695 #label: 'Cancel' |
|
696 #name: 'Button1' |
|
697 #activeHelpKey: #cancel |
|
698 #translateLabel: true |
|
699 #model: #cancel |
|
700 #enableChannel: #modifiedChannel |
|
701 #actionValue: '' |
|
702 #useDefaultExtent: true |
|
703 ) |
|
704 #(#ActionButtonSpec |
|
705 #label: 'OK' |
|
706 #name: 'Button2' |
|
707 #activeHelpKey: #accept |
|
708 #translateLabel: true |
|
709 #model: #accept |
|
710 #enableChannel: #modifiedChannel |
|
711 #useDefaultExtent: true |
|
712 ) |
|
713 ) |
|
714 |
|
715 ) |
|
716 ) |
|
717 ) |
|
718 |
|
719 ) |
|
720 ) |
|
721 ! |
|
722 |
620 rightCanvasSpecForHTMLText |
723 rightCanvasSpecForHTMLText |
621 "This resource specification was automatically generated |
724 "This resource specification was automatically generated |
622 by the UIPainter of ST/X." |
725 by the UIPainter of ST/X." |
623 |
726 |
624 "Do not manually edit this!! If it is corrupted, |
727 "Do not manually edit this!! If it is corrupted, |
682 #(#WindowSpec |
785 #(#WindowSpec |
683 #label: 'NewApplication' |
786 #label: 'NewApplication' |
684 #name: 'NewApplication' |
787 #name: 'NewApplication' |
685 #min: #(#Point 10 10) |
788 #min: #(#Point 10 10) |
686 #max: #(#Point 1280 1024) |
789 #max: #(#Point 1280 1024) |
687 #bounds: #(#Rectangle 16 49 316 349) |
790 #bounds: #(#Rectangle 162 22 462 322) |
688 ) |
791 ) |
689 #component: |
792 #component: |
690 #(#SpecCollection |
793 #(#SpecCollection |
691 #collection: #( |
794 #collection: #( |
692 #(#DataSetSpec |
795 #(#DataSetSpec |
693 #name: 'patchesTable' |
796 #name: 'patchesTable' |
694 #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
797 #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
695 #model: #selectedPatch |
798 #menu: #methodMenu |
696 #menu: #menu |
|
697 #hasHorizontalScrollBar: true |
799 #hasHorizontalScrollBar: true |
698 #hasVerticalScrollBar: true |
800 #hasVerticalScrollBar: true |
|
801 #miniScrollerHorizontal: true |
699 #dataList: #patchesList |
802 #dataList: #patchesList |
700 #has3Dsepartors: false |
803 #has3Dsepartors: false |
701 #columnHolder: #patchesTableColumns |
804 #columnHolder: #patchesTableColumns |
702 #columnAdaptor: #classTableAdaptor |
805 #columnAdaptor: #classTableAdaptor |
703 ) |
806 ) |
1472 #label: 'New' |
1575 #label: 'New' |
1473 #translateLabel: true |
1576 #translateLabel: true |
1474 #value: #newProject |
1577 #value: #newProject |
1475 ) |
1578 ) |
1476 #(#MenuItem |
1579 #(#MenuItem |
|
1580 #label: '-' |
|
1581 ) |
|
1582 #(#MenuItem |
1477 #label: 'Load From...' |
1583 #label: 'Load From...' |
1478 #translateLabel: true |
1584 #translateLabel: true |
1479 #value: #openProject |
1585 #value: #openProject |
1480 ) |
1586 ) |
1481 #(#MenuItem |
1587 #(#MenuItem |
|
1588 #label: 'Load Project Code' |
|
1589 #translateLabel: true |
|
1590 #value: #loadProjectCode |
|
1591 #enabled: #hasProjectSelectedAndProjectFilenameHolder |
|
1592 ) |
|
1593 #(#MenuItem |
1482 #label: '-' |
1594 #label: '-' |
1483 ) |
1595 ) |
1484 #(#MenuItem |
1596 #(#MenuItem |
1485 #label: 'Save' |
1597 #label: 'Save Project File' |
1486 #translateLabel: true |
1598 #translateLabel: true |
1487 #value: #saveProject |
1599 #value: #saveProject |
1488 #enabled: #hasProjectSelectedAndProjectFilenameHolder |
1600 #enabled: #hasProjectSelectedAndProjectFilenameHolder |
|
1601 ) |
|
1602 #(#MenuItem |
|
1603 #label: 'Save Project Code' |
|
1604 #translateLabel: true |
|
1605 #value: #saveProjectCode |
|
1606 #enabled: #hasProjectSelectedAndProjectFilenameHolderAndProjectCodeIsLoaded |
|
1607 ) |
|
1608 #(#MenuItem |
|
1609 #label: 'Save All' |
|
1610 #translateLabel: true |
|
1611 #value: #saveAll |
|
1612 #enabled: #hasProjectSelectedAndProjectFilenameHolderAndProjectCodeIsLoaded |
1489 ) |
1613 ) |
1490 #(#MenuItem |
1614 #(#MenuItem |
1491 #label: '-' |
1615 #label: '-' |
1492 ) |
1616 ) |
1493 #(#MenuItem |
1617 #(#MenuItem |
1494 #label: 'Exit' |
1618 #label: 'Exit' |
1495 #translateLabel: true |
1619 #translateLabel: true |
1496 #value: #closeRequest |
1620 #value: #closeRequest |
|
1621 ) |
|
1622 ) |
|
1623 nil |
|
1624 nil |
|
1625 ) |
|
1626 ) |
|
1627 #(#MenuItem |
|
1628 #label: 'Repository' |
|
1629 #translateLabel: true |
|
1630 #submenu: |
|
1631 #(#Menu |
|
1632 #( |
|
1633 #(#MenuItem |
|
1634 #label: 'CheckIn All' |
|
1635 #translateLabel: true |
|
1636 #value: #checkInProject |
|
1637 #enabled: #hasProjectSelectedAndProjectFilenameHolderAndProjectCodeIsLoaded |
1497 ) |
1638 ) |
1498 ) |
1639 ) |
1499 nil |
1640 nil |
1500 nil |
1641 nil |
1501 ) |
1642 ) |
1550 #( |
1691 #( |
1551 #(#MenuItem |
1692 #(#MenuItem |
1552 #label: 'All' |
1693 #label: 'All' |
1553 #translateLabel: true |
1694 #translateLabel: true |
1554 #value: #buildAll |
1695 #value: #buildAll |
|
1696 #enabled: #hasProjectSelectedAndProjectFilenameHolderAndProjectCodeIsLoaded |
1555 ) |
1697 ) |
1556 #(#MenuItem |
1698 #(#MenuItem |
1557 #label: '-' |
1699 #label: '-' |
1558 ) |
1700 ) |
1559 #(#MenuItem |
1701 #(#MenuItem |
1560 #label: 'Make.proto && Makefile' |
1702 #label: 'Make.proto && Makefile' |
1561 #translateLabel: true |
1703 #translateLabel: true |
1562 #value: #generateMakefiles |
1704 #value: #buildMakefiles |
|
1705 #enabled: #hasProjectSelectedAndProjectFilenameHolderAndProjectCodeIsLoaded |
|
1706 ) |
|
1707 #(#MenuItem |
|
1708 #label: 'LoadAll file' |
|
1709 #translateLabel: true |
|
1710 #value: #buildLoadAllFile |
|
1711 #enabled: #hasProjectSelectedAndProjectFilenameHolderAndProjectCodeIsLoaded |
|
1712 ) |
|
1713 #(#MenuItem |
|
1714 #label: 'Binary class library' |
|
1715 #translateLabel: true |
|
1716 #value: #buildClassLibrary |
|
1717 #enabled: #hasProjectSelectedAndProjectFilenameHolderAndProjectCodeIsLoaded |
|
1718 ) |
|
1719 #(#MenuItem |
|
1720 #label: 'Zip archive' |
|
1721 #translateLabel: true |
|
1722 #value: #buildZipArchive |
|
1723 #enabled: #hasProjectSelectedAndProjectFilenameHolderAndProjectCodeIsLoaded |
1563 ) |
1724 ) |
1564 ) |
1725 ) |
1565 nil |
1726 nil |
1566 nil |
1727 nil |
1567 ) |
1728 ) |
1855 #(#DataSetColumnSpec |
2016 #(#DataSetColumnSpec |
1856 #label: 'Class' |
2017 #label: 'Class' |
1857 #id: 'classColumn' |
2018 #id: 'classColumn' |
1858 #labelAlignment: #left |
2019 #labelAlignment: #left |
1859 #menu: #patchesMethodMenu |
2020 #menu: #patchesMethodMenu |
1860 #model: #classNameFromPatchesInfo: |
2021 #model: #classNameFromMethodInfo: |
1861 #doubleClickedSelector: #methodPatchDoubleClick: |
2022 #doubleClickedSelector: #methodPatchDoubleClick: |
1862 #canSelect: false |
2023 #canSelect: false |
1863 ) |
2024 ) |
1864 #(#DataSetColumnSpec |
2025 #(#DataSetColumnSpec |
1865 #label: 'Selector' |
2026 #label: 'Selector' |
1866 #id: 'selectorColumn' |
2027 #id: 'selectorColumn' |
1867 #labelAlignment: #left |
2028 #labelAlignment: #left |
1868 #model: #selectorFromPatchesInfo: |
2029 #model: #selectorFromMethodInfo: |
1869 #canSelect: false |
2030 #canSelect: false |
1870 ) |
2031 ) |
1871 ) |
2032 ) |
1872 |
2033 |
1873 ! ! |
2034 ! ! |
2340 ^ holder. |
2517 ^ holder. |
2341 |
2518 |
2342 "Created: / 23.3.1999 / 14:18:05 / cg" |
2519 "Created: / 23.3.1999 / 14:18:05 / cg" |
2343 ! |
2520 ! |
2344 |
2521 |
|
2522 methodsFile |
|
2523 "automatically generated by UIPainter ..." |
|
2524 |
|
2525 |holder| |
|
2526 |
|
2527 (holder := builder bindingAt:#methodsFile) isNil ifTrue:[ |
|
2528 builder aspectAt:#methodsFile put:(holder := '' asValue). |
|
2529 holder onChangeSend:#value to:[modifiedChannel value:true]. |
|
2530 ]. |
|
2531 ^ holder. |
|
2532 |
|
2533 "Created: / 23.3.1999 / 14:18:05 / cg" |
|
2534 ! |
|
2535 |
2345 modifiedChannel |
2536 modifiedChannel |
2346 "automatically generated by UIPainter ..." |
2537 "automatically generated by UIPainter ..." |
2347 |
2538 |
2348 modifiedChannel isNil ifTrue:[ |
2539 modifiedChannel isNil ifTrue:[ |
2349 modifiedChannel := false asValue. |
2540 modifiedChannel := false asValue. |
2629 itemMenuPerformer |
2836 itemMenuPerformer |
2630 ^ self |
2837 ^ self |
2631 ! ! |
2838 ! ! |
2632 |
2839 |
2633 !ProjectBrowser methodsFor:'private'! |
2840 !ProjectBrowser methodsFor:'private'! |
|
2841 |
|
2842 addProjectNodeToTree:newNode |
|
2843 |aProject nodeToAdd path childNode| |
|
2844 |
|
2845 "/ projectTree add:newNode. |
|
2846 |
|
2847 "/ insert into tree ... |
|
2848 nodeToAdd := projectTree. |
|
2849 |
|
2850 path := newNode contents package asCollectionOfSubstringsSeparatedByAny:'/\:'. |
|
2851 path from:1 to:path size-1 do:[:part | |
|
2852 childNode := nodeToAdd children detect:[:child | child name = part] ifNone:nil. |
|
2853 childNode isNil ifTrue:[ |
|
2854 nodeToAdd add:(childNode := ProjectTreeItem new name:part). |
|
2855 ]. |
|
2856 nodeToAdd := childNode. |
|
2857 ]. |
|
2858 newNode name:(path last). |
|
2859 nodeToAdd add:newNode. |
|
2860 |
|
2861 ! |
2634 |
2862 |
2635 canAddClassToPrerequisites:aClassName |
2863 canAddClassToPrerequisites:aClassName |
2636 ^ aClassName notNil |
2864 ^ aClassName notNil |
2637 ! |
2865 ! |
2638 |
2866 |
2766 selectedNode := self selectedTreeNode. |
3024 selectedNode := self selectedTreeNode. |
2767 selectedNode isNil ifTrue:[^ false]. |
3025 selectedNode isNil ifTrue:[^ false]. |
2768 |
3026 |
2769 ^ selectedNode isProjectNode |
3027 ^ selectedNode isProjectNode |
2770 |
3028 |
|
3029 ! |
|
3030 |
|
3031 hasProjectSelected |
|
3032 |selectedNode node| |
|
3033 |
|
3034 selectedNode := self selectedTreeNode. |
|
3035 selectedNode isNil ifTrue:[^ false]. |
|
3036 |
|
3037 node := selectedNode. |
|
3038 [node notNil] whileTrue:[ |
|
3039 node isProjectNode ifTrue:[^ true]. |
|
3040 node := node parent. |
|
3041 ]. |
|
3042 ^ false. |
2771 ! |
3043 ! |
2772 |
3044 |
2773 hasSubProjectsNodeSelected |
3045 hasSubProjectsNodeSelected |
2774 |selectedNode| |
3046 |selectedNode| |
2775 |
3047 |
2785 |
3057 |
2786 |projectName pNode |
3058 |projectName pNode |
2787 propertiesNode docNode classesNode patchesNode subprojectsNode filesNode |
3059 propertiesNode docNode classesNode patchesNode subprojectsNode filesNode |
2788 commentNode prerequisitesNode analysisNode designNode codeNode |
3060 commentNode prerequisitesNode analysisNode designNode codeNode |
2789 userDocNode userOverViewNode userGuideNode userRefManNode |
3061 userDocNode userOverViewNode userGuideNode userRefManNode |
2790 deploymentNode classIcon |
3062 deploymentNode classIcon methodIcon |
2791 prerequisiteProjectsNode prerequisiteClassesNode| |
3063 prerequisiteProjectsNode prerequisiteClassesNode| |
2792 |
3064 |
2793 projectName := aProject name. |
3065 projectName := aProject name. |
2794 pNode := ProjectNode name:projectName. |
3066 pNode := ProjectNode name:projectName. |
2795 pNode contents:aProject. |
3067 pNode contents:aProject. |
2874 propertiesNode info:'Project propreties'. |
3146 propertiesNode info:'Project propreties'. |
2875 |
3147 |
2876 filesNode contents:#files. |
3148 filesNode contents:#files. |
2877 filesNode icon:(self class filesIcon). |
3149 filesNode icon:(self class filesIcon). |
2878 filesNode info:'Other files (bitmaps, data) contained in the project'. |
3150 filesNode info:'Other files (bitmaps, data) contained in the project'. |
|
3151 filesNode spec:[self class rightCanvasSpecForFiles]. |
|
3152 |
|
3153 methodIcon := self class methodIcon. |
2879 |
3154 |
2880 patchesNode contents:#patches. |
3155 patchesNode contents:#patches. |
2881 patchesNode icon:(self class methodsIcon). |
3156 patchesNode icon:(self class methodsIcon). |
2882 patchesNode info:'Patches (system-changes) contained in the project'. |
3157 patchesNode info:'Patches (system-changes) contained in the project'. |
|
3158 ((aProject methodInfo ? #()) copy sort:[:a :b | |
|
3159 a displayString < b displayString. |
|
3160 ]) |
|
3161 do:[:aMethodInfo | |
|
3162 |cNode cName| |
|
3163 |
|
3164 cNode := ProjectTreeItem name:(aMethodInfo className , ' ' , aMethodInfo methodName). |
|
3165 cNode contents:(#method -> aMethodInfo). |
|
3166 cNode icon:methodIcon. |
|
3167 patchesNode add:cNode. |
|
3168 ]. |
2883 |
3169 |
2884 deploymentNode icon:(self class deploymentIcon). |
3170 deploymentNode icon:(self class deploymentIcon). |
2885 deploymentNode spec:[self class rightCanvasSpecForDeployment]. |
3171 deploymentNode spec:[self class rightCanvasSpecForDeployment]. |
2886 deploymentNode info:'Deployment & packaging specification.'. |
3172 deploymentNode info:'Deployment & packaging specification.'. |
2887 |
3173 |
2897 |
3183 |
2898 ^ projectTree |
3184 ^ projectTree |
2899 ! |
3185 ! |
2900 |
3186 |
2901 readAspectsFromProject |
3187 readAspectsFromProject |
2902 |p l| |
3188 |p type l ns| |
2903 |
3189 |
2904 p := self currentProject. |
3190 p := self currentProject. |
2905 p notNil ifTrue:[ |
3191 p notNil ifTrue:[ |
2906 self selectedTreeNode contents == #comment ifTrue:[ |
3192 self selectedTreeNode contents == #comment ifTrue:[ |
2907 self rightCanvasTextHolder value:p comment. |
3193 self rightCanvasTextHolder value:p comment. |
2908 ]. |
3194 ]. |
2909 |
3195 |
|
3196 self methodsFile value:(p propertyAt:#methodsFile). |
|
3197 self projectCodeIsLoaded value:(p isLoaded == true). |
|
3198 p isLoaded == true ifFalse:[ |
|
3199 self valueOfInfoLabel value:'Projects code is not loaded.' |
|
3200 ]. |
|
3201 |
2910 self currentProjectWasNotLoadedFromFile value:p wasLoadedFromFile not. |
3202 self currentProjectWasNotLoadedFromFile value:p wasLoadedFromFile not. |
2911 self projectType value:(p type). |
3203 (type := p type) == #classLibrary ifTrue:[ |
|
3204 type := #library |
|
3205 ]. |
|
3206 self projectType value:type. |
2912 self projectDirectory value:(p directory). |
3207 self projectDirectory value:(p directory). |
2913 self projectPackage value:(p packageName). |
3208 self projectPackage value:(p package). |
2914 self projectNamespace value:(p defaultNameSpace ? Smalltalk) name. |
3209 ns := p defaultNameSpace ? Smalltalk. |
|
3210 ns isSymbol ifFalse:[ |
|
3211 ns := ns name |
|
3212 ]. |
|
3213 self projectNamespace value:ns. |
2915 |
3214 |
2916 self repositoryModule value:(p repositoryModule). |
3215 self repositoryModule value:(p repositoryModule). |
2917 self repositoryDirectory value:(p repositoryDirectory). |
3216 self repositoryDirectory value:(p repositoryDirectory). |
2918 |
3217 |
2919 self deliverCompiledBinary value:(p propertyAt:#deliverCompiledBinary) ? false. |
3218 self deliverCompiledBinary value:(p propertyAt:#deliverCompiledBinary) ? false. |
2922 self deliverSources value:(p propertyAt:#deliverSources) ? false. |
3221 self deliverSources value:(p propertyAt:#deliverSources) ? false. |
2923 self deliverLoadAllFile value:(p propertyAt:#deliverLoadAllFile) ? false. |
3222 self deliverLoadAllFile value:(p propertyAt:#deliverLoadAllFile) ? false. |
2924 |
3223 |
2925 self installDirectoryUnix |
3224 self installDirectoryUnix |
2926 value:(p propertyAt:#installDirectoryUnix) ? |
3225 value:(p propertyAt:#installDirectoryUnix) ? |
2927 ((p propertyAt:#installDirectory) ? '/opt/smalltalk'). |
3226 ((p propertyAt:#installDirectory) ? '/opt/smalltalk/packages'). |
2928 self installDirectoryWin32 |
3227 self installDirectoryWin32 |
2929 value:(p propertyAt:#installDirectoryWin32) ? |
3228 value:(p propertyAt:#installDirectoryWin32) ? |
2930 ((p propertyAt:#installDirectory) ? '\Programme\SmalltalkX'). |
3229 ((p propertyAt:#installDirectory) ? '\Programme\SmalltalkX\packages'). |
2931 "/ self installDirectoryVMS |
3230 self installDirectoryVMS |
2932 "/ value:(p propertyAt:#installDirectoryVMS) ? |
3231 value:(p propertyAt:#installDirectoryVMS) ? |
2933 "/ ((p propertyAt:#installDirectory) ? '\Programme\SmalltalkX'). |
3232 ((p propertyAt:#installDirectory) ? 'SYS$SMALLTALKX:[PACKAGES]'). |
2934 "/ self installDirectoryMacOS |
3233 "/ self installDirectoryMacOS |
2935 "/ value:(p propertyAt:#installDirectoryMacOS) ? |
3234 "/ value:(p propertyAt:#installDirectoryMacOS) ? |
2936 "/ ((p propertyAt:#installDirectory) ? '\Programme\SmalltalkX'). |
3235 "/ ((p propertyAt:#installDirectory) ? '\Programme\SmalltalkX'). |
2937 |
3236 |
2938 l := p prerequisitePackages collect:[:entry | |
3237 l := p prerequisitePackages collect:[:entry | |
3019 |
3318 |
3020 tree := SelectionInTree new. |
3319 tree := SelectionInTree new. |
3021 tree root:(root := ProjectTreeItem name:'invisibleRoot'). |
3320 tree root:(root := ProjectTreeItem name:'invisibleRoot'). |
3022 root hide:false. |
3321 root hide:false. |
3023 |
3322 |
3024 showWhat == #current ifTrue:[ |
3323 showWhat notNil ifTrue:[ |
3025 root add:(self nodeFor:Project current). |
3324 showWhat == #current ifTrue:[ |
3026 ] ifFalse:[ |
3325 root add:(self nodeFor:Project current). |
3027 (Project knownProjects asOrderedCollection |
3326 ] ifFalse:[ |
3028 sort:[:a :b | a packageName < b packageName]) |
3327 (Project knownProjects asOrderedCollection |
3029 do:[:aProject | |
3328 sort:[:a :b | a package < b package]) |
3030 |newNode nodeToAdd doShow childNode path| |
3329 do:[:aProject | |
3031 |
3330 |newNode nodeToAdd doShow childNode path| |
3032 (doShow := showWhat == #all) ifFalse:[ |
3331 |
3033 doShow := (aProject package startsWith:'stx:') not |
3332 (doShow := showWhat == #all) ifFalse:[ |
|
3333 doShow := (aProject package startsWith:'stx:') not |
|
3334 ]. |
|
3335 |
|
3336 doShow ifTrue:[ |
|
3337 newNode := self nodeFor:aProject. |
|
3338 |
|
3339 "/ insert into tree ... |
|
3340 nodeToAdd := root. |
|
3341 |
|
3342 path := aProject package asCollectionOfSubstringsSeparatedByAny:'/\:'. |
|
3343 path from:1 to:path size-1 do:[:part | |
|
3344 childNode := nodeToAdd children detect:[:child | child name = part] ifNone:nil. |
|
3345 childNode isNil ifTrue:[ |
|
3346 nodeToAdd add:(childNode := ProjectTreeItem new name:part). |
|
3347 ]. |
|
3348 nodeToAdd := childNode. |
|
3349 ]. |
|
3350 newNode name:(path last). |
|
3351 nodeToAdd add:newNode. |
|
3352 ] |
3034 ]. |
3353 ]. |
3035 |
|
3036 doShow ifTrue:[ |
|
3037 newNode := self nodeFor:aProject. |
|
3038 |
|
3039 "/ insert into tree ... |
|
3040 nodeToAdd := root. |
|
3041 |
|
3042 path := aProject package asCollectionOfSubstringsSeparatedByAny:'/\:'. |
|
3043 path from:1 to:path size-1 do:[:part | |
|
3044 childNode := nodeToAdd children detect:[:child | child name = part] ifNone:nil. |
|
3045 childNode isNil ifTrue:[ |
|
3046 nodeToAdd add:(childNode := ProjectTreeItem new name:part). |
|
3047 ]. |
|
3048 nodeToAdd := childNode. |
|
3049 ]. |
|
3050 newNode name:(path last). |
|
3051 nodeToAdd add:newNode. |
|
3052 ] |
|
3053 ]. |
3354 ]. |
3054 ]. |
3355 ]. |
3055 projectTree := root. |
3356 projectTree := root. |
3056 |
3357 |
3057 self projectTreeHolder root:projectTree. |
3358 self projectTreeHolder root:projectTree. |
3249 p createLoadAllFile |
3563 p createLoadAllFile |
3250 ]. |
3564 ]. |
3251 |
3565 |
3252 ! |
3566 ! |
3253 |
3567 |
|
3568 buildLoadAllFile |
|
3569 |p | |
|
3570 |
|
3571 p := self currentProject. |
|
3572 p isNil ifTrue:[ |
|
3573 self information:'No project selected'. |
|
3574 ^ self |
|
3575 ]. |
|
3576 |
|
3577 p createLoadAllFile. |
|
3578 |
|
3579 ! |
|
3580 |
|
3581 checkInProject |
|
3582 |p classes methods anyMethodMissing| |
|
3583 |
|
3584 p := self currentProject. |
|
3585 p isNil ifTrue:[ |
|
3586 self information:'No project selected'. |
|
3587 ^ self |
|
3588 ]. |
|
3589 |
|
3590 "/ check in classes ... |
|
3591 |
|
3592 classes := p classes. |
|
3593 classes do:[:aClass | |
|
3594 |clsName| |
|
3595 |
|
3596 aClass isBehavior ifFalse:[ |
|
3597 aClass isSymbol ifTrue:[ |
|
3598 clsName := aClass |
|
3599 ] ifFalse:[ |
|
3600 clsName := aClass className |
|
3601 ]. |
|
3602 Transcript showCR:('ProjectBrowser: cannot checkIn unloaded class: ' , clsName). |
|
3603 ] ifTrue:[ |
|
3604 aClass isLoaded ifFalse:[ |
|
3605 Transcript showCR:('ProjectBrowser: cannot checkIn unloaded class: ' , aClass name). |
|
3606 ] ifTrue:[ |
|
3607 aClass owningClass isNil ifTrue:[ "/ skip private classes |
|
3608 self checkInClass:aClass. |
|
3609 ] |
|
3610 ] |
|
3611 ] |
|
3612 ]. |
|
3613 |
|
3614 "/ check methods ... |
|
3615 |
|
3616 anyMethodMissing := false. |
|
3617 methods := p methods. |
|
3618 methods size > 0 ifTrue:[ |
|
3619 methods do:[:aMethod | |
|
3620 aMethod isMethod ifFalse:[ |
|
3621 Transcript showCR:('ProjectBrowser: cannot checkIn unloaded method: ' , aMethod className , ' ' , aMethod methodName). |
|
3622 anyMethodMissing := true. |
|
3623 ] |
|
3624 ]. |
|
3625 anyMethodMissing ifTrue:[ |
|
3626 Transcript showCR:'ProjectBrowser: cannot save method patches & extensions due to missing method(s)'. |
|
3627 ] ifFalse:[ |
|
3628 self checkInMethods:methods |
|
3629 ]. |
|
3630 ]. |
|
3631 |
|
3632 "/ check in the project file itself |
|
3633 self checkInProjectFile. |
|
3634 |
|
3635 ! |
|
3636 |
3254 inspectCurrentProject |
3637 inspectCurrentProject |
3255 "make the selected Project the current project" |
3638 "inspect the current project" |
3256 |
3639 |
3257 |project selectedNode| |
3640 self hasProjectSelected ifTrue:[ |
3258 |
3641 self currentProject inspect. |
3259 self hasProjectNodeSelected ifTrue:[ |
|
3260 selectedNode := self selectedTreeNode. |
|
3261 project := selectedNode contents. |
|
3262 |
|
3263 project inspect. |
|
3264 ] |
3642 ] |
3265 ! |
3643 ! |
3266 |
3644 |
3267 itemDoubleClicked:index |
3645 itemDoubleClicked:index |
3268 |node classOrClassName cls| |
3646 |node classOrClassName cls| |
3295 action := item action. |
3673 action := item action. |
3296 action notNil ifTrue:[ |
3674 action notNil ifTrue:[ |
3297 action value:item. |
3675 action value:item. |
3298 ]. |
3676 ]. |
3299 |
3677 |
3300 self valueOfInfoLabel value: item info. |
3678 info := item info. |
3301 |
3679 info size == 0 ifTrue:[ |
3302 self hasProjectSelectedHolder value:self hasProjectNodeSelected. |
3680 ((p := self currentProject) notNil |
|
3681 and:[p isLoaded ~~ true]) ifTrue:[ |
|
3682 info := 'Projects code is not loaded.' |
|
3683 ]. |
|
3684 ]. |
|
3685 self valueOfInfoLabel value:info. |
|
3686 |
|
3687 self hasProjectSelectedHolder value:self hasProjectSelected. |
3303 |
3688 |
3304 "Modified: / 26.4.1999 / 22:49:20 / cg" |
3689 "Modified: / 26.4.1999 / 22:49:20 / cg" |
3305 ! |
3690 ! |
3306 |
3691 |
3307 loadClassesFromDirectory |
3692 loadClassesFromDirectory |
3322 self newProject:newProject |
3707 self newProject:newProject |
3323 ] |
3708 ] |
3324 ] |
3709 ] |
3325 ! |
3710 ! |
3326 |
3711 |
|
3712 loadProjectCode |
|
3713 |project filesToLoad methodsFile ns anyPatchClassMissing anyPatches| |
|
3714 |
|
3715 project := self currentProject. |
|
3716 ns := project defaultNameSpace. |
|
3717 ns isSymbol ifTrue:[ |
|
3718 ns := Namespace name:ns |
|
3719 ]. |
|
3720 self withReadCursorDo:[ |
|
3721 filesToLoad := OrderedCollection new. |
|
3722 |
|
3723 "/ load all classes ... |
|
3724 project classInfo do:[:aClassInfo | |
|
3725 |className fileToLoad cls| |
|
3726 |
|
3727 className := aClassInfo className. |
|
3728 fileToLoad := aClassInfo classFileName. |
|
3729 cls := ns at:className asSymbol. |
|
3730 cls notNil ifTrue:[ |
|
3731 cls isBehavior ifFalse:[ |
|
3732 (self confirm:('Attention: a global named ' , className , ' exists, but is not a class.\\Load anyway ?') withCRs) |
|
3733 ifFalse:[ |
|
3734 fileToLoad := nil |
|
3735 ] |
|
3736 ] ifTrue:[ |
|
3737 cls isLoaded ifTrue:[ |
|
3738 fileToLoad := nil |
|
3739 ] |
|
3740 ] |
|
3741 ]. |
|
3742 fileToLoad notNil ifTrue:[ |
|
3743 filesToLoad add:fileToLoad |
|
3744 ]. |
|
3745 ]. |
|
3746 |
|
3747 anyPatchClassMissing := false. |
|
3748 anyPatches := false. |
|
3749 project methodInfo do:[:aMethodInfo | |
|
3750 |className methodName mthd cls| |
|
3751 |
|
3752 className := aMethodInfo className. |
|
3753 methodName := aMethodInfo methodName. |
|
3754 cls := Smalltalk at:className asSymbol. |
|
3755 (cls isNil or:[cls isBehavior not or:[cls isLoaded not]]) ifTrue:[ |
|
3756 self warn:('Missing class: ' , className , ' (required for patches)'). |
|
3757 anyPatchClassMissing := anyPatches := true. |
|
3758 ] ifFalse:[ |
|
3759 "/ already present ? |
|
3760 (cls compiledMethodAt:methodName asSymbol) isNil ifTrue:[ |
|
3761 anyPatches := true. |
|
3762 ] |
|
3763 ] |
|
3764 ]. |
|
3765 |
|
3766 (methodsFile := project propertyAt:#methodsFile) notNil ifTrue:[ |
|
3767 anyPatches ifTrue:[ |
|
3768 anyPatchClassMissing ifTrue:[ |
|
3769 self warn:('Cannot load patches & extensions, due to missing class(es)') |
|
3770 ] ifFalse:[ |
|
3771 filesToLoad add:methodsFile |
|
3772 ] |
|
3773 ] |
|
3774 ] ifFalse:[ |
|
3775 anyPatches ifTrue:[ |
|
3776 self warn:('No file for methods (patches & extensions) is defined in project') |
|
3777 ]. |
|
3778 ]. |
|
3779 |
|
3780 filesToLoad size == 0 ifTrue:[ |
|
3781 self information:'Projects code is already loaded.' |
|
3782 ] ifFalse:[ |
|
3783 "/ load twice to avoid load-order trouble with superclasses .. |
|
3784 2 timesRepeat:[ |
|
3785 Class packageQuerySignal answer:project package asSymbol |
|
3786 do:[ |
|
3787 filesToLoad do:[:fileToLoad | |
|
3788 Smalltalk fileIn:(project directory asFilename construct:fileToLoad) pathName |
|
3789 ] |
|
3790 ] |
|
3791 ] |
|
3792 ]. |
|
3793 project isLoaded:true. |
|
3794 self readAspectsFromProject |
|
3795 ] |
|
3796 ! |
|
3797 |
3327 makeCurrentProject |
3798 makeCurrentProject |
3328 "make the selected Project the current project" |
3799 "make the selected Project the current project" |
3329 |
3800 |
3330 |project selectedNode| |
3801 |project| |
3331 |
3802 |
3332 self hasProjectNodeSelected ifTrue:[ |
3803 self hasProjectSelected ifTrue:[ |
3333 selectedNode := self selectedTreeNode. |
3804 project := self currentProject. |
3334 project := selectedNode contents. |
|
3335 |
3805 |
3336 Project current:project. |
3806 Project current:project. |
3337 self showWhat value == #current ifTrue:[ |
3807 self showWhat value == #current ifTrue:[ |
3338 self updateProjectTree |
3808 self updateProjectTree |
3339 ] |
3809 ] |
3351 |
3821 |
3352 newProject:newProject |
3822 newProject:newProject |
3353 |newNode| |
3823 |newNode| |
3354 |
3824 |
3355 newNode := self nodeFor:newProject. |
3825 newNode := self nodeFor:newProject. |
3356 projectTree add:newNode. |
3826 self addProjectNodeToTree:newNode. |
3357 self projectTreeHolder root:projectTree. |
3827 self projectTreeHolder root:projectTree. |
3358 "/ self projectTreeHolder selectNode:newNode. |
3828 "/ self projectTreeHolder selectNode:newNode. |
3359 "/ self projectTreeHolder expand:newNode. |
3829 "/ self projectTreeHolder expand:newNode. |
3360 |
3830 |
3361 self readAspectsFromProject. |
3831 self readAspectsFromProject. |
3363 self updateListOfRequiredPrerequisiteClasses. |
3833 self updateListOfRequiredPrerequisiteClasses. |
3364 ] |
3834 ] |
3365 ! |
3835 ! |
3366 |
3836 |
3367 newSubProject |
3837 newSubProject |
3368 |selectedNode subProjectsNode newNode parentProject newProject| |
3838 |projectNode subProjectsNode newNode parentProject newProject| |
3369 |
3839 |
3370 selectedNode := self selectedTreeNode. |
3840 projectNode := self currentProjectNode. |
3371 |
3841 |
3372 self hasProjectNodeSelected ifTrue:[ |
3842 projectNode notNil ifTrue:[ |
3373 parentProject := selectedNode contents. |
3843 parentProject := projectNode contents. |
3374 subProjectsNode := selectedNode children detect:[:child | child contents == #subprojects]. |
3844 subProjectsNode := projectNode children detect:[:child | child contents == #subprojects]. |
3375 ] ifFalse:[ |
|
3376 self hasSubProjectsNodeSelected ifTrue:[ |
|
3377 subProjectsNode := selectedNode. |
|
3378 parentProject := selectedNode parent contents. |
|
3379 ]. |
|
3380 ]. |
|
3381 self halt. |
3845 self halt. |
3382 parentProject notNil ifTrue:[ |
3846 parentProject notNil ifTrue:[ |
3383 newProject := Project new. |
3847 newProject := Project new. |
3384 newNode := self nodeFor:newProject. |
3848 newNode := self nodeFor:newProject. |
3385 |
3849 |
3386 parentProject addSubProject:newProject. |
3850 parentProject addSubProject:newProject. |
3387 subProjectsNode add:newNode. |
3851 subProjectsNode add:newNode. |
3388 self projectTreeHolder root:projectTree. |
3852 self projectTreeHolder root:projectTree. |
3389 self projectTreeHolder selectNode:newNode. |
3853 self projectTreeHolder selectNode:newNode. |
|
3854 ] |
3390 ] |
3855 ] |
|
3856 |
3391 ! |
3857 ! |
3392 |
3858 |
3393 openProject |
3859 openProject |
3394 |fn| |
3860 |fn| |
3395 |
3861 |
3547 |
4013 |
3548 self currentCanvasHolder value:(self class rightCanvasSpecForHTMLText). |
4014 self currentCanvasHolder value:(self class rightCanvasSpecForHTMLText). |
3549 self htmlDocumentURLHolder value:project documentationURL. |
4015 self htmlDocumentURLHolder value:project documentationURL. |
3550 ! |
4016 ! |
3551 |
4017 |
|
4018 showMethodSourceOf:anItem |
|
4019 |node methodInfo classOrClassName cls mthd text| |
|
4020 |
|
4021 self hasMethodNodeSelected ifFalse:[^ self]. |
|
4022 |
|
4023 self currentCanvasHolder value:(self class rightCanvasSpecForEditableText). |
|
4024 |
|
4025 node := self selectedTreeNode. |
|
4026 methodInfo := node contents value. |
|
4027 cls := Smalltalk at:methodInfo className asSymbol. |
|
4028 cls isNil ifTrue:[ |
|
4029 text := 'The class is not (yet) loaded'. |
|
4030 ] ifFalse:[ |
|
4031 mthd := cls compiledMethodAt:(methodInfo methodName asSymbol). |
|
4032 mthd isNil ifTrue:[ |
|
4033 text := 'The method is not (yet) loaded'. |
|
4034 ] ifFalse:[ |
|
4035 text := mthd source |
|
4036 ] |
|
4037 ]. |
|
4038 self rightCanvasTextHolder value:text. |
|
4039 |
|
4040 ! |
|
4041 |
3552 showPatchesListOf:anItem |
4042 showPatchesListOf:anItem |
3553 |projectItem project patches l| |
4043 |projectItem project patches l| |
3554 |
4044 |
3555 projectItem := anItem parent. |
4045 projectItem := anItem parent. |
3556 project := projectItem contents. |
4046 project := projectItem contents. |
3557 |
4047 |
3558 patches := project individualMethods. |
4048 self updatePatchesListForProject:project. |
3559 patches := patches collect:[:m | m who]. |
4049 |
3560 patches := patches sort:[:w1 :w2 | |
4050 "/ patches := project methods. |
3561 |w1Nm w2Nm| |
4051 "/ patches := patches collect:[:m | m who]. |
3562 |
4052 "/ patches := patches sort:[:w1 :w2 | |
3563 w1Nm := w1 methodClass name. |
4053 "/ |w1Nm w2Nm| |
3564 w2Nm := w2 methodClass name. |
4054 "/ |
3565 w1Nm < w2Nm ifTrue:[ |
4055 "/ w1Nm := w1 methodClass name. |
3566 true |
4056 "/ w2Nm := w2 methodClass name. |
3567 ] ifFalse:[ |
4057 "/ w1Nm < w2Nm ifTrue:[ |
3568 w1Nm = w2Nm ifFalse:[ |
4058 "/ true |
3569 false |
4059 "/ ] ifFalse:[ |
3570 ] ifTrue:[ |
4060 "/ w1Nm = w2Nm ifFalse:[ |
3571 w1 methodSelector < w2 methodSelector |
4061 "/ false |
3572 ] |
4062 "/ ] ifTrue:[ |
3573 ] |
4063 "/ w1 methodSelector < w2 methodSelector |
3574 ]. |
4064 "/ ] |
3575 |
4065 "/ ] |
3576 l := self patchesList. |
4066 "/ ]. |
3577 l removeAll. |
4067 "/ |
3578 l addAll:patches. |
4068 "/ l := self patchesList. |
|
4069 "/ l removeAll. |
|
4070 "/ l addAll:patches. |
3579 |
4071 |
3580 self currentCanvasHolder value:(self class rightCanvasSpecForPatchesList). |
4072 self currentCanvasHolder value:(self class rightCanvasSpecForPatchesList). |
3581 ! |
4073 ! |
3582 |
4074 |
3583 showReadOnlyText:someText |
4075 showReadOnlyText:someText |
3662 , ' of the projects ' , nTotal printString , ' classes are not loaded'. |
4154 , ' of the projects ' , nTotal printString , ' classes are not loaded'. |
3663 ]. |
4155 ]. |
3664 "/ self notify:msg. |
4156 "/ self notify:msg. |
3665 ]. |
4157 ]. |
3666 modifiedChannel value:false. |
4158 modifiedChannel value:false. |
|
4159 ! |
|
4160 |
|
4161 updatePatchesListForProject:aProject |
|
4162 |methodInfo l| |
|
4163 |
|
4164 methodInfo := aProject methodInfo copy asOrderedCollection. |
|
4165 methodInfo sort:[:a :b | a displayString < b displayString]. |
|
4166 |
|
4167 l := self patchesList. |
|
4168 l removeAll. |
|
4169 l addAll:methodInfo. |
|
4170 |
|
4171 |
3667 ! ! |
4172 ! ! |
3668 |
4173 |
3669 !ProjectBrowser methodsFor:'user actions - canvas'! |
4174 !ProjectBrowser methodsFor:'user actions - canvas'! |
3670 |
4175 |
3671 accept |
4176 accept |
3722 self accept |
4227 self accept |
3723 |
4228 |
3724 ! |
4229 ! |
3725 |
4230 |
3726 browseMethod |
4231 browseMethod |
|
4232 "browse the selected method (from tree)" |
|
4233 |
|
4234 |patchWho mthdInfo cls mthd| |
|
4235 |
|
4236 mthdInfo := self selectedTreeNode value value. |
|
4237 cls := Smalltalk at: mthdInfo className asSymbol. |
|
4238 cls notNil ifTrue:[ |
|
4239 mthd := cls compiledMethodAt:(mthdInfo methodName asSymbol). |
|
4240 mthd notNil ifTrue:[ |
|
4241 SystemBrowser browseClass:cls selector:mthdInfo methodName. |
|
4242 ^ self |
|
4243 ] |
|
4244 ]. |
|
4245 self information:'Method not (yet) loaded.' |
|
4246 ! |
|
4247 |
|
4248 browseMethodFromCanvas |
3727 "browse the selected table-rows method (from patches canvas)" |
4249 "browse the selected table-rows method (from patches canvas)" |
3728 |
4250 |
3729 |patchWho patchIndex| |
4251 |patchWho patchIndex| |
3730 |
4252 |
3731 patchIndex := self selectedPatch value. |
4253 patchIndex := self selectedPatchInRightCanvas value. |
3732 patchWho := self patchesList at:patchIndex. |
4254 patchWho := self patchesList at:patchIndex. |
3733 SystemBrowser browseClass:patchWho methodClass selector:patchWho methodSelector. |
4255 SystemBrowser browseClass:patchWho methodClass selector:patchWho methodSelector. |
3734 |
4256 |
3735 ! |
4257 ! |
3736 |
4258 |
3737 browseMethodFull |
4259 browseMethodFull |
|
4260 "browse the selected method (from tree)" |
|
4261 |
|
4262 |patchWho mthdInfo cls mthd| |
|
4263 |
|
4264 mthdInfo := self selectedTreeNode value value. |
|
4265 cls := Smalltalk at: mthdInfo className asSymbol. |
|
4266 cls notNil ifTrue:[ |
|
4267 mthd := cls compiledMethodAt:(mthdInfo methodName asSymbol). |
|
4268 mthd notNil ifTrue:[ |
|
4269 SystemBrowser openInClass:cls selector:mthdInfo methodName. |
|
4270 ^ self |
|
4271 ] |
|
4272 ]. |
|
4273 self information:'Method not (yet) loaded.' |
|
4274 |
|
4275 ! |
|
4276 |
|
4277 browseMethodFullFromCanvas |
3738 "browse the selected table-rows method (from patches canvas)" |
4278 "browse the selected table-rows method (from patches canvas)" |
3739 |
4279 |
3740 |patchWho patchIndex| |
4280 |patchWho patchIndex| |
3741 |
4281 |
3742 patchIndex := self selectedPatch value. |
4282 patchIndex := self selectedPatchInRightCanvas value. |
3743 patchWho := self patchesList at:patchIndex. |
4283 patchWho := self patchesList at:patchIndex. |
3744 SystemBrowser openInClass:patchWho methodClass selector:patchWho methodSelector. |
4284 SystemBrowser openInClass:patchWho methodClass selector:patchWho methodSelector. |
3745 |
4285 |
3746 ! |
4286 ! |
3747 |
4287 |