BrowserView.st
changeset 289 a6133415c545
parent 287 b578810b0ec4
child 291 c7f0dd4247d3
equal deleted inserted replaced
288:99703e03b072 289:a6133415c545
  1769             ].
  1769             ].
  1770             aStream isNil ifTrue:[
  1770             aStream isNil ifTrue:[
  1771                 self warn:'could not extract source from repository'.
  1771                 self warn:'could not extract source from repository'.
  1772                 ^ self
  1772                 ^ self
  1773             ].
  1773             ].
  1774             comparedSource := aStream contents.
  1774             comparedSource := aStream contents asString.
  1775             aStream close.
  1775             aStream close.
  1776 
  1776 
  1777             self busyLabel:'generating current source ...' with:nil.
  1777             self busyLabel:'generating current source ...' with:nil.
  1778 
  1778 
  1779             aStream := '' writeStream.
  1779             aStream := '' writeStream.
  1780             currentClass fileOutOn:aStream withTimeStamp:false.
  1780             currentClass fileOutOn:aStream withTimeStamp:false.
  1781             currentSource := aStream contents.
  1781             currentSource := aStream contents asString.
  1782             aStream close.
  1782             aStream close.
  1783 
  1783 
  1784             self busyLabel:'comparing  ...' with:nil.
  1784             self busyLabel:'comparing  ...' with:nil.
  1785             thisRevString := currentClass revision.
  1785 
  1786             thisRevString isNil ifTrue:[
  1786             comparedSource = currentSource ifTrue:[
  1787                 thisRevString := 'no revision'
  1787                 self information:'versions are identical'.
       
  1788             ] ifFalse:[
       
  1789                 thisRevString := currentClass revision.
       
  1790                 thisRevString isNil ifTrue:[
       
  1791                     thisRevString := 'no revision'
       
  1792                 ].
       
  1793                 v := DiffTextView 
       
  1794                     openOn:currentSource label:'current (' , thisRevString , ')'
       
  1795                     and:comparedSource label:'repository (' , revString , ')'.      
       
  1796                 v label:'comparing ' , currentClass name.
  1788             ].
  1797             ].
  1789             v := DiffTextView 
       
  1790                 openOn:currentSource label:'current (' , thisRevString , ')'
       
  1791                 and:comparedSource label:'repository (' , revString , ')'.      
       
  1792             v label:'comparing ' , currentClass name.
       
  1793             self normalLabel.
  1798             self normalLabel.
  1794         ]
  1799         ]
  1795     ]
  1800     ]
  1796 
  1801 
  1797     "Created: 14.11.1995 / 16:43:15 / cg"
  1802     "Created: 14.11.1995 / 16:43:15 / cg"
  1798     "Modified: 13.12.1995 / 16:45:14 / cg"
  1803     "Modified: 13.12.1995 / 17:33:19 / cg"
  1799 !
  1804 !
  1800 
  1805 
  1801 classCreateSourceContainerFor:aClass
  1806 classCreateSourceContainerFor:aClass
  1802     "let user specify the source-repository values for aClass"
  1807     "let user specify the source-repository values for aClass"
  1803 
  1808 
  4321 
  4326 
  4322     "Created: 23.11.1995 / 12:03:57 / cg"
  4327     "Created: 23.11.1995 / 12:03:57 / cg"
  4323     "Modified: 23.11.1995 / 14:12:15 / cg"
  4328     "Modified: 23.11.1995 / 14:12:15 / cg"
  4324 !
  4329 !
  4325 
  4330 
       
  4331 methodMakeIgnored
       
  4332     "make the current method be invisible.
       
  4333      EXPERIMENTAL"
       
  4334 
       
  4335     self methodPrivacy:#ignored
       
  4336 
       
  4337     "Created: 13.12.1995 / 13:59:59 / cg"
       
  4338 !
       
  4339 
  4326 methodMakePrivate
  4340 methodMakePrivate
  4327     "make the current method private.
  4341     "make the current method private.
  4328      EXPERIMENTAL"
  4342      EXPERIMENTAL"
  4329 
  4343 
  4330     self methodPrivacy:#private 
  4344     self methodPrivacy:#private 
  4369                         'decompile'
  4383                         'decompile'
  4370                         '-'
  4384                         '-'
  4371                         'make private'
  4385                         'make private'
  4372                         'make protected'
  4386                         'make protected'
  4373                         'make public'
  4387                         'make public'
       
  4388                         'make ignored'
  4374                    ).
  4389                    ).
  4375         selectors := #(
  4390         selectors := #(
  4376                         methodInspect
  4391                         methodInspect
  4377                         methodSTCCompile
  4392                         methodSTCCompile
  4378                         methodDecompile
  4393                         methodDecompile
  4379                         nil
  4394                         nil
  4380                         methodMakePrivate
  4395                         methodMakePrivate
  4381                         methodMakeProtected
  4396                         methodMakeProtected
  4382                         methodMakePublic
  4397                         methodMakePublic
       
  4398                         methodMakeIgnored
  4383                       )
  4399                       )
  4384     ] ifFalse:[
  4400     ] ifFalse:[
  4385 
  4401 
  4386         sepLocalLabels := sepLocalSelectors := #().
  4402         sepLocalLabels := sepLocalSelectors := #().
  4387 
  4403 
  4584             m disable:#methodMakeProtected
  4600             m disable:#methodMakeProtected
  4585         ].
  4601         ].
  4586         currentMethod isPublic ifTrue:[
  4602         currentMethod isPublic ifTrue:[
  4587             m disable:#methodMakePublic
  4603             m disable:#methodMakePublic
  4588         ].
  4604         ].
       
  4605         currentMethod isIgnored ifTrue:[
       
  4606             m disable:#methodMakeIgnored
       
  4607         ].
  4589     ].
  4608     ].
  4590     currentMethod notNil ifTrue:[
  4609     currentMethod notNil ifTrue:[
  4591         (currentMethod code notNil
  4610         (currentMethod code notNil
  4592         or:[Compiler canCreateMachineCode not]) ifTrue:[
  4611         or:[Compiler canCreateMachineCode not]) ifTrue:[
  4593             m disable:#methodSTCCompile
  4612             m disable:#methodSTCCompile
  4597         ].
  4616         ].
  4598     ].
  4617     ].
  4599     ^ m
  4618     ^ m
  4600 
  4619 
  4601     "Created: 23.11.1995 / 12:02:29 / cg"
  4620     "Created: 23.11.1995 / 12:02:29 / cg"
  4602     "Modified: 13.12.1995 / 10:58:40 / cg"
  4621     "Modified: 13.12.1995 / 14:00:52 / cg"
  4603 !
  4622 !
  4604 
  4623 
  4605 methodMove
  4624 methodMove
  4606     "move the current method into another class; typically a superclass"
  4625     "move the current method into another class; typically a superclass"
  4607 
  4626 
  4670 methodPrivacy:how
  4689 methodPrivacy:how
  4671     "change the current methods privacy.
  4690     "change the current methods privacy.
  4672      EXPERIMENTAL"
  4691      EXPERIMENTAL"
  4673 
  4692 
  4674     self checkMethodSelected ifFalse:[^ self].
  4693     self checkMethodSelected ifFalse:[^ self].
  4675     currentMethod isPublic ifFalse:[
  4694 
  4676 	currentMethod privacy:how.
  4695     (how == currentMethod privacy ) "currentMethod isPublic" ifFalse:[
       
  4696         currentMethod privacy:how.
  4677 "/        actualClass updateRevisionString.
  4697 "/        actualClass updateRevisionString.
  4678 	actualClass addChangeRecordForMethodPrivacy:currentMethod.
  4698         actualClass addChangeRecordForMethodPrivacy:currentMethod.
  4679 	self updateMethodListWithScroll:false keepSelection:true.
  4699         self updateMethodListWithScroll:false keepSelection:true.
  4680     ]
  4700     ]
  4681 
  4701 
  4682     "Created: 29.10.1995 / 20:00:00 / cg"
  4702     "Created: 29.10.1995 / 20:00:00 / cg"
       
  4703     "Modified: 13.12.1995 / 14:28:20 / cg"
  4683 !
  4704 !
  4684 
  4705 
  4685 methodRemove
  4706 methodRemove
  4686     "remove the current method"
  4707     "remove the current method"
  4687 
  4708 
  6405 ! !
  6426 ! !
  6406 
  6427 
  6407 !BrowserView class methodsFor:'documentation'!
  6428 !BrowserView class methodsFor:'documentation'!
  6408 
  6429 
  6409 version
  6430 version
  6410     ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.71 1995-12-13 16:23:56 cg Exp $'
  6431     ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.72 1995-12-13 16:53:04 cg Exp $'
  6411 ! !
  6432 ! !
  6412 BrowserView initialize!
  6433 BrowserView initialize!