228 ) |
228 ) |
229 ) |
229 ) |
230 ) |
230 ) |
231 ! |
231 ! |
232 |
232 |
|
233 rightCanvasSpecForDeployment |
|
234 "This resource specification was automatically generated |
|
235 by the UIPainter of ST/X." |
|
236 |
|
237 "Do not manually edit this!! If it is corrupted, |
|
238 the UIPainter may not be able to read the specification." |
|
239 |
|
240 " |
|
241 UIPainter new openOnClass:ProjectBrowser andSelector:#rightCanvasSpecForDeployment |
|
242 ProjectBrowser new openInterface:#rightCanvasSpecForDeployment |
|
243 " |
|
244 |
|
245 <resource: #canvas> |
|
246 |
|
247 ^ |
|
248 |
|
249 #(#FullSpec |
|
250 #name: #rightCanvasSpecForDeployment |
|
251 #window: |
|
252 #(#WindowSpec |
|
253 #name: 'NewApplication' |
|
254 #layout: #(#LayoutFrame 216 0 173 0 515 0 472 0) |
|
255 #level: 0 |
|
256 #label: 'NewApplication' |
|
257 #min: #(#Point 10 10) |
|
258 #max: #(#Point 1280 1024) |
|
259 #bounds: #(#Rectangle 216 173 516 473) |
|
260 #usePreferredExtent: false |
|
261 #returnIsOKInDialog: true |
|
262 #escapeIsCancelInDialog: true |
|
263 ) |
|
264 #component: |
|
265 #(#SpecCollection |
|
266 #collection: |
|
267 #( |
|
268 #(#HorizontalPanelViewSpec |
|
269 #name: 'HorizontalPanel1' |
|
270 #layout: #(#LayoutFrame 0 0 -30 1 0 1 0 1) |
|
271 #component: |
|
272 #(#SpecCollection |
|
273 #collection: |
|
274 #( |
|
275 #(#ActionButtonSpec |
|
276 #name: 'Button1' |
|
277 #label: 'Cancel' |
|
278 #translateLabel: true |
|
279 #model: #cancel |
|
280 #enableChannel: #modifiedChannel |
|
281 #extent: #(#Point 145 22) |
|
282 ) |
|
283 #(#ActionButtonSpec |
|
284 #name: 'Button2' |
|
285 #label: 'OK' |
|
286 #translateLabel: true |
|
287 #model: #accept |
|
288 #enableChannel: #modifiedChannel |
|
289 #extent: #(#Point 146 22) |
|
290 ) |
|
291 ) |
|
292 ) |
|
293 #horizontalLayout: #fitSpace |
|
294 #verticalLayout: #center |
|
295 #horizontalSpace: 3 |
|
296 #verticalSpace: 3 |
|
297 ) |
|
298 #(#FramedBoxSpec |
|
299 #name: 'FramedBox1' |
|
300 #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 124 0) |
|
301 #component: |
|
302 #(#SpecCollection |
|
303 #collection: |
|
304 #( |
|
305 #(#CheckBoxSpec |
|
306 #name: 'CheckBox1' |
|
307 #layout: #(#LayoutFrame 0 0.0 10 0 0 1.0 32 0) |
|
308 #model: #deliverCompiledBinary |
|
309 #label: 'Compiled Binary' |
|
310 #translateLabel: true |
|
311 ) |
|
312 #(#CheckBoxSpec |
|
313 #name: 'CheckBox2' |
|
314 #layout: #(#LayoutFrame 0 0.0 38 0 0 1.0 60 0) |
|
315 #model: #deliverZipArchive |
|
316 #label: 'Zip Archive' |
|
317 #translateLabel: true |
|
318 ) |
|
319 #(#CheckBoxSpec |
|
320 #name: 'CheckBox3' |
|
321 #layout: #(#LayoutFrame 0 0.0 66 0 0 1.0 88 0) |
|
322 #model: #deliverSources |
|
323 #label: 'Sources' |
|
324 #translateLabel: true |
|
325 ) |
|
326 ) |
|
327 ) |
|
328 #label: 'Delivery' |
|
329 #labelPosition: #topLeft |
|
330 #translateLabel: true |
|
331 ) |
|
332 #(#FramedBoxSpec |
|
333 #name: 'FramedBox2' |
|
334 #layout: #(#LayoutFrame 0 0.0 125 0 0 1.0 190 0) |
|
335 #component: |
|
336 #(#SpecCollection |
|
337 #collection: |
|
338 #( |
|
339 #(#InputFieldSpec |
|
340 #name: 'EntryField1' |
|
341 #layout: #(#LayoutFrame 0 0.0 5 0 0 1.0 27 0) |
|
342 #model: #installDirectory |
|
343 #modifiedChannel: #modifiedChannel |
|
344 ) |
|
345 ) |
|
346 ) |
|
347 #label: 'Install Directory' |
|
348 #labelPosition: #topLeft |
|
349 #translateLabel: true |
|
350 ) |
|
351 ) |
|
352 ) |
|
353 ) |
|
354 ! |
|
355 |
233 rightCanvasSpecForEditableText |
356 rightCanvasSpecForEditableText |
234 "This resource specification was automatically generated |
357 "This resource specification was automatically generated |
235 by the UIPainter of ST/X." |
358 by the UIPainter of ST/X." |
236 |
359 |
237 "Do not manually edit this!! If it is corrupted, |
360 "Do not manually edit this!! If it is corrupted, |
385 #(#FullSpec |
508 #(#FullSpec |
386 #name: #rightCanvasSpecForProperties |
509 #name: #rightCanvasSpecForProperties |
387 #window: |
510 #window: |
388 #(#WindowSpec |
511 #(#WindowSpec |
389 #name: 'NewApplication' |
512 #name: 'NewApplication' |
390 #layout: #(#LayoutFrame 134 0 100 0 433 0 399 0) |
513 #layout: #(#LayoutFrame 216 0 173 0 515 0 472 0) |
391 #level: 0 |
514 #level: 0 |
392 #label: 'NewApplication' |
515 #label: 'NewApplication' |
393 #min: #(#Point 10 10) |
516 #min: #(#Point 10 10) |
394 #max: #(#Point 1280 1024) |
517 #max: #(#Point 1280 1024) |
395 #bounds: #(#Rectangle 134 100 434 400) |
518 #bounds: #(#Rectangle 216 173 516 473) |
396 #usePreferredExtent: false |
519 #usePreferredExtent: false |
397 #returnIsOKInDialog: true |
520 #returnIsOKInDialog: true |
398 #escapeIsCancelInDialog: true |
521 #escapeIsCancelInDialog: true |
399 ) |
522 ) |
400 #component: |
523 #component: |
470 #(#InputFieldSpec |
595 #(#InputFieldSpec |
471 #name: 'EntryField1' |
596 #name: 'EntryField1' |
472 #layout: #(#LayoutFrame 0 0.0 4 0 0 1.0 26 0) |
597 #layout: #(#LayoutFrame 0 0.0 4 0 0 1.0 26 0) |
473 #enableChannel: #currentProjectWasNotLoadedFromFile |
598 #enableChannel: #currentProjectWasNotLoadedFromFile |
474 #model: #projectDirectory |
599 #model: #projectDirectory |
|
600 #modifiedChannel: #modifiedChannel |
475 ) |
601 ) |
476 ) |
602 ) |
477 ) |
603 ) |
478 #label: 'Directory' |
604 #label: 'Directory' |
479 #labelPosition: #topLeft |
605 #labelPosition: #topLeft |
480 #translateLabel: true |
606 #translateLabel: true |
481 ) |
607 ) |
482 ) |
608 ) |
483 ) |
609 ) |
484 ) |
610 ) |
485 |
|
486 "Modified: / 23.3.1999 / 14:20:32 / cg" |
|
487 ! |
611 ! |
488 |
612 |
489 rightCanvasSpecForReadOnlyText |
613 rightCanvasSpecForReadOnlyText |
490 "This resource specification was automatically generated |
614 "This resource specification was automatically generated |
491 by the UIPainter of ST/X." |
615 by the UIPainter of ST/X." |
589 #showRoot: false |
716 #showRoot: false |
590 #showDirectoryIndicatorForRoot: false |
717 #showDirectoryIndicatorForRoot: false |
591 #showDirectoryIndicator: true |
718 #showDirectoryIndicator: true |
592 #valueChangeSelector: #itemSelected: |
719 #valueChangeSelector: #itemSelected: |
593 #hierarchicalList: #projectTreeHolder |
720 #hierarchicalList: #projectTreeHolder |
|
721 #selectConditionSelector: #selectionChangeAllowed |
594 #highlightMode: #label |
722 #highlightMode: #label |
595 ) |
723 ) |
596 #(#SubCanvasSpec |
724 #(#SubCanvasSpec |
597 #name: 'SubCanvas1' |
725 #name: 'SubCanvas1' |
598 #hasHorizontalScrollBar: false |
726 #hasHorizontalScrollBar: false |
1039 ^ holder. |
1167 ^ holder. |
1040 |
1168 |
1041 "Created: / 23.3.1999 / 14:01:09 / cg" |
1169 "Created: / 23.3.1999 / 14:01:09 / cg" |
1042 ! |
1170 ! |
1043 |
1171 |
|
1172 deliverCompiledBinary |
|
1173 "automatically generated by UIPainter ..." |
|
1174 |
|
1175 "*** the code below creates a default model when invoked." |
|
1176 "*** (which may not be the one you wanted)" |
|
1177 "*** Please change as required and accept in the browser." |
|
1178 |
|
1179 |holder| |
|
1180 |
|
1181 (holder := builder bindingAt:#deliverCompiledBinary) isNil ifTrue:[ |
|
1182 builder aspectAt:#deliverCompiledBinary put:(holder := ValueHolder new). |
|
1183 holder onChangeSend:#value to:[modifiedChannel value:true]. |
|
1184 ]. |
|
1185 ^ holder. |
|
1186 |
|
1187 "Created: / 23.3.1999 / 14:18:05 / cg" |
|
1188 ! |
|
1189 |
|
1190 deliverSources |
|
1191 "automatically generated by UIPainter ..." |
|
1192 |
|
1193 "*** the code below creates a default model when invoked." |
|
1194 "*** (which may not be the one you wanted)" |
|
1195 "*** Please change as required and accept in the browser." |
|
1196 |
|
1197 |holder| |
|
1198 |
|
1199 (holder := builder bindingAt:#deliverSources) isNil ifTrue:[ |
|
1200 builder aspectAt:#deliverSources put:(holder := ValueHolder new). |
|
1201 holder onChangeSend:#value to:[modifiedChannel value:true]. |
|
1202 ]. |
|
1203 ^ holder. |
|
1204 |
|
1205 "Created: / 23.3.1999 / 14:18:05 / cg" |
|
1206 ! |
|
1207 |
|
1208 deliverZipArchive |
|
1209 "automatically generated by UIPainter ..." |
|
1210 |
|
1211 "*** the code below creates a default model when invoked." |
|
1212 "*** (which may not be the one you wanted)" |
|
1213 "*** Please change as required and accept in the browser." |
|
1214 |
|
1215 |holder| |
|
1216 |
|
1217 (holder := builder bindingAt:#deliverZipArchive) isNil ifTrue:[ |
|
1218 builder aspectAt:#deliverZipArchive put:(holder := ValueHolder new). |
|
1219 holder onChangeSend:#value to:[modifiedChannel value:true]. |
|
1220 ]. |
|
1221 ^ holder. |
|
1222 |
|
1223 "Created: / 23.3.1999 / 14:18:05 / cg" |
|
1224 ! |
|
1225 |
1044 hasProjectSelectedHolder |
1226 hasProjectSelectedHolder |
1045 ^ [ |
1227 ^ [ |
1046 self hasProjectNodeSelected |
1228 self hasProjectNodeSelected |
1047 ] |
1229 ] |
1048 ! |
1230 ! |
1066 builder aspectAt:#htmlDocumentURLHolder put:(holder := ValueHolder new). |
1248 builder aspectAt:#htmlDocumentURLHolder put:(holder := ValueHolder new). |
1067 ]. |
1249 ]. |
1068 ^ holder. |
1250 ^ holder. |
1069 ! |
1251 ! |
1070 |
1252 |
1071 patchesList |
1253 installDirectory |
1072 "automatically generated by UIPainter ..." |
1254 "automatically generated by UIPainter ..." |
1073 |
1255 |
1074 "*** the code below creates a default model when invoked." |
1256 "*** the code below creates a default model when invoked." |
1075 "*** (which may not be the one you wanted)" |
1257 "*** (which may not be the one you wanted)" |
1076 "*** Please change as required and accept in the browser." |
1258 "*** Please change as required and accept in the browser." |
1077 |
1259 |
1078 |holder| |
1260 |holder| |
1079 |
1261 |
1080 (holder := builder bindingAt:#patchesList) isNil ifTrue:[ |
1262 (holder := builder bindingAt:#installDirectory) isNil ifTrue:[ |
1081 builder aspectAt:#patchesList put:(holder := List new). |
1263 builder aspectAt:#installDirectory put:(holder := '/opt' asValue). |
|
1264 holder onChangeSend:#value to:[modifiedChannel value:true]. |
1082 ]. |
1265 ]. |
1083 ^ holder. |
1266 ^ holder. |
1084 ! |
1267 |
1085 |
1268 "Created: / 23.3.1999 / 14:18:05 / cg" |
1086 projectTreeHolder |
1269 ! |
|
1270 |
|
1271 modifiedChannel |
1087 "automatically generated by UIPainter ..." |
1272 "automatically generated by UIPainter ..." |
1088 |
1273 |
1089 "*** the code below creates a default model when invoked." |
1274 "*** the code below creates a default model when invoked." |
1090 "*** (which may not be the one you wanted)" |
1275 "*** (which may not be the one you wanted)" |
1091 "*** Please change as required and accept in the browser." |
1276 "*** Please change as required and accept in the browser." |
1092 |
1277 |
|
1278 modifiedChannel isNil ifTrue:[ |
|
1279 modifiedChannel := false asValue. |
|
1280 ]. |
|
1281 ^ modifiedChannel. |
|
1282 |
|
1283 ! |
|
1284 |
|
1285 patchesList |
|
1286 "automatically generated by UIPainter ..." |
|
1287 |
|
1288 "*** the code below creates a default model when invoked." |
|
1289 "*** (which may not be the one you wanted)" |
|
1290 "*** Please change as required and accept in the browser." |
|
1291 |
|
1292 |holder| |
|
1293 |
|
1294 (holder := builder bindingAt:#patchesList) isNil ifTrue:[ |
|
1295 builder aspectAt:#patchesList put:(holder := List new). |
|
1296 ]. |
|
1297 ^ holder. |
|
1298 ! |
|
1299 |
|
1300 projectDirectory |
|
1301 "automatically generated by UIPainter ..." |
|
1302 |
|
1303 "*** the code below creates a default model when invoked." |
|
1304 "*** (which may not be the one you wanted)" |
|
1305 "*** Please change as required and accept in the browser." |
|
1306 |
|
1307 |holder| |
|
1308 |
|
1309 (holder := builder bindingAt:#projectDirectory) isNil ifTrue:[ |
|
1310 builder aspectAt:#projectDirectory put:(holder := '.' asValue). |
|
1311 holder onChangeSend:#value to:[modifiedChannel value:true]. |
|
1312 ]. |
|
1313 ^ holder. |
|
1314 |
|
1315 "Created: / 23.3.1999 / 14:18:05 / cg" |
|
1316 ! |
|
1317 |
|
1318 projectTreeHolder |
|
1319 "automatically generated by UIPainter ..." |
|
1320 |
|
1321 "*** the code below creates a default model when invoked." |
|
1322 "*** (which may not be the one you wanted)" |
|
1323 "*** Please change as required and accept in the browser." |
|
1324 |
1093 |holder| |
1325 |holder| |
1094 |
1326 |
1095 (holder := builder bindingAt:#projectTree) isNil ifTrue:[ |
1327 (holder := builder bindingAt:#projectTree) isNil ifTrue:[ |
1096 builder aspectAt:#projectTree put:(holder := SelectionInTree new). |
1328 builder aspectAt:#projectTree put:(holder := SelectionInTree new). |
1097 holder root:self projectTree. |
1329 holder root:self projectTree. |
1144 builder aspectAt:#selectedTreeNode put:(holder := ValueHolder new). |
1377 builder aspectAt:#selectedTreeNode put:(holder := ValueHolder new). |
1145 ]. |
1378 ]. |
1146 ^ holder. |
1379 ^ holder. |
1147 ! ! |
1380 ! ! |
1148 |
1381 |
|
1382 !ProjectBrowser methodsFor:'change & update'! |
|
1383 |
|
1384 update:something with:aParameter from:changedObject |
|
1385 changedObject == self currentProject ifTrue:[ |
|
1386 self halt |
|
1387 ]. |
|
1388 ! ! |
|
1389 |
1149 !ProjectBrowser methodsFor:'initialization'! |
1390 !ProjectBrowser methodsFor:'initialization'! |
1150 |
1391 |
1151 postBuildWith:aBuiler |
1392 postBuildWith:aBuiler |
|
1393 self modifiedChannel value:false. |
|
1394 |
1152 self setupCanvasForNoSelection. |
1395 self setupCanvasForNoSelection. |
1153 ^ super postBuildWith:aBuiler |
1396 ^ super postBuildWith:aBuiler |
1154 ! |
1397 ! |
1155 |
1398 |
1156 setupCanvasForNoSelection |
1399 setupCanvasForNoSelection |
1185 ^ self |
1428 ^ self |
1186 ! ! |
1429 ! ! |
1187 |
1430 |
1188 !ProjectBrowser methodsFor:'private'! |
1431 !ProjectBrowser methodsFor:'private'! |
1189 |
1432 |
|
1433 currentProject |
|
1434 |node| |
|
1435 |
|
1436 node := self selectedTreeNode value. |
|
1437 node isNil ifTrue:[^ nil]. |
|
1438 |
|
1439 [node notNil and:[node isProjectNode not]] whileTrue:[ |
|
1440 node := node parent. |
|
1441 ]. |
|
1442 node notNil ifTrue:[ |
|
1443 ^ node contents |
|
1444 ]. |
|
1445 ^ nil |
|
1446 |
|
1447 ! |
|
1448 |
1190 hasClassesNodeSelected |
1449 hasClassesNodeSelected |
1191 |selectedNode| |
1450 |selectedNode| |
1192 |
1451 |
1193 selectedNode := self selectedTreeNode value. |
1452 selectedNode := self selectedTreeNode value. |
1194 selectedNode isNil ifTrue:[^ false]. |
1453 selectedNode isNil ifTrue:[^ false]. |
1309 ]. |
1569 ]. |
1310 |
1570 |
1311 ^ projectTree |
1571 ^ projectTree |
1312 ! |
1572 ! |
1313 |
1573 |
1314 readAspectsForProject |
1574 readAspectsFromProject |
1315 |p selectedNode| |
1575 |p| |
1316 |
1576 |
1317 self hasProjectNodeSelected ifTrue:[ |
1577 p := self currentProject. |
1318 selectedNode := self selectedTreeNode value. |
1578 p notNil ifTrue:[ |
1319 |
1579 self rightCanvasTextHolder value:p comment. |
1320 p := selectedNode contents. |
|
1321 |
1580 |
1322 self currentProjectWasNotLoadedFromFile value:p wasLoadedFromFile not. |
1581 self currentProjectWasNotLoadedFromFile value:p wasLoadedFromFile not. |
1323 self projectType value:(p type). |
1582 self projectType value:(p type). |
|
1583 self projectDirectory value:(p directory). |
|
1584 modifiedChannel value:false. |
|
1585 p addDependent:self. |
|
1586 ]. |
|
1587 |
|
1588 "Created: / 23.3.1999 / 14:16:12 / cg" |
|
1589 "Modified: / 23.3.1999 / 14:18:38 / cg" |
|
1590 ! |
|
1591 |
|
1592 saveAspectsIntoProject |
|
1593 |p| |
|
1594 |
|
1595 p := self currentProject. |
|
1596 p notNil ifTrue:[ |
|
1597 "/ self currentProjectWasNotLoadedFromFile value:p wasLoadedFromFile not. |
|
1598 "/ self projectType value:(p type). |
|
1599 "/ self projectDirectory value:(p directory). |
|
1600 "/ modifiedChannel value:false. |
1324 ]. |
1601 ]. |
1325 |
1602 |
1326 "Created: / 23.3.1999 / 14:16:12 / cg" |
1603 "Created: / 23.3.1999 / 14:16:12 / cg" |
1327 "Modified: / 23.3.1999 / 14:18:38 / cg" |
1604 "Modified: / 23.3.1999 / 14:18:38 / cg" |
1328 ! |
1605 ! |
1384 ^ pInfo methodSelector |
1660 ^ pInfo methodSelector |
1385 ! ! |
1661 ! ! |
1386 |
1662 |
1387 !ProjectBrowser methodsFor:'user actions'! |
1663 !ProjectBrowser methodsFor:'user actions'! |
1388 |
1664 |
|
1665 accept |
|
1666 "save values from aspects into the project" |
|
1667 |
|
1668 |p| |
|
1669 |
|
1670 p := self currentProject. |
|
1671 |
|
1672 self halt. |
|
1673 ! |
|
1674 |
|
1675 cancel |
|
1676 "reload aspects from the project" |
|
1677 |
|
1678 self readAspectsFromProject |
|
1679 ! |
|
1680 |
1389 itemSelected:index |
1681 itemSelected:index |
1390 |item action| |
1682 |item action| |
1391 |
1683 |
1392 self updateRightCanvas. |
1684 self updateRightCanvas. |
|
1685 |
|
1686 self readAspectsFromProject. |
1393 |
1687 |
1394 item := self projectTreeHolder value at:index. |
1688 item := self projectTreeHolder value at:index. |
1395 action := item action. |
1689 action := item action. |
1396 action notNil ifTrue:[ |
1690 action notNil ifTrue:[ |
1397 action value:item. |
1691 action value:item. |
1497 selectedProject name:nm. |
1791 selectedProject name:nm. |
1498 selectedNode name:nm. |
1792 selectedNode name:nm. |
1499 selectedNode changed. |
1793 selectedNode changed. |
1500 ] |
1794 ] |
1501 ] |
1795 ] |
|
1796 ! |
|
1797 |
|
1798 saveProject |
|
1799 |d p| |
|
1800 |
|
1801 p := self currentProject. |
|
1802 p directory isNil ifTrue:[ |
|
1803 d := (Dialog request:'Project Directory:'). |
|
1804 d size == 0 ifTrue:[ |
|
1805 ^ self |
|
1806 ]. |
|
1807 p directory:d |
|
1808 ]. |
|
1809 |
|
1810 p saveAsProjectFile. |
|
1811 ! |
|
1812 |
|
1813 selectionChangeAllowed |
|
1814 |answer| |
|
1815 |
|
1816 modifiedChannel value ifTrue:[ |
|
1817 answer := Dialog confirmWithCancel:'Accept changes ?'. |
|
1818 answer isNil ifTrue:[ |
|
1819 ^ false |
|
1820 ]. |
|
1821 answer == true ifTrue:[ |
|
1822 self accept. |
|
1823 ]. |
|
1824 ]. |
|
1825 ^ true |
|
1826 |
1502 ! |
1827 ! |
1503 |
1828 |
1504 showClassListOf:anItem |
1829 showClassListOf:anItem |
1505 |projectItem project classInfo l| |
1830 |projectItem project classInfo l| |
1506 |
1831 |