874 origin:(0.5 @ 0.0) corner:(1.0 @ 1.0) |
874 origin:(0.5 @ 0.0) corner:(1.0 @ 1.0) |
875 in:hpanel |
875 in:hpanel |
876 ! |
876 ! |
877 |
877 |
878 initializeMiddleButtonMenu |
878 initializeMiddleButtonMenu |
879 |labels m| |
879 |labels selectors m| |
880 |
880 |
881 labels := resources array:#( |
881 exclusive ifTrue:[ |
882 'show more' |
882 labels := resources array:#( |
883 '-' |
883 'show more' |
884 'skip' |
884 '-' |
885 '-' |
885 'remove breakpoint' |
|
886 'remove all trace & breakpoints' |
|
887 '-' |
|
888 'copy walkback text' |
|
889 '-' |
|
890 'quickTerminate' |
|
891 '=' |
|
892 'exit smalltalk (no confirmation)' |
|
893 ). |
|
894 selectors := #( |
|
895 showMore |
|
896 nil |
|
897 removeBreakpoint |
|
898 removeAllBreakpoints |
|
899 nil |
|
900 copyWalkbackText |
|
901 nil |
|
902 quickTerminate |
|
903 nil |
|
904 exit |
|
905 ) |
|
906 ] ifFalse:[ |
|
907 labels := resources array:#( |
|
908 'show more' |
|
909 '-' |
|
910 'skip' |
|
911 '-' |
886 " |
912 " |
887 'continue' |
913 'continue' |
888 'terminate' |
914 'terminate' |
889 'abort' |
915 'abort' |
890 '-' |
916 '-' |
891 'step' |
917 'step' |
892 'send' |
918 'send' |
893 '-' |
919 '-' |
894 'return' |
920 'return' |
895 'restart' |
921 'restart' |
896 '-' |
922 '-' |
897 " |
923 " |
898 'remove breakpoint' |
924 'remove breakpoint' |
899 'remove all trace & breakpoints' |
925 'remove all trace & breakpoints' |
900 '-' |
926 '-' |
901 'browse' |
927 'browse' |
902 'browse class' |
928 'browse class' |
903 'browse class hierarchy' |
929 'browse class hierarchy' |
904 'browse full class protocol' |
930 'browse full class protocol' |
905 'implementors' |
931 'implementors' |
906 'senders' |
932 'senders' |
907 '-' |
933 '-' |
908 'inspect context' |
934 'inspect context' |
909 'copy walkback text' |
935 'copy walkback text' |
910 '-' |
936 '-' |
911 'quickTerminate' |
937 'quickTerminate' |
912 '=' |
938 '=' |
913 'exit smalltalk (no confirmation)' |
939 'exit smalltalk (no confirmation)' |
914 ). |
940 ). |
915 |
941 |
916 m := (PopUpMenu |
942 selectors := #( |
917 labels:labels |
943 showMore |
918 selectors:#( |
944 nil |
919 showMore |
945 skip |
920 nil |
946 nil |
921 skip |
|
922 nil |
|
923 " |
947 " |
924 doContinue |
948 doContinue |
925 doTerminate |
949 doTerminate |
926 doAbort |
950 doAbort |
927 nil |
951 nil |
928 doStep |
952 doStep |
929 doSend |
953 doSend |
930 nil |
954 nil |
931 doReturn |
955 doReturn |
932 doRestart |
956 doRestart |
933 nil |
957 nil |
934 " |
958 " |
935 removeBreakpoint |
959 removeBreakpoint |
936 removeAllBreakpoints |
960 removeAllBreakpoints |
937 nil |
961 nil |
938 browse |
962 browse |
939 browseClass |
963 browseClass |
940 browseClassHierarchy |
964 browseClassHierarchy |
941 browseFullClassProtocol |
965 browseFullClassProtocol |
942 implementors |
966 implementors |
943 senders |
967 senders |
944 nil |
968 nil |
945 inspectContext |
969 inspectContext |
946 copyWalkbackText |
970 copyWalkbackText |
947 nil |
971 nil |
948 quickTerminate |
972 quickTerminate |
949 nil |
973 nil |
950 exit |
974 exit |
951 ) |
975 ). |
952 receiver:self |
976 ]. |
953 for:contextView). |
977 |
|
978 m := PopUpMenu |
|
979 labels:labels |
|
980 selectors:selectors |
|
981 receiver:self |
|
982 for:contextView. |
954 |
983 |
955 contextView middleButtonMenu:m. |
984 contextView middleButtonMenu:m. |
956 |
985 |
957 inspecting ifTrue:[ |
986 inspecting ifTrue:[ |
958 m notNil ifTrue:[ |
987 m notNil ifTrue:[ |
959 m disableAll:#(doTraceStep removeBreakpoint browse browseClass |
988 m disableAll:#(doTraceStep removeBreakpoint browse browseClass |
960 browseClassHierarchy browseFullClassProtocol |
989 browseClassHierarchy browseFullClassProtocol |
961 implementors senders inspectContext skip). |
990 implementors senders inspectContext skip). |
962 ]. |
991 ]. |
963 ] |
992 ] |
964 |
993 |
965 "Modified: 22.11.1995 / 21:40:33 / cg" |
994 "Modified: 27.2.1996 / 14:41:53 / cg" |
966 ! |
995 ! |
967 |
996 |
968 realize |
997 realize |
969 super realize. |
998 super realize. |
970 "/ exclusive ifTrue:[ |
999 "/ exclusive ifTrue:[ |
2164 destroy |
2193 destroy |
2165 "closing the debugger implies an abort or continue" |
2194 "closing the debugger implies an abort or continue" |
2166 |
2195 |
2167 contextView middleButtonMenu hide. |
2196 contextView middleButtonMenu hide. |
2168 |
2197 |
|
2198 inspecting ifFalse:[ |
|
2199 CachedExclusive == self ifTrue:[ |
|
2200 CachedExclusive := nil. |
|
2201 ]. |
|
2202 CachedDebugger == self ifTrue:[ |
|
2203 CachedDebugger := nil |
|
2204 ]. |
|
2205 |
|
2206 inspecting ifFalse:[ |
|
2207 canAbort ifTrue:[ |
|
2208 self doAbort. |
|
2209 ] ifFalse:[ |
|
2210 self doContinue |
|
2211 ] |
|
2212 ]. |
|
2213 self halt:'should not be reached'. |
|
2214 ]. |
|
2215 |
2169 " |
2216 " |
2170 we manually release all private data, since the Debugger |
2217 we manually release all private data, since the Debugger |
2171 is cached for reuse - thus the memory would not be collectable |
2218 is cached for reuse - thus the memory would not be collectable |
2172 otherwise. |
2219 otherwise. |
2173 " |
2220 " |
2183 contextArray := nil. |
2230 contextArray := nil. |
2184 selectedContext := actualContext := nil. |
2231 selectedContext := actualContext := nil. |
2185 grabber := nil. |
2232 grabber := nil. |
2186 self autoUpdateOff. |
2233 self autoUpdateOff. |
2187 |
2234 |
2188 inspecting ifFalse:[ |
|
2189 exclusive ifTrue:[ |
|
2190 CachedExclusive == self ifTrue:[ |
|
2191 CachedExclusive := nil. |
|
2192 ] |
|
2193 ] ifFalse:[ |
|
2194 CachedDebugger == self ifTrue:[ |
|
2195 CachedDebugger := nil |
|
2196 ] |
|
2197 ]. |
|
2198 |
|
2199 inspecting ifFalse:[ |
|
2200 canAbort ifTrue:[ |
|
2201 self doAbort. |
|
2202 ] ifFalse:[ |
|
2203 self doContinue |
|
2204 ] |
|
2205 ]. |
|
2206 ]. |
|
2207 super destroy "/ 1.12.94 |
2235 super destroy "/ 1.12.94 |
|
2236 |
|
2237 "Modified: 27.2.1996 / 14:29:14 / cg" |
2208 ! |
2238 ! |
2209 |
2239 |
2210 showSelection:lineNr |
2240 showSelection:lineNr |
2211 "user clicked on a header line - show selected code in textView. |
2241 "user clicked on a header line - show selected code in textView. |
2212 Also sent to autoselect an interesting context on entry." |
2242 Also sent to autoselect an interesting context on entry." |