equal
deleted
inserted
replaced
4703 ! |
4703 ! |
4704 |
4704 |
4705 classNewApplication |
4705 classNewApplication |
4706 "create a class-definition prototype for an application in codeview" |
4706 "create a class-definition prototype for an application in codeview" |
4707 |
4707 |
4708 |theClass cls| |
|
4709 |
|
4710 self |
4708 self |
4711 classClassDefinitionTemplateFor:ApplicationModel |
4709 classClassDefinitionTemplateFor:ApplicationModel |
4712 in:currentClassCategory |
4710 in:currentClassCategory |
4713 namespace:false |
4711 namespace:false |
4714 private:false. |
4712 private:false. |
4715 |
4713 |
4716 aspect := nil. |
4714 aspect := nil. |
4717 |
4715 |
4718 "Modified: 4.1.1997 / 14:52:16 / cg" |
4716 "Modified: 4.1.1997 / 14:52:16 / cg" |
4719 ! |
4717 ! |
4745 ! |
4743 ! |
4746 |
4744 |
4747 classNewDialog |
4745 classNewDialog |
4748 "create a class-definition prototype for a dialog in codeview" |
4746 "create a class-definition prototype for a dialog in codeview" |
4749 |
4747 |
4750 |theClass cls| |
|
4751 |
|
4752 self |
4748 self |
4753 classClassDefinitionTemplateFor:SimpleDialog |
4749 classClassDefinitionTemplateFor:SimpleDialog |
4754 in:currentClassCategory |
4750 in:currentClassCategory |
4755 namespace:false |
4751 namespace:false |
4756 private:false. |
4752 private:false. |
4757 |
4753 |
4758 aspect := nil. |
4754 aspect := nil. |
4759 |
|
4760 ! |
4755 ! |
4761 |
4756 |
4762 classNewPrivateClass |
4757 classNewPrivateClass |
4763 "create a class-definition prototype in codeview" |
4758 "create a class-definition prototype in codeview" |
4764 |
4759 |
6161 |
6156 |
6162 classTemplateFor:aSuperClass in:categoryString namespace:isNameSpace private:isPrivate |
6157 classTemplateFor:aSuperClass in:categoryString namespace:isNameSpace private:isPrivate |
6163 "return a class definition template - be smart in what is offered initially" |
6158 "return a class definition template - be smart in what is offered initially" |
6164 |
6159 |
6165 |cat name nameProto namePrefix i existingNames withNameSpaceDirective |
6160 |cat name nameProto namePrefix i existingNames withNameSpaceDirective |
6166 className ownerName s isJava| |
6161 className ownerName s| |
6167 |
6162 |
6168 (aSuperClass notNil and:[aSuperClass isJavaClass not]) ifFalse:[ |
6163 (aSuperClass notNil and:[aSuperClass isJavaClass not]) ifFalse:[ |
6169 (currentNamespace == JAVA |
6164 (currentNamespace == JAVA |
6170 or:[aSuperClass notNil and:[aSuperClass isJavaClass]]) |
6165 or:[aSuperClass notNil and:[aSuperClass isJavaClass]]) |
6171 ifTrue:[ |
6166 ifTrue:[ |
6292 ! |
6287 ! |
6293 |
6288 |
6294 javaClassTemplateFor:aSuperClass in:categoryString private:isPrivate |
6289 javaClassTemplateFor:aSuperClass in:categoryString private:isPrivate |
6295 "return a java class definition template - be smart in what is offered initially" |
6290 "return a java class definition template - be smart in what is offered initially" |
6296 |
6291 |
6297 |cat name nameProto namePrefix i existingNames withNameSpaceDirective |
6292 |name i className s superPackage| |
6298 className ownerName s superPackage| |
|
6299 |
6293 |
6300 self setAcceptActionForNewJavaClass. |
6294 self setAcceptActionForNewJavaClass. |
6301 |
6295 |
6302 s := TextStream on:''. |
6296 s := TextStream on:''. |
6303 s nextPutAll:('package ' , categoryString , ';'). |
6297 s nextPutAll:('package ' , categoryString , ';'). |
7252 ! |
7246 ! |
7253 |
7247 |
7254 classNameFromClassMethodString:aString |
7248 classNameFromClassMethodString:aString |
7255 "helper for classMethod-list - extract the class name from the string" |
7249 "helper for classMethod-list - extract the class name from the string" |
7256 |
7250 |
7257 |pos s words clsName| |
7251 |s words clsName| |
7258 |
7252 |
7259 s := aString string withoutSpaces. |
7253 s := aString string withoutSpaces. |
7260 (s includes:${ ) ifTrue:[ |
7254 (s includes:${ ) ifTrue:[ |
7261 s := s copyTo:(s indexOf:${ ) - 1. |
7255 s := s copyTo:(s indexOf:${ ) - 1. |
7262 s := s withoutSpaces. |
7256 s := s withoutSpaces. |
8387 ! |
8381 ! |
8388 |
8382 |
8389 methodCategoryCreateApplicationMethods |
8383 methodCategoryCreateApplicationMethods |
8390 "create an empty application framework" |
8384 "create an empty application framework" |
8391 |
8385 |
8392 |cls fn txt isDialog| |
8386 |cls txt isDialog| |
8393 |
8387 |
8394 self checkClassSelected ifFalse:[^ self]. |
8388 self checkClassSelected ifFalse:[^ self]. |
8395 |
8389 |
8396 isDialog := (currentClass isSubclassOf:SimpleDialog). |
8390 isDialog := (currentClass isSubclassOf:SimpleDialog). |
8397 |
8391 |
9686 ! |
9680 ! |
9687 |
9681 |
9688 methodCompareSource |
9682 methodCompareSource |
9689 "compare with some other methods source" |
9683 "compare with some other methods source" |
9690 |
9684 |
9691 |prev v classAndMethod words className methodName |
9685 |v classAndMethod words className methodName |
9692 meta class method| |
9686 meta class method| |
9693 |
9687 |
9694 self checkMethodSelected ifFalse:[^ self]. |
9688 self checkMethodSelected ifFalse:[^ self]. |
9695 |
9689 |
9696 classAndMethod := Dialog |
9690 classAndMethod := Dialog |
9742 ! |
9736 ! |
9743 |
9737 |
9744 methodCompareSourceAgainstCurrent |
9738 methodCompareSourceAgainstCurrent |
9745 "compare with some other methods source" |
9739 "compare with some other methods source" |
9746 |
9740 |
9747 |prev v classAndMethod words className methodName |
9741 |v class codeHere codeRemote selector| |
9748 meta class method codeHere codeRemote selector| |
|
9749 |
9742 |
9750 self checkMethodSelected ifFalse:[^ self]. |
9743 self checkMethodSelected ifFalse:[^ self]. |
9751 class := currentMethod mclass. |
9744 class := currentMethod mclass. |
9752 selector := currentMethod selector. |
9745 selector := currentMethod selector. |
9753 |
9746 |
9789 |
9782 |
9790 methodCopy |
9783 methodCopy |
9791 "copy the current method into another class; typically a brother-sister class" |
9784 "copy the current method into another class; typically a brother-sister class" |
9792 |
9785 |
9793 |newClass newClassName sup initial copiedMethod |
9786 |newClass newClassName sup initial copiedMethod |
9794 supers subs list holders| |
9787 supers subs list| |
9795 |
9788 |
9796 self checkMethodSelected ifFalse:[^ self]. |
9789 self checkMethodSelected ifFalse:[^ self]. |
9797 |
9790 |
9798 lastMethodMoveClass ~= currentClass name ifTrue:[ |
9791 lastMethodMoveClass ~= currentClass name ifTrue:[ |
9799 initial := lastMethodMoveClass. |
9792 initial := lastMethodMoveClass. |
10421 |
10414 |
10422 methodMove |
10415 methodMove |
10423 "move the current method into another class; typically a superclass" |
10416 "move the current method into another class; typically a superclass" |
10424 |
10417 |
10425 |newClass newClassName sup initial movedMethod |
10418 |newClass newClassName sup initial movedMethod |
10426 supers subs list holders| |
10419 supers subs list| |
10427 |
10420 |
10428 self checkMethodSelected ifFalse:[^ self]. |
10421 self checkMethodSelected ifFalse:[^ self]. |
10429 |
10422 |
10430 lastMethodMoveClass ~= currentClass name ifTrue:[ |
10423 lastMethodMoveClass ~= currentClass name ifTrue:[ |
10431 initial := lastMethodMoveClass. |
10424 initial := lastMethodMoveClass. |
10961 |
10954 |
10962 listEntryForMethod:aMethod selector:selector |
10955 listEntryForMethod:aMethod selector:selector |
10963 "answer a method list entry |
10956 "answer a method list entry |
10964 (gimmic: adding a little image to breakPointed methods)" |
10957 (gimmic: adding a little image to breakPointed methods)" |
10965 |
10958 |
10966 |s icn resources| |
10959 |s icn| |
10967 |
10960 |
10968 s := aMethod printStringForBrowserWithSelector:selector. |
10961 s := aMethod printStringForBrowserWithSelector:selector. |
10969 |
10962 |
10970 "/ |
10963 "/ |
10971 "/ wrap icons (i.e. break- or trace points) |
10964 "/ wrap icons (i.e. break- or trace points) |
11678 "Created: 16.12.1995 / 18:41:37 / cg" |
11671 "Created: 16.12.1995 / 18:41:37 / cg" |
11679 "Modified: 23.4.1996 / 21:39:24 / cg" |
11672 "Modified: 23.4.1996 / 21:39:24 / cg" |
11680 ! |
11673 ! |
11681 |
11674 |
11682 updateCodeView |
11675 updateCodeView |
11683 |code sourceLineNumber doStartSyntax invalidate highlighter| |
11676 |code sourceLineNumber doStartSyntax highlighter| |
11684 |
11677 |
11685 codeView modifiedChannel retractInterestsFor:self. |
11678 codeView modifiedChannel retractInterestsFor:self. |
11686 |
11679 |
11687 aspect == #hierarchy ifTrue:[ |
11680 aspect == #hierarchy ifTrue:[ |
11688 ^ self classHierarchy |
11681 ^ self classHierarchy |
12269 #classWithPrivateClasses, |
12262 #classWithPrivateClasses, |
12270 #classHierarchy or |
12263 #classHierarchy or |
12271 #classHierarchyWithPrivateClasses" |
12264 #classHierarchyWithPrivateClasses" |
12272 |
12265 |
12273 |box panel selectorHolder where whereChannel caseHolder |
12266 |box panel selectorHolder where whereChannel caseHolder |
12274 b sel classes areas toSearch cls privates inputField ns| |
12267 b sel classes areas toSearch cls inputField ns| |
12275 |
12268 |
12276 areas := OrderedCollection new. |
12269 areas := OrderedCollection new. |
12277 |
12270 |
12278 isSelector ifTrue:[ |
12271 isSelector ifTrue:[ |
12279 sel := self selectorToSearchFor. |
12272 sel := self selectorToSearchFor. |
13196 |
13189 |
13197 "Modified: 18.8.1997 / 15:19:36 / cg" |
13190 "Modified: 18.8.1997 / 15:19:36 / cg" |
13198 ! |
13191 ! |
13199 |
13192 |
13200 refetchMethod |
13193 refetchMethod |
13201 |sel cls stillSearching ignoredClasses| |
13194 |sel| |
13202 |
13195 |
13203 sel := currentSelector. |
13196 sel := currentSelector. |
13204 self releaseMethod. |
13197 self releaseMethod. |
13205 currentSelector := sel. |
13198 currentSelector := sel. |
13206 sel notNil ifTrue:[ |
13199 sel notNil ifTrue:[ |
13207 currentMethod := (acceptClass ? actualClass) compiledMethodAt:sel. |
13200 currentMethod := (acceptClass ? actualClass) compiledMethodAt:sel. |
13208 |
13201 |
13209 (currentMethod notNil |
13202 (currentMethod notNil |
13210 and:[currentMethod isWrapped]) ifTrue:[ |
13203 and:[currentMethod isWrapped]) ifTrue:[ |
13211 currentMethod originalMethod addDependent:self. |
13204 currentMethod originalMethod addDependent:self. |
13212 currentMethod addDependent:self. |
13205 currentMethod addDependent:self. |
13213 ] |
13206 ] |
13214 ] |
13207 ] |
13215 |
13208 |
13216 "Created: / 27.7.1998 / 11:09:35 / cg" |
13209 "Created: / 27.7.1998 / 11:09:35 / cg" |
13217 "Modified: / 4.8.1998 / 20:04:47 / cg" |
13210 "Modified: / 4.8.1998 / 20:04:47 / cg" |
13218 ! |
13211 ! |
13973 text. |
13966 text. |
13974 (This is done as a event to synchronize the coloring with modifications |
13967 (This is done as a event to synchronize the coloring with modifications |
13975 done to the text - the colored text will discarded, if there were |
13968 done to the text - the colored text will discarded, if there were |
13976 any modifications in the meanwhile)" |
13969 any modifications in the meanwhile)" |
13977 |
13970 |
13978 |oldCodeList highlighter t prio| |
13971 |oldCodeList highlighter prio| |
13979 |
13972 |
13980 coloringProcess notNil ifTrue:[ |
13973 coloringProcess notNil ifTrue:[ |
13981 coloringProcess terminate. |
13974 coloringProcess terminate. |
13982 coloringProcess := nil. |
13975 coloringProcess := nil. |
13983 ]. |
13976 ]. |
14155 |
14148 |
14156 listOfAllMethodCategoriesInHierarchy:aClass |
14149 listOfAllMethodCategoriesInHierarchy:aClass |
14157 "answer a list of all method categories of the argument, aClass, |
14150 "answer a list of all method categories of the argument, aClass, |
14158 and all of its superclasses" |
14151 and all of its superclasses" |
14159 |
14152 |
14160 |newList cat| |
14153 |newList| |
14161 |
14154 |
14162 newList := Set new. |
14155 newList := Set new. |
14163 self classesInHierarchy:aClass do:[:c | |
14156 self classesInHierarchy:aClass do:[:c | |
14164 newList addAll:(c categories). |
14157 newList addAll:(c categories). |
14165 ]. |
14158 ]. |
15025 ! ! |
15018 ! ! |
15026 |
15019 |
15027 !BrowserView class methodsFor:'documentation'! |
15020 !BrowserView class methodsFor:'documentation'! |
15028 |
15021 |
15029 version |
15022 version |
15030 ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.722 2002-03-26 19:08:40 cg Exp $' |
15023 ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.723 2002-03-28 13:00:09 stefan Exp $' |
15031 ! ! |
15024 ! ! |
15032 BrowserView initialize! |
15025 BrowserView initialize! |