equal
deleted
inserted
replaced
19 privateIn:ProjectBrowser |
19 privateIn:ProjectBrowser |
20 ! |
20 ! |
21 |
21 |
22 |
22 |
23 !ProjectBrowser class methodsFor:'image specs'! |
23 !ProjectBrowser class methodsFor:'image specs'! |
|
24 |
|
25 classIcon |
|
26 "This resource specification was automatically generated |
|
27 by the ImageEditor of ST/X." |
|
28 |
|
29 "Do not manually edit this!! If it is corrupted, |
|
30 the ImageEditor may not be able to read the specification." |
|
31 |
|
32 " |
|
33 self classIcon inspect |
|
34 ImageEditor openOnClass:self andSelector:#classIcon |
|
35 " |
|
36 |
|
37 <resource: #image> |
|
38 |
|
39 ^Icon |
|
40 constantNamed:#'ProjectBrowser classIcon' |
|
41 ifAbsentPut:[(Depth4Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'H"H"H"H"H"@"H"H"H"H"HBH@@@@@@@H H H!!DQD"@"@"@@@@@@@BHBHBH"H"H H H HQDQDR@@@@@@@@@@@@@@@BH"H"H @@@@HQDQDR@@@@@"H"H"HBHBHBDQDQD H H H"H"H"@"@"@@@@@@@@@BHBH"H"H"H"H H"H"H"H"Hb') ; colorMapFromArray:#[0 0 0 132 130 132 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@C?8O? ?>C?8O? ?>C?8O? ?>C?8O? ?>@@@@@@b') ; yourself); yourself]! |
24 |
42 |
25 classesIcon |
43 classesIcon |
26 "This resource specification was automatically generated |
44 "This resource specification was automatically generated |
27 by the ImageEditor of ST/X." |
45 by the ImageEditor of ST/X." |
28 |
46 |
1979 |
1997 |
1980 |projectName pNode |
1998 |projectName pNode |
1981 propertiesNode docNode classesNode patchesNode subprojectsNode filesNode |
1999 propertiesNode docNode classesNode patchesNode subprojectsNode filesNode |
1982 commentNode prerequisitesNode analysisNode designNode codeNode |
2000 commentNode prerequisitesNode analysisNode designNode codeNode |
1983 userDocNode userOverViewNode userGuideNode userRefManNode |
2001 userDocNode userOverViewNode userGuideNode userRefManNode |
1984 deploymentNode| |
2002 deploymentNode classIcon| |
1985 |
2003 |
1986 projectName := aProject name. |
2004 projectName := aProject name. |
1987 pNode := ProjectNode name:projectName. |
2005 pNode := ProjectNode name:projectName. |
1988 pNode contents:aProject. |
2006 pNode contents:aProject. |
1989 |
2007 |
2025 |
2043 |
2026 prerequisitesNode contents:#prerequisites. |
2044 prerequisitesNode contents:#prerequisites. |
2027 prerequisitesNode icon:(self class prerequisitesIcon). |
2045 prerequisitesNode icon:(self class prerequisitesIcon). |
2028 prerequisitesNode spec:[self class rightCanvasSpecForPrerequisites]. |
2046 prerequisitesNode spec:[self class rightCanvasSpecForPrerequisites]. |
2029 |
2047 |
|
2048 classIcon := self class classIcon. |
|
2049 |
2030 classesNode contents:#classes. |
2050 classesNode contents:#classes. |
2031 classesNode icon:(self class classesIcon). |
2051 classesNode icon:(self class classesIcon). |
2032 ((aProject classes ? #()) copy sort:[:a :b | |
2052 ((aProject classes ? #()) copy sort:[:a :b | |
2033 |nmA nmB| |
2053 |nmA nmB| |
2034 |
2054 |
2040 |cNode cName| |
2060 |cNode cName| |
2041 |
2061 |
2042 cName := aClass isSymbol ifTrue:[aClass] ifFalse:[aClass name]. |
2062 cName := aClass isSymbol ifTrue:[aClass] ifFalse:[aClass name]. |
2043 cNode := ProjectTreeItem name:cName. |
2063 cNode := ProjectTreeItem name:cName. |
2044 cNode contents:(#class -> aClass). |
2064 cNode contents:(#class -> aClass). |
|
2065 cNode icon:classIcon. |
2045 classesNode add:cNode. |
2066 classesNode add:cNode. |
2046 ]. |
2067 ]. |
2047 |
2068 |
2048 propertiesNode contents:#properties. |
2069 propertiesNode contents:#properties. |
2049 propertiesNode spec:[self class rightCanvasSpecForProperties]. |
2070 propertiesNode spec:[self class rightCanvasSpecForProperties]. |
2081 readAspectsFromProject |
2102 readAspectsFromProject |
2082 |p| |
2103 |p| |
2083 |
2104 |
2084 p := self currentProject. |
2105 p := self currentProject. |
2085 p notNil ifTrue:[ |
2106 p notNil ifTrue:[ |
2086 self rightCanvasTextHolder value:p comment. |
2107 self selectedTreeNode value contents == #comment ifTrue:[ |
|
2108 self rightCanvasTextHolder value:p comment. |
|
2109 ]. |
2087 |
2110 |
2088 self currentProjectWasNotLoadedFromFile value:p wasLoadedFromFile not. |
2111 self currentProjectWasNotLoadedFromFile value:p wasLoadedFromFile not. |
2089 self projectType value:(p type). |
2112 self projectType value:(p type). |
2090 self projectDirectory value:(p directory). |
2113 self projectDirectory value:(p directory). |
2091 |
2114 |
2175 ]. |
2198 ]. |
2176 selectedNode contents == #patches ifTrue:[ |
2199 selectedNode contents == #patches ifTrue:[ |
2177 self showPatchesListOf:selectedNode. |
2200 self showPatchesListOf:selectedNode. |
2178 ^ self. |
2201 ^ self. |
2179 ]. |
2202 ]. |
|
2203 self hasClassNodeSelected ifTrue:[ |
|
2204 self showClassDefinitionOf:selectedNode. |
|
2205 ^ self. |
|
2206 ]. |
2180 |
2207 |
2181 self currentCanvasHolder value:(self class emptyRightCanvasSpec). |
2208 self currentCanvasHolder value:(self class emptyRightCanvasSpec). |
2182 self rightCanvasTextHolder value:''. |
2209 self rightCanvasTextHolder value:''. |
2183 |
2210 |
2184 "Modified: / 23.3.1999 / 14:16:02 / cg" |
2211 "Modified: / 23.3.1999 / 14:16:02 / cg" |
2478 ]. |
2505 ]. |
2479 ^ true |
2506 ^ true |
2480 |
2507 |
2481 ! |
2508 ! |
2482 |
2509 |
|
2510 showClassDefinitionOf:anItem |
|
2511 |node className cls text| |
|
2512 |
|
2513 self hasClassNodeSelected ifFalse:[^ self]. |
|
2514 |
|
2515 self currentCanvasHolder value:(self class rightCanvasSpecForEditableText). |
|
2516 |
|
2517 node := self selectedTreeNode value. |
|
2518 className := node contents value. |
|
2519 cls := Smalltalk at:className. |
|
2520 cls isNil ifTrue:[ |
|
2521 text := 'The class is not (yet) loaded'. |
|
2522 ] ifFalse:[ |
|
2523 text := cls definition |
|
2524 ]. |
|
2525 self rightCanvasTextHolder value:text. |
|
2526 |
|
2527 ! |
|
2528 |
2483 showClassListOf:anItem |
2529 showClassListOf:anItem |
2484 |projectItem project classInfo l| |
2530 |projectItem project classInfo l| |
2485 |
2531 |
2486 projectItem := anItem parent. |
2532 projectItem := anItem parent. |
2487 project := projectItem contents. |
2533 project := projectItem contents. |