1758 |
1762 |
1759 "/ |
1763 "/ |
1760 "/ ask the sourceCodeManager if it knows anything about that class |
1764 "/ ask the sourceCodeManager if it knows anything about that class |
1761 "/ if so, take that as a default. |
1765 "/ if so, take that as a default. |
1762 "/ |
1766 "/ |
1763 info := (aClass sourceCodeManager) sourceInfoOfClass:aClass. |
1767 info := (mgr := aClass sourceCodeManager) sourceInfoOfClass:aClass. |
1764 info notNil ifTrue:[ |
1768 info notNil ifTrue:[ |
1765 (info includesKey:#module) ifTrue:[ |
1769 (info includesKey:#module) ifTrue:[ |
1766 moduleHolder value:(info at:#module). |
1770 moduleHolder value:(info at:#module). |
1767 ]. |
1771 ]. |
1768 (info includesKey:#directory) ifTrue:[ |
1772 (info includesKey:#directory) ifTrue:[ |
1825 box addAbortButton; addOkButton. |
1829 box addAbortButton; addOkButton. |
1826 |
1830 |
1827 box showAtPointer. |
1831 box showAtPointer. |
1828 |
1832 |
1829 box accepted ifTrue:[ |
1833 box accepted ifTrue:[ |
|
1834 aClass revisionString isNil ifTrue:[ |
|
1835 (self confirm:(resources string:'%1 does not have any revision info (#version method)\\Shall I create one ?' with:aClass name) withCRs) |
|
1836 ifFalse:[ |
|
1837 ^ self |
|
1838 ]. |
|
1839 aClass updateVersionMethodFor:(mgr initialRevisionStringFor:aClass). |
|
1840 ]. |
|
1841 |
1830 module := moduleHolder value withoutSpaces. |
1842 module := moduleHolder value withoutSpaces. |
1831 package := packageHolder value withoutSpaces. |
1843 package := packageHolder value withoutSpaces. |
1832 fileName := fileNameHolder value withoutSpaces. |
1844 fileName := fileNameHolder value withoutSpaces. |
1833 |
1845 |
1834 "/ |
1846 "/ |
1835 "/ check for the module |
1847 "/ check for the module |
1836 "/ |
1848 "/ |
1837 (SourceCodeManager |
1849 (mgr checkForExistingModule:module) ifFalse:[ |
1838 checkForExistingModule:module) ifFalse:[ |
|
1839 (self confirm:(resources string:'%1 is a new module.\\create it ?' with:module) withCRs) ifFalse:[ |
1850 (self confirm:(resources string:'%1 is a new module.\\create it ?' with:module) withCRs) ifFalse:[ |
1840 ^ self. |
1851 ^ self. |
1841 ]. |
1852 ]. |
1842 (SourceCodeManager createModule:module) ifFalse:[ |
1853 (mgr createModule:module) ifFalse:[ |
1843 self warn:(resources string:'cannot create new module: %1' with:module). |
1854 self warn:(resources string:'cannot create new module: %1' with:module). |
1844 ^ self. |
1855 ^ self. |
1845 ] |
1856 ] |
1846 ]. |
1857 ]. |
1847 |
1858 |
1848 "/ |
1859 "/ |
1849 "/ check for the package |
1860 "/ check for the package |
1850 "/ |
1861 "/ |
1851 (SourceCodeManager |
1862 (mgr checkForExistingModule:module package:package) ifFalse:[ |
1852 checkForExistingModule:module |
|
1853 package:package) ifFalse:[ |
|
1854 (self confirm:(resources string:'%1 is a new package (in module %2).\\create it ?' with:package with:module) withCRs) ifFalse:[ |
1863 (self confirm:(resources string:'%1 is a new package (in module %2).\\create it ?' with:package with:module) withCRs) ifFalse:[ |
1855 ^ self. |
1864 ^ self. |
1856 ]. |
1865 ]. |
1857 (SourceCodeManager createModule:module package:package) ifFalse:[ |
1866 (mgr createModule:module package:package) ifFalse:[ |
1858 self warn:(resources string:'cannot create new package: %1 (in module %2)' with:package with:module). |
1867 self warn:(resources string:'cannot create new package: %1 (in module %2)' with:package with:module). |
1859 ^ self. |
1868 ^ self. |
1860 ] |
1869 ] |
1861 ]. |
1870 ]. |
1862 |
1871 |
1863 "/ |
1872 "/ |
1864 "/ check for the container itself |
1873 "/ check for the container itself |
1865 "/ |
1874 "/ |
1866 (SourceCodeManager |
1875 (mgr checkForExistingContainerInModule:module package:package container:fileName) ifTrue:[ |
1867 checkForExistingContainerInModule:module |
|
1868 package:package |
|
1869 container:fileName) ifTrue:[ |
|
1870 self warn:(resources string:'container for %1 already exists in %2/%3.\\You have to destroy the old one or use another name.' with:fileName with:module with:package) withCRs. |
1876 self warn:(resources string:'container for %1 already exists in %2/%3.\\You have to destroy the old one or use another name.' with:fileName with:module with:package) withCRs. |
1871 ^ self |
1877 ^ self |
1872 ]. |
1878 ]. |
1873 |
1879 |
1874 SourceCodeManager |
1880 (mgr |
1875 createContainerFor:aClass |
1881 createContainerFor:aClass |
1876 inModule:module |
1882 inModule:module |
1877 package:package |
1883 package:package |
1878 container:fileName |
1884 container:fileName) ifFalse:[ |
|
1885 self warn:(resources string:'failed to create container.'). |
|
1886 ^ self. |
|
1887 ]. |
1879 ]. |
1888 ]. |
1880 box destroy |
1889 box destroy |
1881 |
1890 |
1882 "Modified: 9.12.1995 / 19:55:59 / cg" |
1891 "Modified: 9.12.1995 / 21:51:54 / cg" |
1883 ! |
1892 ! |
1884 |
1893 |
1885 classLoadRevision |
1894 classLoadRevision |
1886 "load a specific revision into the system - especially useful to |
1895 "load a specific revision into the system - especially useful to |
1887 upgrade a class to the newest revision" |
1896 upgrade a class to the newest revision" |