equal
deleted
inserted
replaced
186 |
186 |
187 ) |
187 ) |
188 ! ! |
188 ! ! |
189 |
189 |
190 !ProjectBrowser class methodsFor:'image specs'! |
190 !ProjectBrowser class methodsFor:'image specs'! |
|
191 |
|
192 bigProjectBrowserIcon |
|
193 "This resource specification was automatically generated |
|
194 by the ImageEditor of ST/X." |
|
195 |
|
196 "Do not manually edit this!! If it is corrupted, |
|
197 the ImageEditor may not be able to read the specification." |
|
198 |
|
199 " |
|
200 self bigProjectBrowserIcon inspect |
|
201 ImageEditor openOnClass:self andSelector:#bigProjectBrowserIcon |
|
202 " |
|
203 |
|
204 <resource: #image> |
|
205 |
|
206 ^Icon |
|
207 constantNamed:#'ProjectBrowser bigProjectBrowserIcon' |
|
208 ifAbsentPut:[(Depth4Image new) width: 48; height: 48; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@L3@@@@@3L3L@@@@@@@@@@@@@@@@@@@@@L3@@@@@3L3L@@@@@@@@@@@@@@@@@@@L3L3L@@@L3L3L3@@@@@@@@@@@@@@@@@3L3@3L@@3L@@@L3@@@@@@@@@@@@@@@@@3L3@3L@@3L@@@L3@@@@@@@@@@@@@@@@L3@@@3L@@3L@@@L3@@@@@@@@@@@@@@@@L3@@@3L@@3L@@@L3@@@@@@@@@@@@@@@@L3@@@3L@@3L@@@L3@@@@@@@@@@@@@@@@L3@@@3L@@3L@L3L3@@@@@@@@@@@@@@@@@3L3P3MDP3L3L3QDQ@@@@@@@@@@@@@@@@3L3P3MDP3L3L3QDPD@@@@@@@@@@@@@@@3L3L3MDL3L3MDQDAD@@@@@@@@@@@@@@@3L3L3L3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48; height: 48; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@8C<@@@@@8C<@@@@G<G?@@@@_\\G@@@@_\\G@@@@8\\G@@@@8\\G@@@@8\\G@@@@8???<@@@_???<@@@_???<@@@_???<@@@_???<@@@_???<@@@????<@@A????<@@C????<@@G????<@@G????<@@G????<@@G????<@@G????<@@G????<@@G????<@@G????<@@G????<@@G????<@@G????8@@G????0@@G???? @@G????@@@G????@@@G???<@@@G???8@@@G???0@@@G??? @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; yourself); yourself]! |
191 |
209 |
192 buildOptionsIcon |
210 buildOptionsIcon |
193 "This resource specification was automatically generated |
211 "This resource specification was automatically generated |
194 by the ImageEditor of ST/X." |
212 by the ImageEditor of ST/X." |
195 |
213 |
1709 #(#WindowSpec |
1727 #(#WindowSpec |
1710 #label: 'ProjectBrowser' |
1728 #label: 'ProjectBrowser' |
1711 #name: 'ProjectBrowser' |
1729 #name: 'ProjectBrowser' |
1712 #min: #(#Point 10 10) |
1730 #min: #(#Point 10 10) |
1713 #max: #(#Point 1024 768) |
1731 #max: #(#Point 1024 768) |
1714 #bounds: #(#Rectangle 30 377 633 928) |
1732 #bounds: #(#Rectangle 10 20 613 571) |
1715 #menu: #mainMenu |
1733 #menu: #mainMenu |
|
1734 #icon: #bigProjectBrowserIcon |
1716 ) |
1735 ) |
1717 #component: |
1736 #component: |
1718 #(#SpecCollection |
1737 #(#SpecCollection |
1719 #collection: #( |
1738 #collection: #( |
1720 #(#MenuPanelSpec |
1739 #(#MenuPanelSpec |
1724 #textDefault: true |
1743 #textDefault: true |
1725 ) |
1744 ) |
1726 #(#VariableHorizontalPanelSpec |
1745 #(#VariableHorizontalPanelSpec |
1727 #name: 'VariableHorizontalPanel1' |
1746 #name: 'VariableHorizontalPanel1' |
1728 #layout: #(#LayoutFrame 0 0.0 40 0.0 0 1.0 -24 1.0) |
1747 #layout: #(#LayoutFrame 0 0.0 40 0.0 0 1.0 -24 1.0) |
1729 #handles: #(#Any 0.379433 1.0) |
1748 #handles: |
|
1749 #(#OrderedCollection |
|
1750 #Any 0.379433 |
|
1751 1.0 |
|
1752 ) |
1730 #component: |
1753 #component: |
1731 #(#SpecCollection |
1754 #(#SpecCollection |
1732 #collection: #( |
1755 #collection: #( |
1733 #(#SelectionInTreeViewSpec |
1756 #(#SelectionInTreeViewSpec |
1734 #name: 'TreeList1' |
1757 #name: 'TreeList1' |
2287 |project browser nodes theNode| |
2310 |project browser nodes theNode| |
2288 |
2311 |
2289 browser := self new. |
2312 browser := self new. |
2290 browser allButOpen. |
2313 browser allButOpen. |
2291 project := browser loadFromProjectFile:aFilename. |
2314 project := browser loadFromProjectFile:aFilename. |
2292 |
2315 browser expandPathToNodeFor:project. |
2293 theNode := browser projectTreeHolder |
|
2294 detectFirstItem:[:item | item contents == project]. |
|
2295 |
|
2296 [theNode notNil] whileTrue:[ |
|
2297 browser projectTreeHolder expand:theNode. |
|
2298 theNode := theNode parent. |
|
2299 ]. |
|
2300 |
|
2301 browser openWindow |
2316 browser openWindow |
2302 ! ! |
2317 ! ! |
2303 |
2318 |
2304 !ProjectBrowser class methodsFor:'tableColumns specs'! |
2319 !ProjectBrowser class methodsFor:'tableColumns specs'! |
2305 |
2320 |
3431 ] |
3446 ] |
3432 ] |
3447 ] |
3433 |
3448 |
3434 ! |
3449 ! |
3435 |
3450 |
|
3451 expandPathToNodeFor:someContents |
|
3452 |theNode| |
|
3453 |
|
3454 theNode := self projectTreeHolder |
|
3455 detectFirstItem:[:item | item contents == someContents]. |
|
3456 |
|
3457 [theNode notNil] whileTrue:[ |
|
3458 self projectTreeHolder expand:theNode. |
|
3459 theNode := theNode parent. |
|
3460 ]. |
|
3461 |
|
3462 |
|
3463 |
|
3464 ! |
|
3465 |
3436 hasClassNodeSelected |
3466 hasClassNodeSelected |
3437 |selectedNode| |
3467 |selectedNode| |
3438 |
3468 |
3439 selectedNode := self selectedTreeNode. |
3469 selectedNode := self selectedTreeNode. |
3440 selectedNode isNil ifTrue:[^ false]. |
3470 selectedNode isNil ifTrue:[^ false]. |
4566 ]. |
4596 ]. |
4567 |
4597 |
4568 ! |
4598 ! |
4569 |
4599 |
4570 loadFromProjectFile:aFilenameString |
4600 loadFromProjectFile:aFilenameString |
4571 |newProject| |
4601 |oldNode newProject| |
4572 |
4602 |
4573 self withReadCursorDo:[ |
4603 self withReadCursorDo:[ |
4574 newProject := Project new loadFromProjectFile:aFilenameString. |
4604 newProject := Project new loadFromProjectFile:aFilenameString. |
|
4605 |
|
4606 oldNode := self projectTreeHolder |
|
4607 detectFirstItem:[:item | item contents class == Project |
|
4608 and:[item contents package = newProject package]]. |
|
4609 oldNode notNil ifTrue:[ |
|
4610 (self confirm:'Overload packages definitions from file ?') ifFalse:[ |
|
4611 ^ self |
|
4612 ]. |
|
4613 self projectTreeHolder remove:oldNode. |
|
4614 ]. |
|
4615 |
4575 newProject notNil ifTrue:[ |
4616 newProject notNil ifTrue:[ |
4576 self newProject:newProject |
4617 self newProject:newProject |
4577 ] |
4618 ]. |
|
4619 self expandPathToNodeFor:newProject. |
|
4620 |
4578 ]. |
4621 ]. |
4579 ^ newProject |
4622 ^ newProject |
4580 ! |
4623 ! |
4581 |
4624 |
4582 loadProjectCode |
4625 loadProjectCode |