3048 "Created: / 17.11.2001 / 20:56:20 / cg" |
3048 "Created: / 17.11.2001 / 20:56:20 / cg" |
3049 "Modified: / 17.11.2001 / 21:03:18 / cg" |
3049 "Modified: / 17.11.2001 / 21:03:18 / cg" |
3050 ! |
3050 ! |
3051 |
3051 |
3052 initializeCodeViewIn:panel |
3052 initializeCodeViewIn:panel |
3053 |v| |
3053 |scrollableCodeView| |
3054 |
3054 |
3055 (UserPreferences current useCodeView2In: #Debugger) ifTrue:[ |
3055 (UserPreferences current useCodeView2In: #Debugger) ifTrue:[ |
3056 v := codeView := Tools::CodeView2 in: panel. |
3056 scrollableCodeView := codeView := Tools::CodeView2 new. |
3057 codeView model: ValueHolder new. |
3057 codeView model: ValueHolder new. |
3058 codeView methodHolder: ValueHolder new. |
3058 codeView methodHolder: ValueHolder new. |
3059 codeView classHolder: ValueHolder new. |
3059 codeView classHolder: ValueHolder new. |
3060 ] ifFalse:[ |
3060 ] ifFalse:[ |
3061 v := HVScrollableView |
3061 scrollableCodeView := HVScrollableView |
3062 for:CodeView |
3062 for:CodeView |
3063 miniScrollerH:true |
3063 miniScrollerH:true |
3064 miniScrollerV:false |
3064 miniScrollerV:false |
3065 in:panel. |
3065 in:panel. |
3066 |
3066 |
3067 "/ v autoHideScrollBars:true. |
3067 codeView := scrollableCodeView scrolledView. |
3068 codeView := v scrolledView. |
|
3069 codeView enableMotionEvents. "/ for active help |
3068 codeView enableMotionEvents. "/ for active help |
3070 ]. |
3069 ]. |
3071 |
3070 |
3072 ^ v |
3071 UserPreferences current showAcceptCancelBarInBrowser ifTrue:[ |
|
3072 ViewWithAcceptAndCancelBar notNil ifTrue:[ |
|
3073 |v| |
|
3074 |
|
3075 v := ViewWithAcceptAndCancelBar new. |
|
3076 v slaveView:scrollableCodeView. |
|
3077 v reallyModifiedHolder:(codeView isCodeView2 |
|
3078 ifTrue:[ codeView reallyModifiedChannel ] |
|
3079 ifFalse:[ |
|
3080 BlockValue |
|
3081 with:[:m | |
|
3082 |same| |
|
3083 |
|
3084 same := (codeView contentsAsString string = currentMethod source string). |
|
3085 codeView modifiedChannel setValue:false. "/ so it triggers again |
|
3086 same not. |
|
3087 ] |
|
3088 argument:codeView modifiedChannel |
|
3089 ]). |
|
3090 v cancelAction: |
|
3091 [ |
|
3092 "/ codeView setClipboardText:(codeView contents). "/ for undo |
|
3093 codeView device rememberInCopyBufferHistory:(codeView contents). "/ for undo |
|
3094 codeView contents:(currentMethod source). |
|
3095 codeView modifiedChannel setValue:false; changed. "/ trigger |
|
3096 codeView requestFocus. |
|
3097 ]. |
|
3098 v compareAction: |
|
3099 [ |
|
3100 v := DiffCodeView |
|
3101 openOn:codeView contentsAsString |
|
3102 label:(resources string:'Changed definition (to be accepted ?)') |
|
3103 and:currentMethod source |
|
3104 label:(resources string:'Method''s Original Code'). |
|
3105 v label:(resources string:'Changed Code in Debugger'). |
|
3106 v waitUntilVisible. |
|
3107 "/ codeView requestFocus |
|
3108 ]. |
|
3109 scrollableCodeView := v. |
|
3110 ] |
|
3111 ]. |
|
3112 |
|
3113 panel add:scrollableCodeView. |
|
3114 ^ scrollableCodeView |
3073 |
3115 |
3074 "Modified: / 27-07-2011 / 13:15:44 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
3116 "Modified: / 27-07-2011 / 13:15:44 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
3075 ! |
3117 ! |
3076 |
3118 |
3077 initializeContextListViewIn:panel |
3119 initializeContextListViewIn:panel |
8970 ! ! |
9012 ! ! |
8971 |
9013 |
8972 !DebugView class methodsFor:'documentation'! |
9014 !DebugView class methodsFor:'documentation'! |
8973 |
9015 |
8974 version |
9016 version |
8975 ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.633 2013-09-03 17:58:08 cg Exp $' |
9017 ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.634 2013-09-06 15:57:24 cg Exp $' |
8976 ! |
9018 ! |
8977 |
9019 |
8978 version_CVS |
9020 version_CVS |
8979 ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.633 2013-09-03 17:58:08 cg Exp $' |
9021 ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.634 2013-09-06 15:57:24 cg Exp $' |
8980 ! |
9022 ! |
8981 |
9023 |
8982 version_SVN |
9024 version_SVN |
8983 ^ '$Id: DebugView.st,v 1.633 2013-09-03 17:58:08 cg Exp $' |
9025 ^ '$Id: DebugView.st,v 1.634 2013-09-06 15:57:24 cg Exp $' |
8984 ! ! |
9026 ! ! |
8985 |
9027 |
8986 |
9028 |
8987 DebugView initialize! |
9029 DebugView initialize! |