1620 self doClassMenu:[:currentClass | aBlock value:currentClass value:sel] |
1620 self doClassMenu:[:currentClass | aBlock value:currentClass value:sel] |
1621 ! ! |
1621 ! ! |
1622 |
1622 |
1623 !BrowserView methodsFor:'class list source administration'! |
1623 !BrowserView methodsFor:'class list source administration'! |
1624 |
1624 |
|
1625 classCreateSourceContainerFor:aClass |
|
1626 "let user specify the source-repository values for aClass" |
|
1627 |
|
1628 |box |
|
1629 moduleDirectory subDirectory |
|
1630 fileName specialFlags |
|
1631 check y component info fn project| |
|
1632 |
|
1633 moduleDirectory := 'stx' asValue. |
|
1634 subDirectory := '' asValue. |
|
1635 |
|
1636 (Project notNil and:[(project := Project current) notNil]) ifTrue:[ |
|
1637 subDirectory value:(project name) |
|
1638 ]. |
|
1639 |
|
1640 info := SourceCodeManager sourceInfoOfClass:aClass. |
|
1641 info notNil ifTrue:[ |
|
1642 (info includesKey:#module) ifTrue:[ |
|
1643 moduleDirectory value:(info at:#module). |
|
1644 ]. |
|
1645 (info includesKey:#directory) ifTrue:[ |
|
1646 subDirectory value:(info at:#directory). |
|
1647 ]. |
|
1648 (info includesKey:#expectedFileName) ifTrue:[ |
|
1649 fn := (info at:#expectedFileName). |
|
1650 ] ifFalse:[ |
|
1651 (info includesKey:#classFileName) ifTrue:[ |
|
1652 fn := (info at:#classFileName). |
|
1653 ] |
|
1654 ] |
|
1655 ]. |
|
1656 |
|
1657 fn isNil ifTrue:[ |
|
1658 fn := (Smalltalk fileNameForClass:aClass) , '.st'. |
|
1659 ]. |
|
1660 "/ |
|
1661 "/ should check for conflicts ... |
|
1662 "/ |
|
1663 |
|
1664 fileName := fn asValue. |
|
1665 |
|
1666 box := DialogBox new. |
|
1667 box label:(resources string:'Repository information for %1' with:aClass name). |
|
1668 |
|
1669 component := box addTextLabel:(resources string:'CREATE_REPOSITORY' with:currentClass name) withCRs. |
|
1670 component adjust:#left; borderWidth:0. |
|
1671 |
|
1672 y := box yPosition. |
|
1673 component := box addTextLabel:(resources string:'Module:'). |
|
1674 component width:0.5; adjust:#right. |
|
1675 box yPosition:y. |
|
1676 component := box addInputFieldOn:moduleDirectory tabable:true. |
|
1677 component width:0.5; left:0.5; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
|
1678 |
|
1679 box addVerticalSpace. |
|
1680 y := box yPosition. |
|
1681 component := box addTextLabel:'Package:'. |
|
1682 component width:0.5; adjust:#right. |
|
1683 box yPosition:y. |
|
1684 component := box addInputFieldOn:subDirectory tabable:true. |
|
1685 component width:0.5; left:0.5; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
|
1686 |
|
1687 box addVerticalSpace. |
|
1688 y := box yPosition. |
|
1689 component := box addTextLabel:'Filename:'. |
|
1690 component width:0.5; adjust:#right. |
|
1691 box yPosition:y. |
|
1692 component := box addInputFieldOn:fileName tabable:true. |
|
1693 component width:0.5; left:0.5; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
|
1694 |
|
1695 box addVerticalSpace. |
|
1696 box addVerticalSpace. |
|
1697 |
|
1698 box addAbortButton; addOkButton. |
|
1699 |
|
1700 box showAtPointer. |
|
1701 |
|
1702 box accepted ifTrue:[ |
|
1703 self halt. |
|
1704 ] |
|
1705 |
|
1706 "Modified: 25.11.1995 / 18:03:25 / cg" |
|
1707 ! |
|
1708 |
1625 classCheckin |
1709 classCheckin |
1626 "check a class into the source repository" |
1710 "check a class into the source repository" |
1627 |
1711 |
1628 self doClassMenu:[:currentClass | |
1712 self doClassMenu:[:currentClass | |
1629 |logMessage| |
1713 |logMessage info| |
|
1714 |
|
1715 (info := SourceCodeManager sourceInfoOfClass:currentClass) isNil ifTrue:[ |
|
1716 ^ self classCreateSourceContainerFor:currentClass |
|
1717 ]. |
1630 |
1718 |
1631 logMessage := Dialog |
1719 logMessage := Dialog |
1632 request:'enter a log message:' |
1720 request:'enter a log message:' |
1633 initialAnswer:'' |
1721 initialAnswer:'' |
1634 onCancel:nil. |
1722 onCancel:nil. |
|
1723 |
1635 logMessage notNil ifTrue:[ |
1724 logMessage notNil ifTrue:[ |
1636 self busyLabel:'checking in %1' with:currentClass name. |
1725 self busyLabel:'checking in %1' with:currentClass name. |
1637 SourceCodeManager checkinClass:currentClass logMessage:logMessage. |
1726 (SourceCodeManager checkinClass:currentClass logMessage:logMessage) ifFalse:[ |
|
1727 self warn:'checkin failed'. |
|
1728 ]. |
1638 aspect == #revisionInfo ifTrue:[ |
1729 aspect == #revisionInfo ifTrue:[ |
1639 self classListUpdate |
1730 self classListUpdate |
1640 ]. |
1731 ]. |
1641 self normalLabel. |
1732 self normalLabel. |
1642 ] |
1733 ] |
1643 ] |
1734 ] |
1644 |
1735 |
1645 "Created: 23.11.1995 / 11:41:38 / cg" |
1736 "Created: 23.11.1995 / 11:41:38 / cg" |
1646 "Modified: 23.11.1995 / 18:34:42 / cg" |
1737 "Modified: 25.11.1995 / 17:51:59 / cg" |
1647 ! |
1738 ! |
1648 |
1739 |
1649 classCompareWithNewestInRepository |
1740 classCompareWithNewestInRepository |
1650 "open a diff-textView comparing the current (in-image) version |
1741 "open a diff-textView comparing the current (in-image) version |
1651 with the most recent version found in the repository." |
1742 with the most recent version found in the repository." |
1706 aStream nextPutAll:' Filename ........ : ' , (info at:#fileName ifAbsent:'?'); cr. |
1797 aStream nextPutAll:' Filename ........ : ' , (info at:#fileName ifAbsent:'?'); cr. |
1707 aStream nextPutAll:' Revision ........ : ' , (info at:#revision ifAbsent:'?'); cr. |
1798 aStream nextPutAll:' Revision ........ : ' , (info at:#revision ifAbsent:'?'); cr. |
1708 aStream nextPutAll:' Checkin date .... : ' , (info at:#date ifAbsent:'?') , ' ' , (info at:#time ifAbsent:'?'); cr. |
1799 aStream nextPutAll:' Checkin date .... : ' , (info at:#date ifAbsent:'?') , ' ' , (info at:#time ifAbsent:'?'); cr. |
1709 aStream nextPutAll:' Checkin user .... : ' , (info at:#user ifAbsent:'?'); cr. |
1800 aStream nextPutAll:' Checkin user .... : ' , (info at:#user ifAbsent:'?'); cr. |
1710 |
1801 |
1711 (info2 := currentClass sourceCodeInfo) notNil ifTrue:[ |
1802 (info2 := currentClass packageSourceCodeInfo) notNil ifTrue:[ |
1712 aStream nextPutAll:' Repository: ..... : ' , (info2 at:#module ifAbsent:'?'); cr. |
1803 aStream nextPutAll:' Repository: ..... : ' , (info2 at:#module ifAbsent:'?'); cr. |
1713 aStream nextPutAll:' Directory: ...... : ' , (info2 at:#directory ifAbsent:'?'); cr. |
1804 aStream nextPutAll:' Directory: ...... : ' , (info2 at:#directory ifAbsent:'?'); cr. |
1714 ]. |
1805 ]. |
1715 aStream nextPutAll:' Container ....... : ' , (info at:#repositoryPathName ifAbsent:'?'); cr. |
1806 aStream nextPutAll:' Container ....... : ' , (info at:#repositoryPathName ifAbsent:'?'); cr. |
1716 aStream cr. |
1807 aStream cr. |