ClassDescription.st
changeset 5192 9f0f4d7eaa33
parent 5187 4bf3787cc63a
child 5193 a54e016b1b30
equal deleted inserted replaced
5191:3da2c7f61745 5192:9f0f4d7eaa33
    31 	classVariableNames:''
    31 	classVariableNames:''
    32 	poolDictionaries:''
    32 	poolDictionaries:''
    33 	privateIn:ClassDescription
    33 	privateIn:ClassDescription
    34 !
    34 !
    35 
    35 
    36 ClassDescription::PackageRedefinition subclass:#MethodRedefinitionNotification
    36 ClassDescription::PackageRedefinition subclass:#ClassRedefinitionNotification
    37 	instanceVariableNames:''
    37 	instanceVariableNames:''
    38 	classVariableNames:''
    38 	classVariableNames:''
    39 	poolDictionaries:''
    39 	poolDictionaries:''
    40 	privateIn:ClassDescription
    40 	privateIn:ClassDescription
    41 !
    41 !
    42 
    42 
    43 ClassDescription::PackageRedefinition subclass:#ClassRedefinitionNotification
    43 ClassDescription::PackageRedefinition subclass:#MethodRedefinitionNotification
    44 	instanceVariableNames:''
    44 	instanceVariableNames:''
    45 	classVariableNames:''
    45 	classVariableNames:''
    46 	poolDictionaries:''
    46 	poolDictionaries:''
    47 	privateIn:ClassDescription
    47 	privateIn:ClassDescription
    48 !
    48 !
  1631     |aStream fileName|
  1631     |aStream fileName|
  1632 
  1632 
  1633     fileName := (self name , '-' , aCategory , '.st') asFilename.
  1633     fileName := (self name , '-' , aCategory , '.st') asFilename.
  1634     fileName makeLegalFilename.
  1634     fileName makeLegalFilename.
  1635 
  1635 
  1636     "
  1636     "/
  1637      this test allows a smalltalk to be built without Projects/ChangeSets
  1637     "/ this test allows a smalltalk to be built without Projects/ChangeSets
  1638     "
  1638     "/
  1639     Project notNil ifTrue:[
  1639     Project notNil ifTrue:[
  1640 	fileName := Project currentProjectDirectory asFilename construct:(fileName name).
  1640         fileName := Project currentProjectDirectory asFilename construct:(fileName name).
  1641     ].
  1641     ].
  1642 
  1642 
  1643     "
  1643     "/
  1644      if file exists, save original in a .sav file
  1644     "/ if the file exists, save original in a .sav file
  1645     "
  1645     "/
  1646     fileName exists ifTrue:[
  1646     fileName exists ifTrue:[
  1647 	fileName copyTo:(fileName withSuffix:'sav')
  1647         fileName copyTo:(fileName withSuffix:'sav')
  1648     ].
  1648     ].
  1649     aStream := FileStream newFileNamed:fileName.
  1649     aStream := FileStream newFileNamed:fileName.
  1650     aStream isNil ifTrue:[
  1650     aStream isNil ifTrue:[
  1651 	^ FileOutErrorSignal 
  1651         ^ FileOutErrorSignal 
  1652 		raiseRequestWith:fileName
  1652                 raiseRequestWith:fileName
  1653 		errorString:('cannot create file:', fileName pathName)
  1653                 errorString:('cannot create file:', fileName pathName)
  1654     ].
  1654     ].
       
  1655 
  1655     self fileOutCategory:aCategory on:aStream.
  1656     self fileOutCategory:aCategory on:aStream.
  1656     aStream close
  1657     aStream close
  1657 
  1658 
  1658     "Modified: / 1.4.1997 / 16:00:24 / stefan"
  1659     "Modified: / 1.4.1997 / 16:00:24 / stefan"
  1659     "Created: / 1.4.1997 / 16:04:18 / stefan"
  1660     "Created: / 1.4.1997 / 16:04:18 / stefan"
  1777 !
  1778 !
  1778 
  1779 
  1779 fileOutCategory:aCategory on:aStream
  1780 fileOutCategory:aCategory on:aStream
  1780     "file out all methods belonging to aCategory, aString onto aStream"
  1781     "file out all methods belonging to aCategory, aString onto aStream"
  1781 
  1782 
  1782     self fileOutCategory:aCategory except:nil only:nil methodFilter:nil on:aStream
  1783     "/
       
  1784     "/ must use the classes full name
       
  1785     "/
       
  1786     Class fileOutNameSpaceQuerySignal answer:true do:[
       
  1787         self fileOutCategory:aCategory except:nil only:nil methodFilter:nil on:aStream
       
  1788     ]
  1783 
  1789 
  1784     "Created: 1.4.1997 / 16:04:44 / stefan"
  1790     "Created: 1.4.1997 / 16:04:44 / stefan"
  1785 !
  1791 !
  1786 
  1792 
  1787 fileOutMethod:aMethod
  1793 fileOutMethod:aMethod
  3526     ^ #keep
  3532     ^ #keep
  3527 
  3533 
  3528 
  3534 
  3529 ! !
  3535 ! !
  3530 
  3536 
       
  3537 !ClassDescription::ClassRedefinitionNotification methodsFor:'queries'!
       
  3538 
       
  3539 description
       
  3540     ^ 'attempt to redefine class from different package'
       
  3541 ! !
       
  3542 
  3531 !ClassDescription::MethodRedefinitionNotification methodsFor:'queries'!
  3543 !ClassDescription::MethodRedefinitionNotification methodsFor:'queries'!
  3532 
  3544 
  3533 description
  3545 description
  3534     ^ 'attempt to redefine method from different package'
  3546     ^ 'attempt to redefine method from different package'
  3535 ! !
  3547 ! !
  3536 
  3548 
  3537 !ClassDescription::ClassRedefinitionNotification methodsFor:'queries'!
       
  3538 
       
  3539 description
       
  3540     ^ 'attempt to redefine class from different package'
       
  3541 ! !
       
  3542 
       
  3543 !ClassDescription class methodsFor:'documentation'!
  3549 !ClassDescription class methodsFor:'documentation'!
  3544 
  3550 
  3545 version
  3551 version
  3546     ^ '$Header: /cvs/stx/stx/libbasic/ClassDescription.st,v 1.93 2000-01-17 11:16:42 cg Exp $'
  3552     ^ '$Header: /cvs/stx/stx/libbasic/ClassDescription.st,v 1.94 2000-01-18 09:54:46 cg Exp $'
  3547 ! !
  3553 ! !
  3548 ClassDescription initialize!
  3554 ClassDescription initialize!