593 " |
593 " |
594 |
594 |
595 <resource: #image> |
595 <resource: #image> |
596 |
596 |
597 ^Icon |
597 ^Icon |
598 constantNamed:#'ProcessMonitorV2 class raiseWindow22x22Icon' |
598 constantNamed:#'ProcessMonitorV2 class raiseWindow22x22Icon' |
599 ifAbsentPut:[(Depth8Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
599 ifAbsentPut:[(Depth8Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
600 @@@.K"8.K"8.K"8.K"8.K"8.K"8.K @@@@@@@ HB@ HB@ HB@ HB@ HB@B8@@@@@@@H+J2,+J2,+J2,+J2,+@ @.@@@@@@@BJ2,+J2,+J2,+J2,+J2 @K @@ |
600 @@@.K"8.K"8.K"8.K"8.K"8.K"8.K @@@@@@@ HB@ HB@ HB@ HB@ HB@B8@@@@@@@H+J2,+J2,+J2,+J2,+@ @.@@@@@@@BJ2,+J2,+J2,+J2,+J2 @K @@ |
601 @ HB@ HB@ HB@ HB@ HBJ2,"@B8@@@H+J2,+J2,+J2,+J2,+@",EF @.@@@BJ2,+J2,+J2,+J2,+J2 EHQ(@K @@@",+J2,+J2,+J2,+J2,"AR$(@B8@@@H+ |
601 @ HB@ HB@ HB@ HB@ HBJ2,"@B8@@@H+J2,+J2,+J2,+J2,+@",EF @.@@@BJ2,+J2,+J2,+J2,+J2 EHQ(@K @@@",+J2,+J2,+J2,+J2,"AR$(@B8@@@H+ |
602 J2,+J2,+J2,+J2,!!JBD''J@@.@@@BJ2,+J2,+J2,+J2,+HR !!I2 @K @@@",+J2,+J2,+J2,+J2\(HRL @B8@@@H+J2,+J2,+J2,+J2,''JBT#H@@.@@@BJ2,+ |
602 J2,+J2,+J2,+J2,!!JBD''J@@.@@@BJ2,+J2,+J2,+J2,+HR !!I2 @K @@@",+J2,+J2,+J2,+J2\(HRL @B8@@@H+J2,+J2,+J2,+J2,''JBT#H@@.@@@BJ2,+ |
603 J2,+J2,+J2,EI2 ''A"@@K @@@",+J2,+J2,+J2,EARL I0X @B8@@@H+J2,+J2,+J2,EAR$#HB\FH@@.@@@BJ2,+J2,+J2,EAR$)A"@F@2@@K @@@",+J2,+ |
603 J2,+J2,+J2,EI2 ''A"@@K @@@",+J2,+J2,+J2,EARL I0X @B8@@@H+J2,+J2,+J2,EAR$#HB\FH@@.@@@BJ2,+J2,+J2,EAR$)A"@F@2@@K @@@",+J2,+ |
604 J2,EAR$)HPX HB@Y@B8@@@H+J2,+J2,EAPT)HRDFH@@@@@@.@@@BJ2,EJR$)HRD!!CB\''@2@@@@@@K @@DRPGA2<^D@,KJ!!<-JB@Y@@@@@B8@@@@@@@@@@@@@ |
604 J2,EAR$)HPX HB@Y@B8@@@H+J2,+J2,EAPT)HRDFH@@@@@@.@@@BJ2,EJR$)HRD!!CB\''@2@@@@@@K @@DRPGA2<^D@,KJ!!<-JB@Y@@@@@B8@@@@@@@@@@@@@ |
688 ProcessMonitorV2 open |
688 ProcessMonitorV2 open |
689 " |
689 " |
690 |
690 |
691 <resource: #canvas> |
691 <resource: #canvas> |
692 |
692 |
693 ^ |
693 ^ |
694 #(FullSpec |
694 #(FullSpec |
695 name: windowSpec |
695 name: windowSpec |
696 window: |
696 window: |
697 (WindowSpec |
697 (WindowSpec |
698 label: 'ProcessMonitorV2' |
698 label: 'ProcessMonitorV2' |
699 name: 'ProcessMonitorV2' |
699 name: 'ProcessMonitorV2' |
700 min: (Point 10 10) |
700 min: (Point 10 10) |
701 bounds: (Rectangle 0 0 791 358) |
701 bounds: (Rectangle 0 0 791 358) |
702 menu: mainMenu |
702 menu: mainMenu |
703 ) |
703 ) |
704 component: |
704 component: |
705 (SpecCollection |
705 (SpecCollection |
706 collection: ( |
706 collection: ( |
707 (MenuPanelSpec |
707 (MenuPanelSpec |
708 name: 'ToolBar1' |
708 name: 'ToolBar1' |
709 layout: (LayoutFrame 0 0.0 0 0 0 1.0 32 0) |
709 layout: (LayoutFrame 0 0.0 0 0 0 1.0 32 0) |
710 menu: toolBarMainMenu |
710 menu: toolBarMainMenu |
711 textDefault: true |
711 textDefault: true |
712 ) |
712 ) |
713 (DataSetSpec |
713 (DataSetSpec |
714 name: 'ProcessTable' |
714 name: 'ProcessTable' |
715 layout: (LayoutFrame 0 0.0 32 0.0 0 1.0 -23 1) |
715 layout: (LayoutFrame 0 0.0 32 0.0 0 1.0 -23 1) |
716 model: selectedProcesses |
716 model: selectedProcesses |
717 menu: tableMenu |
717 menu: tableMenu |
718 hasHorizontalScrollBar: true |
718 hasHorizontalScrollBar: true |
719 hasVerticalScrollBar: true |
719 hasVerticalScrollBar: true |
720 dataList: processList |
720 dataList: processList |
721 useIndex: false |
721 useIndex: false |
722 doubleClickSelector: doubleClickedAt: |
722 doubleClickSelector: doubleClickedAt: |
723 columnHolder: tableColumns |
723 columnHolder: tableColumns |
724 multipleSelectOk: true |
724 multipleSelectOk: true |
725 verticalSpacing: 0 |
725 verticalSpacing: 0 |
726 postBuildCallback: postBuildProcessTable: |
726 postBuildCallback: postBuildProcessTable: |
727 ) |
727 ) |
728 (LabelSpec |
728 (LabelSpec |
729 label: 'Update Contents Delay (s):' |
729 label: 'Update Contents Delay (s):' |
730 name: 'ContentsUpdateLabel' |
730 name: 'ContentsUpdateLabel' |
731 layout: (LayoutFrame -593 1 -20 1 -402 1 0 1) |
731 layout: (LayoutFrame -593 1 -20 1 -402 1 0 1) |
732 translateLabel: true |
732 translateLabel: true |
733 adjust: right |
733 adjust: right |
734 ) |
734 ) |
735 (ViewSpec |
735 (ViewSpec |
736 name: 'Box1' |
736 name: 'Box1' |
737 layout: (LayoutFrame -396 1 -22 1 -306 1 0 1) |
737 layout: (LayoutFrame -396 1 -22 1 -306 1 0 1) |
738 level: 0 |
738 level: 0 |
739 component: |
739 component: |
740 (SpecCollection |
740 (SpecCollection |
741 collection: ( |
741 collection: ( |
742 (ArrowButtonSpec |
742 (ArrowButtonSpec |
743 name: 'ArrowButton3' |
743 name: 'ArrowButton3' |
744 layout: (LayoutFrame 68 0 0 0 89 0 20 0) |
744 layout: (LayoutFrame 68 0 0 0 89 0 20 0) |
745 model: increaseupdateContentsDelayTime |
745 model: increaseupdateContentsDelayTime |
746 enableChannel: enableIncreaseContentsDelayTime |
746 enableChannel: enableIncreaseContentsDelayTime |
747 isTriggerOnDown: true |
747 isTriggerOnDown: true |
748 autoRepeat: true |
748 autoRepeat: true |
749 actionValue: '' |
749 actionValue: '' |
750 direction: up |
750 direction: up |
751 ) |
751 ) |
752 (InputFieldSpec |
752 (InputFieldSpec |
753 name: 'EntryField2' |
753 name: 'EntryField2' |
754 layout: (LayoutFrame 22 0 0 0 66 0 20 0) |
754 layout: (LayoutFrame 22 0 0 0 66 0 20 0) |
755 model: updateContentsDelayTime |
755 model: updateContentsDelayTime |
756 acceptOnReturn: true |
756 acceptOnReturn: true |
757 acceptOnTab: true |
757 acceptOnTab: true |
758 acceptOnLostFocus: true |
758 acceptOnLostFocus: true |
759 acceptOnPointerLeave: false |
759 acceptOnPointerLeave: false |
760 ) |
760 ) |
761 (ArrowButtonSpec |
761 (ArrowButtonSpec |
762 name: 'ArrowButton4' |
762 name: 'ArrowButton4' |
763 layout: (LayoutFrame 0 0 0 0 20 0 20 0) |
763 layout: (LayoutFrame 0 0 0 0 20 0 20 0) |
764 model: decreaseupdateContentsDelayTime |
764 model: decreaseupdateContentsDelayTime |
765 enableChannel: enableDecreaseContentsDelayTime |
765 enableChannel: enableDecreaseContentsDelayTime |
766 isTriggerOnDown: true |
766 isTriggerOnDown: true |
767 autoRepeat: true |
767 autoRepeat: true |
768 actionValue: '' |
768 actionValue: '' |
769 direction: down |
769 direction: down |
770 ) |
770 ) |
771 ) |
771 ) |
772 |
772 |
773 ) |
773 ) |
774 ) |
774 ) |
775 (LabelSpec |
775 (LabelSpec |
776 label: 'Update List Delay (s):' |
776 label: 'Update List Delay (s):' |
777 name: 'ListUpdateLabel' |
777 name: 'ListUpdateLabel' |
778 layout: (LayoutFrame -301 1 -20 1 -93 1 0 1) |
778 layout: (LayoutFrame -301 1 -20 1 -93 1 0 1) |
779 translateLabel: true |
779 translateLabel: true |
780 adjust: right |
780 adjust: right |
781 ) |
781 ) |
782 (ViewSpec |
782 (ViewSpec |
783 name: 'Box2' |
783 name: 'Box2' |
784 layout: (LayoutFrame -89 1 -21 1 1 1 1 1) |
784 layout: (LayoutFrame -89 1 -21 1 1 1 1 1) |
785 level: 0 |
785 level: 0 |
786 component: |
786 component: |
787 (SpecCollection |
787 (SpecCollection |
788 collection: ( |
788 collection: ( |
789 (ArrowButtonSpec |
789 (ArrowButtonSpec |
790 name: 'ArrowButton5' |
790 name: 'ArrowButton5' |
791 layout: (LayoutFrame 68 0 0 0 89 0 20 0) |
791 layout: (LayoutFrame 68 0 0 0 89 0 20 0) |
792 model: increaseupdateListDelayTime |
792 model: increaseupdateListDelayTime |
793 enableChannel: enableIncreaseListDelayTime |
793 enableChannel: enableIncreaseListDelayTime |
794 isTriggerOnDown: true |
794 isTriggerOnDown: true |
795 autoRepeat: true |
795 autoRepeat: true |
796 actionValue: '' |
796 actionValue: '' |
797 direction: up |
797 direction: up |
798 ) |
798 ) |
799 (InputFieldSpec |
799 (InputFieldSpec |
800 name: 'EntryField3' |
800 name: 'EntryField3' |
801 layout: (LayoutFrame 22 0 0 0 66 0 20 0) |
801 layout: (LayoutFrame 22 0 0 0 66 0 20 0) |
802 model: updateListDelayTime |
802 model: updateListDelayTime |
803 acceptOnReturn: true |
803 acceptOnReturn: true |
804 acceptOnTab: true |
804 acceptOnTab: true |
805 acceptOnLostFocus: true |
805 acceptOnLostFocus: true |
806 acceptOnPointerLeave: false |
806 acceptOnPointerLeave: false |
807 ) |
807 ) |
808 (ArrowButtonSpec |
808 (ArrowButtonSpec |
809 name: 'ArrowButton6' |
809 name: 'ArrowButton6' |
810 layout: (LayoutFrame 0 0 0 0 20 0 20 0) |
810 layout: (LayoutFrame 0 0 0 0 20 0 20 0) |
811 model: decreaseupdateListDelayTime |
811 model: decreaseupdateListDelayTime |
812 enableChannel: enableDecreaseListDelayTime |
812 enableChannel: enableDecreaseListDelayTime |
813 isTriggerOnDown: true |
813 isTriggerOnDown: true |
814 autoRepeat: true |
814 autoRepeat: true |
815 actionValue: '' |
815 actionValue: '' |
816 direction: down |
816 direction: down |
817 ) |
817 ) |
818 ) |
818 ) |
819 |
819 |
820 ) |
820 ) |
821 ) |
821 ) |
822 ) |
822 ) |
823 |
823 |
824 ) |
824 ) |
825 ) |
825 ) |
826 ! ! |
826 ! ! |
827 |
827 |
828 !ProcessMonitorV2 class methodsFor:'menu specs'! |
828 !ProcessMonitorV2 class methodsFor:'menu specs'! |
829 |
829 |
1027 (Menu new fromLiteralArrayEncoding:(ProcessMonitorV2 processMenu)) startUp |
1027 (Menu new fromLiteralArrayEncoding:(ProcessMonitorV2 processMenu)) startUp |
1028 " |
1028 " |
1029 |
1029 |
1030 <resource: #menu> |
1030 <resource: #menu> |
1031 |
1031 |
1032 ^ |
1032 ^ |
1033 #(Menu |
1033 #(Menu |
1034 ( |
1034 ( |
1035 (MenuItem |
1035 (MenuItem |
1036 enabled: hasSelectionWithStoppedProcessHolder |
1036 enabled: hasSelectionWithStoppedProcessHolder |
1037 label: 'Resume' |
1037 label: 'Resume' |
1038 itemValue: resumeProcess |
1038 itemValue: resumeProcess |
1039 translateLabel: true |
1039 translateLabel: true |
1040 ) |
1040 ) |
1041 (MenuItem |
1041 (MenuItem |
1042 enabled: hasSelectionHolder |
1042 enabled: hasSelectionHolder |
1043 label: 'Suspend' |
1043 label: 'Suspend' |
1044 itemValue: suspendProcess |
1044 itemValue: suspendProcess |
1045 translateLabel: true |
1045 translateLabel: true |
1046 ) |
1046 ) |
1047 (MenuItem |
1047 (MenuItem |
1048 enabled: hasSelectionHolder |
1048 enabled: hasSelectionHolder |
1049 label: 'Stop' |
1049 label: 'Stop' |
1050 itemValue: stopProcess |
1050 itemValue: stopProcess |
1051 translateLabel: true |
1051 translateLabel: true |
1052 ) |
1052 ) |
1053 (MenuItem |
1053 (MenuItem |
1054 label: '-' |
1054 label: '-' |
1055 ) |
1055 ) |
1056 (MenuItem |
1056 (MenuItem |
1057 enabled: hasSelectionHolder |
1057 enabled: hasSelectionHolder |
1058 label: 'Abort' |
1058 label: 'Abort' |
1059 itemValue: abortProcess |
1059 itemValue: abortProcess |
1060 translateLabel: true |
1060 translateLabel: true |
1061 ) |
1061 ) |
1062 (MenuItem |
1062 (MenuItem |
1063 enabled: hasSelectionHolder |
1063 enabled: hasSelectionHolder |
1064 label: 'Terminate' |
1064 label: 'Terminate' |
1065 itemValue: terminateProcess |
1065 itemValue: terminateProcess |
1066 translateLabel: true |
1066 translateLabel: true |
1067 ) |
1067 ) |
1068 (MenuItem |
1068 (MenuItem |
1069 enabled: hasSelectionHolder |
1069 enabled: hasSelectionHolder |
1070 label: 'Hard Terminate' |
1070 label: 'Hard Terminate' |
1071 itemValue: hardTerminateProcess |
1071 itemValue: hardTerminateProcess |
1072 translateLabel: true |
1072 translateLabel: true |
1073 ) |
1073 ) |
1074 (MenuItem |
1074 (MenuItem |
1075 enabled: hasSelectionHolder |
1075 enabled: hasSelectionHolder |
1076 label: 'Terminate Group' |
1076 label: 'Terminate Group' |
1077 itemValue: terminateProcessGroup |
1077 itemValue: terminateProcessGroup |
1078 translateLabel: true |
1078 translateLabel: true |
1079 ) |
1079 ) |
1080 (MenuItem |
1080 (MenuItem |
1081 enabled: selectionRestartable |
1081 enabled: selectionRestartable |
1082 label: 'Restart' |
1082 label: 'Restart' |
1083 itemValue: restartProcess |
1083 itemValue: restartProcess |
1084 translateLabel: true |
1084 translateLabel: true |
1085 ) |
1085 ) |
1086 (MenuItem |
1086 (MenuItem |
1087 label: '-' |
1087 label: '-' |
1088 ) |
1088 ) |
1089 (MenuItem |
1089 (MenuItem |
1090 enabled: hasSelectionHolder |
1090 enabled: hasSelectionHolder |
1091 label: 'Raise Prio' |
1091 label: 'Raise Prio' |
1092 itemValue: raisePrio |
1092 itemValue: raisePrio |
1093 translateLabel: true |
1093 translateLabel: true |
1094 ) |
1094 ) |
1095 (MenuItem |
1095 (MenuItem |
1096 enabled: hasSelectionHolder |
1096 enabled: hasSelectionHolder |
1097 label: 'Lower Prio' |
1097 label: 'Lower Prio' |
1098 itemValue: lowerPrio |
1098 itemValue: lowerPrio |
1099 translateLabel: true |
1099 translateLabel: true |
1100 ) |
1100 ) |
1101 ) |
1101 ) |
1102 nil |
1102 nil |
1103 nil |
1103 nil |
1104 ) |
1104 ) |
1105 ! |
1105 ! |
1106 |
1106 |
1107 tableMenu |
1107 tableMenu |
1108 "This resource specification was automatically generated |
1108 "This resource specification was automatically generated |
1116 (Menu new fromLiteralArrayEncoding:(ProcessMonitorV2 tableMenu)) startUp |
1116 (Menu new fromLiteralArrayEncoding:(ProcessMonitorV2 tableMenu)) startUp |
1117 " |
1117 " |
1118 |
1118 |
1119 <resource: #menu> |
1119 <resource: #menu> |
1120 |
1120 |
1121 ^ |
1121 ^ |
1122 #(#Menu |
1122 #(#Menu |
1123 #( |
1123 #( |
1124 #(#MenuItem |
1124 #(#MenuItem |
1125 #enabled: #hasSelectionHolder |
1125 #enabled: #hasSelectionHolder |
1126 #label: 'Debug' |
1126 #label: 'Debug' |
1127 #itemValue: #debugProcess |
1127 #itemValue: #debugProcess |
1128 #translateLabel: true |
1128 #translateLabel: true |
1129 ) |
1129 ) |
1130 #(#MenuItem |
1130 #(#MenuItem |
1131 #enabled: #hasSelectionHolder |
1131 #enabled: #hasSelectionHolder |
1132 #label: 'Inspect' |
1132 #label: 'Inspect' |
1133 #itemValue: #inspectSelection |
1133 #itemValue: #inspectSelection |
1134 #translateLabel: true |
1134 #translateLabel: true |
1135 ) |
1135 ) |
1136 #(#MenuItem |
1136 #(#MenuItem |
1137 #enabled: #hasSelectionWithApplicationProcessHolder |
1137 #enabled: #hasSelectionWithApplicationProcessHolder |
1138 #label: 'Inspect Application' |
1138 #label: 'Inspect Application' |
1139 #itemValue: #inspectApplication |
1139 #itemValue: #inspectApplication |
1140 #translateLabel: true |
1140 #translateLabel: true |
1141 ) |
1141 ) |
1142 #(#MenuItem |
1142 #(#MenuItem |
1143 #enabled: #hasSelectionWithApplicationProcessHolder |
1143 #enabled: #hasSelectionWithApplicationProcessHolder |
1144 #label: 'Browse Application' |
1144 #label: 'Browse Application' |
1145 #itemValue: #browseApplication |
1145 #itemValue: #browseApplication |
1146 #translateLabel: true |
1146 #translateLabel: true |
1147 ) |
1147 ) |
1148 #(#MenuItem |
1148 #(#MenuItem |
1149 #label: '-' |
1149 #label: '-' |
1150 ) |
1150 ) |
1151 #(#MenuItem |
1151 #(#MenuItem |
1152 #enabled: #hasSelectionWithStoppedProcessHolder |
1152 #enabled: #hasSelectionWithStoppedProcessHolder |
1153 #label: 'Resume' |
1153 #label: 'Resume' |
1154 #itemValue: #resumeProcess |
1154 #itemValue: #resumeProcess |
1155 #translateLabel: true |
1155 #translateLabel: true |
1156 ) |
1156 ) |
1157 #(#MenuItem |
1157 #(#MenuItem |
1158 #enabled: #hasSelectionHolder |
1158 #enabled: #hasSelectionHolder |
1159 #label: 'Suspend' |
1159 #label: 'Suspend' |
1160 #itemValue: #suspendProcess |
1160 #itemValue: #suspendProcess |
1161 #translateLabel: true |
1161 #translateLabel: true |
1162 ) |
1162 ) |
1163 #(#MenuItem |
1163 #(#MenuItem |
1164 #enabled: #hasSelectionHolder |
1164 #enabled: #hasSelectionHolder |
1165 #label: 'Stop' |
1165 #label: 'Stop' |
1166 #itemValue: #stopProcess |
1166 #itemValue: #stopProcess |
1167 #translateLabel: true |
1167 #translateLabel: true |
1168 ) |
1168 ) |
1169 #(#MenuItem |
1169 #(#MenuItem |
1170 #label: '-' |
1170 #label: '-' |
1171 ) |
1171 ) |
1172 #(#MenuItem |
1172 #(#MenuItem |
1173 #enabled: #hasSelectionHolder |
1173 #enabled: #hasSelectionHolder |
1174 #label: 'Abort' |
1174 #label: 'Abort' |
1175 #itemValue: #abortProcess |
1175 #itemValue: #abortProcess |
1176 #translateLabel: true |
1176 #translateLabel: true |
1177 ) |
1177 ) |
1178 #(#MenuItem |
1178 #(#MenuItem |
1179 #enabled: #hasSelectionHolder |
1179 #enabled: #hasSelectionHolder |
1180 #label: 'Terminate' |
1180 #label: 'Terminate' |
1181 #itemValue: #terminateProcess |
1181 #itemValue: #terminateProcess |
1182 #translateLabel: true |
1182 #translateLabel: true |
1183 ) |
1183 ) |
1184 #(#MenuItem |
1184 #(#MenuItem |
1185 #enabled: #hasSelectionHolder |
1185 #enabled: #hasSelectionHolder |
1186 #label: 'Hard Terminate' |
1186 #label: 'Hard Terminate' |
1187 #itemValue: #hardTerminateProcess |
1187 #itemValue: #hardTerminateProcess |
1188 #translateLabel: true |
1188 #translateLabel: true |
1189 ) |
1189 ) |
1190 #(#MenuItem |
1190 #(#MenuItem |
1191 #enabled: #hasSelectionHolder |
1191 #enabled: #hasSelectionHolder |
1192 #label: 'Terminate Group' |
1192 #label: 'Terminate Group' |
1193 #itemValue: #terminateProcessGroup |
1193 #itemValue: #terminateProcessGroup |
1194 #translateLabel: true |
1194 #translateLabel: true |
1195 ) |
1195 ) |
1196 #(#MenuItem |
1196 #(#MenuItem |
1197 #enabled: #selectionRestartable |
1197 #enabled: #selectionRestartable |
1198 #label: 'Restart' |
1198 #label: 'Restart' |
1199 #itemValue: #restartProcess |
1199 #itemValue: #restartProcess |
1200 #translateLabel: true |
1200 #translateLabel: true |
1201 ) |
1201 ) |
1202 #(#MenuItem |
1202 #(#MenuItem |
1203 #label: '-' |
1203 #label: '-' |
1204 ) |
1204 ) |
1205 #(#MenuItem |
1205 #(#MenuItem |
1206 #enabled: #hasSelectionHolder |
1206 #enabled: #hasSelectionHolder |
1207 #label: 'Raise Prio' |
1207 #label: 'Raise Prio' |
1208 #itemValue: #raisePrio |
1208 #itemValue: #raisePrio |
1209 #translateLabel: true |
1209 #translateLabel: true |
1210 ) |
1210 ) |
1211 #(#MenuItem |
1211 #(#MenuItem |
1212 #enabled: #hasSelectionHolder |
1212 #enabled: #hasSelectionHolder |
1213 #label: 'Lower Prio' |
1213 #label: 'Lower Prio' |
1214 #itemValue: #lowerPrio |
1214 #itemValue: #lowerPrio |
1215 #translateLabel: true |
1215 #translateLabel: true |
1216 ) |
1216 ) |
1217 ) |
1217 ) |
1218 nil |
1218 nil |
1219 nil |
1219 nil |
1220 ) |
1220 ) |
1221 |
1221 |
1222 "Modified: / 07-06-2007 / 12:49:47 / cg" |
1222 "Modified: / 07-06-2007 / 12:49:47 / cg" |
1223 ! |
1223 ! |
1224 |
1224 |
1234 (Menu new fromLiteralArrayEncoding:(ProcessMonitorV2 toolBarMainMenu)) startUp |
1234 (Menu new fromLiteralArrayEncoding:(ProcessMonitorV2 toolBarMainMenu)) startUp |
1235 " |
1235 " |
1236 |
1236 |
1237 <resource: #menu> |
1237 <resource: #menu> |
1238 |
1238 |
1239 ^ |
1239 ^ |
1240 #(Menu |
1240 #(Menu |
1241 ( |
1241 ( |
1242 (MenuItem |
1242 (MenuItem |
1243 activeHelpKey: Inspect |
1243 activeHelpKey: Inspect |
1244 enabled: hasSelectionHolder |
1244 enabled: hasSelectionHolder |
1245 label: 'Inspect' |
1245 label: 'Inspect' |
1246 itemValue: inspectSelection |
1246 itemValue: inspectSelection |
1247 translateLabel: true |
1247 translateLabel: true |
1248 isButton: true |
1248 isButton: true |
1249 isVisible: allowModifications |
1249 isVisible: allowModifications |
1250 labelImage: (ResourceRetriever ProcessMonitorV2 processInspect22x22Icon) |
1250 labelImage: (ResourceRetriever ProcessMonitorV2 processInspect22x22Icon) |
1251 ) |
1251 ) |
1252 (MenuItem |
1252 (MenuItem |
1253 activeHelpKey: Debug |
1253 activeHelpKey: Debug |
1254 enabled: hasSelectionHolder |
1254 enabled: hasSelectionHolder |
1255 label: 'Debug' |
1255 label: 'Debug' |
1256 itemValue: debugProcess |
1256 itemValue: debugProcess |
1257 translateLabel: true |
1257 translateLabel: true |
1258 isButton: true |
1258 isButton: true |
1259 isVisible: allowModifications |
1259 isVisible: allowModifications |
1260 labelImage: (ResourceRetriever ProcessMonitorV2 processDebug22x22Icon) |
1260 labelImage: (ResourceRetriever ProcessMonitorV2 processDebug22x22Icon) |
1261 ) |
1261 ) |
1262 (MenuItem |
1262 (MenuItem |
1263 activeHelpKey: RaiseWindow |
1263 activeHelpKey: RaiseWindow |
1264 enabled: hasSelectionWithApplicationProcessHolder |
1264 enabled: hasSelectionWithApplicationProcessHolder |
1265 label: 'Raise Applications Window' |
1265 label: 'Raise Applications Window' |
1266 itemValue: raiseApplicationWindow |
1266 itemValue: raiseApplicationWindow |
1267 translateLabel: true |
1267 translateLabel: true |
1268 isButton: true |
1268 isButton: true |
1269 labelImage: (ResourceRetriever ProcessMonitorV2 raiseWindow22x22Icon) |
1269 labelImage: (ResourceRetriever ProcessMonitorV2 raiseWindow22x22Icon) |
1270 ) |
1270 ) |
1271 (MenuItem |
1271 (MenuItem |
1272 label: '-' |
1272 label: '-' |
1273 isVisible: allowModifications |
1273 isVisible: allowModifications |
1274 ) |
1274 ) |
1275 (MenuItem |
1275 (MenuItem |
1276 activeHelpKey: Resume |
1276 activeHelpKey: Resume |
1277 enabled: hasSelectionWithStoppedProcessHolder |
1277 enabled: hasSelectionWithStoppedProcessHolder |
1278 label: 'Resume' |
1278 label: 'Resume' |
1279 itemValue: resumeProcess |
1279 itemValue: resumeProcess |
1280 translateLabel: true |
1280 translateLabel: true |
1281 isButton: true |
1281 isButton: true |
1282 isVisible: allowModifications |
1282 isVisible: allowModifications |
1283 labelImage: (ResourceRetriever ProcessMonitorV2 processResume22x22Icon) |
1283 labelImage: (ResourceRetriever ProcessMonitorV2 processResume22x22Icon) |
1284 ) |
1284 ) |
1285 (MenuItem |
1285 (MenuItem |
1286 activeHelpKey: Stop |
1286 activeHelpKey: Stop |
1287 enabled: hasSelectionHolder |
1287 enabled: hasSelectionHolder |
1288 label: 'Stop' |
1288 label: 'Stop' |
1289 itemValue: stopProcess |
1289 itemValue: stopProcess |
1290 translateLabel: true |
1290 translateLabel: true |
1291 isButton: true |
1291 isButton: true |
1292 isVisible: allowModifications |
1292 isVisible: allowModifications |
1293 labelImage: (ResourceRetriever ProcessMonitorV2 processStop22x22Icon) |
1293 labelImage: (ResourceRetriever ProcessMonitorV2 processStop22x22Icon) |
1294 ) |
1294 ) |
1295 (MenuItem |
1295 (MenuItem |
1296 label: '-' |
1296 label: '-' |
1297 isVisible: allowModifications |
1297 isVisible: allowModifications |
1298 ) |
1298 ) |
1299 (MenuItem |
1299 (MenuItem |
1300 activeHelpKey: Abort |
1300 activeHelpKey: Abort |
1301 enabled: hasSelectionHolder |
1301 enabled: hasSelectionHolder |
1302 label: 'Abort' |
1302 label: 'Abort' |
1303 itemValue: abortProcess |
1303 itemValue: abortProcess |
1304 translateLabel: true |
1304 translateLabel: true |
1305 isButton: true |
1305 isButton: true |
1306 isVisible: allowModifications |
1306 isVisible: allowModifications |
1307 labelImage: (ResourceRetriever ProcessMonitorV2 processAbort22x22Icon) |
1307 labelImage: (ResourceRetriever ProcessMonitorV2 processAbort22x22Icon) |
1308 ) |
1308 ) |
1309 (MenuItem |
1309 (MenuItem |
1310 activeHelpKey: Terminate |
1310 activeHelpKey: Terminate |
1311 enabled: hasSelectionHolder |
1311 enabled: hasSelectionHolder |
1312 label: 'Terminate' |
1312 label: 'Terminate' |
1313 itemValue: terminateProcess |
1313 itemValue: terminateProcess |
1314 translateLabel: true |
1314 translateLabel: true |
1315 isButton: true |
1315 isButton: true |
1316 isVisible: allowModifications |
1316 isVisible: allowModifications |
1317 labelImage: (ResourceRetriever ProcessMonitorV2 processTerminate22x22Icon) |
1317 labelImage: (ResourceRetriever ProcessMonitorV2 processTerminate22x22Icon) |
1318 ) |
1318 ) |
1319 (MenuItem |
1319 (MenuItem |
1320 activeHelpKey: #'Terminate Group' |
1320 activeHelpKey: #'Terminate Group' |
1321 enabled: hasSelectionHolder |
1321 enabled: hasSelectionHolder |
1322 label: 'Terminate Group' |
1322 label: 'Terminate Group' |
1323 itemValue: terminateProcessGroup |
1323 itemValue: terminateProcessGroup |
1324 translateLabel: true |
1324 translateLabel: true |
1325 isButton: true |
1325 isButton: true |
1326 isVisible: allowModifications |
1326 isVisible: allowModifications |
1327 labelImage: (ResourceRetriever ProcessMonitorV2 processTerminateGroup22x22Icon) |
1327 labelImage: (ResourceRetriever ProcessMonitorV2 processTerminateGroup22x22Icon) |
1328 ) |
1328 ) |
1329 (MenuItem |
1329 (MenuItem |
1330 activeHelpKey: Restart |
1330 activeHelpKey: Restart |
1331 enabled: selectionRestartable |
1331 enabled: selectionRestartable |
1332 label: 'Restart' |
1332 label: 'Restart' |
1333 itemValue: restartProcess |
1333 itemValue: restartProcess |
1334 translateLabel: true |
1334 translateLabel: true |
1335 isButton: true |
1335 isButton: true |
1336 isVisible: allowModifications |
1336 isVisible: allowModifications |
1337 labelImage: (ResourceRetriever ProcessMonitorV2 processRestart22x22Icon) |
1337 labelImage: (ResourceRetriever ProcessMonitorV2 processRestart22x22Icon) |
1338 ) |
1338 ) |
1339 (MenuItem |
1339 (MenuItem |
1340 label: '-' |
1340 label: '-' |
1341 isVisible: allowModifications |
1341 isVisible: allowModifications |
1342 ) |
1342 ) |
1343 (MenuItem |
1343 (MenuItem |
1344 activeHelpKey: #'Raise Prio' |
1344 activeHelpKey: #'Raise Prio' |
1345 enabled: hasSelectionHolder |
1345 enabled: hasSelectionHolder |
1346 label: 'Raise Prio' |
1346 label: 'Raise Prio' |
1347 itemValue: raisePrio |
1347 itemValue: raisePrio |
1348 translateLabel: true |
1348 translateLabel: true |
1349 isButton: true |
1349 isButton: true |
1350 isVisible: allowModifications |
1350 isVisible: allowModifications |
1351 labelImage: (ResourceRetriever ProcessMonitorV2 processRaisePrio22x22Icon) |
1351 labelImage: (ResourceRetriever ProcessMonitorV2 processRaisePrio22x22Icon) |
1352 ) |
1352 ) |
1353 (MenuItem |
1353 (MenuItem |
1354 activeHelpKey: #'Lower Prio' |
1354 activeHelpKey: #'Lower Prio' |
1355 enabled: hasSelectionHolder |
1355 enabled: hasSelectionHolder |
1356 label: 'Lower Prio' |
1356 label: 'Lower Prio' |
1357 itemValue: lowerPrio |
1357 itemValue: lowerPrio |
1358 translateLabel: true |
1358 translateLabel: true |
1359 isButton: true |
1359 isButton: true |
1360 isVisible: allowModifications |
1360 isVisible: allowModifications |
1361 labelImage: (ResourceRetriever ProcessMonitorV2 processLowerPrio22x22Icon) |
1361 labelImage: (ResourceRetriever ProcessMonitorV2 processLowerPrio22x22Icon) |
1362 ) |
1362 ) |
1363 (MenuItem |
1363 (MenuItem |
1364 label: '' |
1364 label: '' |
1365 isVisible: allowModifications |
1365 isVisible: allowModifications |
1366 ) |
1366 ) |
1367 (MenuItem |
1367 (MenuItem |
1368 activeHelpKey: #'Update Process List' |
1368 activeHelpKey: #'Update Process List' |
1369 label: 'Update' |
1369 label: 'Update' |
1370 itemValue: updateList |
1370 itemValue: updateList |
1371 translateLabel: true |
1371 translateLabel: true |
1372 isButton: true |
1372 isButton: true |
1373 startGroup: right |
1373 startGroup: right |
1374 labelImage: (ResourceRetriever ToolbarIconLibrary reloadIcon) |
1374 labelImage: (ResourceRetriever ToolbarIconLibrary reloadIcon) |
1375 ) |
1375 ) |
1376 (MenuItem |
1376 (MenuItem |
1377 activeHelpKey: Details |
1377 activeHelpKey: Details |
1378 label: 'View Details' |
1378 label: 'View Details' |
1379 translateLabel: true |
1379 translateLabel: true |
1380 isButton: true |
1380 isButton: true |
1381 startGroup: right |
1381 startGroup: right |
1382 submenuChannel: viewDetailsMenuSpec |
1382 submenuChannel: viewDetailsMenuSpec |
1383 labelImage: (ResourceRetriever ToolbarIconLibrary viewDetailsIcon) |
1383 labelImage: (ResourceRetriever ToolbarIconLibrary viewDetailsIcon) |
1384 ) |
1384 ) |
1385 ) |
1385 ) |
1386 nil |
1386 nil |
1387 nil |
1387 nil |
1388 ) |
1388 ) |
1389 |
1389 |
1390 "Modified: / 05-06-2007 / 18:35:31 / cg" |
1390 "Modified: / 05-06-2007 / 18:35:31 / cg" |
1391 ! |
1391 ! |
1392 |
1392 |
1402 (Menu new fromLiteralArrayEncoding:(ProcessMonitorV2 viewDetailsMenuSpec)) startUp |
1402 (Menu new fromLiteralArrayEncoding:(ProcessMonitorV2 viewDetailsMenuSpec)) startUp |
1403 " |
1403 " |
1404 |
1404 |
1405 <resource: #menu> |
1405 <resource: #menu> |
1406 |
1406 |
1407 ^ |
1407 ^ |
1408 #(#Menu |
1408 #(#Menu |
1409 #( |
1409 #( |
1410 #(#MenuItem |
1410 #(#MenuItem |
1411 #label: 'Id' |
1411 #label: 'Id' |
1412 #translateLabel: true |
1412 #translateLabel: true |
1413 #hideMenuOnActivated: false |
1413 #hideMenuOnActivated: false |
1414 #indication: #showProcessId |
1414 #indication: #showProcessId |
1415 ) |
1415 ) |
1416 #(#MenuItem |
1416 #(#MenuItem |
1417 #label: 'Group' |
1417 #label: 'Group' |
1418 #translateLabel: true |
1418 #translateLabel: true |
1419 #hideMenuOnActivated: false |
1419 #hideMenuOnActivated: false |
1420 #indication: #showGroup |
1420 #indication: #showGroup |
1421 ) |
1421 ) |
1422 #(#MenuItem |
1422 #(#MenuItem |
1423 #label: 'State' |
1423 #label: 'State' |
1424 #translateLabel: true |
1424 #translateLabel: true |
1425 #hideMenuOnActivated: false |
1425 #hideMenuOnActivated: false |
1426 #indication: #showState |
1426 #indication: #showState |
1427 ) |
1427 ) |
1428 #(#MenuItem |
1428 #(#MenuItem |
1429 #label: 'Prio' |
1429 #label: 'Prio' |
1430 #translateLabel: true |
1430 #translateLabel: true |
1431 #hideMenuOnActivated: false |
1431 #hideMenuOnActivated: false |
1432 #indication: #showPrio |
1432 #indication: #showPrio |
1433 ) |
1433 ) |
1434 #(#MenuItem |
1434 #(#MenuItem |
1435 #label: 'Used Stack' |
1435 #label: 'Used Stack' |
1436 #translateLabel: true |
1436 #translateLabel: true |
1437 #hideMenuOnActivated: false |
1437 #hideMenuOnActivated: false |
1438 #indication: #showUsedStack |
1438 #indication: #showUsedStack |
1439 ) |
1439 ) |
1440 #(#MenuItem |
1440 #(#MenuItem |
1441 #label: 'Total Stack' |
1441 #label: 'Total Stack' |
1442 #translateLabel: true |
1442 #translateLabel: true |
1443 #hideMenuOnActivated: false |
1443 #hideMenuOnActivated: false |
1444 #indication: #showTotalStack |
1444 #indication: #showTotalStack |
1445 ) |
1445 ) |
1446 #(#MenuItem |
1446 #(#MenuItem |
1447 #label: 'Current-Segment' |
1447 #label: 'Current-Segment' |
1448 #translateLabel: true |
1448 #translateLabel: true |
1449 #hideMenuOnActivated: false |
1449 #hideMenuOnActivated: false |
1450 #indication: #showCurrentSegment |
1450 #indication: #showCurrentSegment |
1451 ) |
1451 ) |
1452 #(#MenuItem |
1452 #(#MenuItem |
1453 #label: 'Switch' |
1453 #label: 'Switch' |
1454 #translateLabel: true |
1454 #translateLabel: true |
1455 #hideMenuOnActivated: false |
1455 #hideMenuOnActivated: false |
1456 #indication: #showSwitch |
1456 #indication: #showSwitch |
1457 ) |
1457 ) |
1458 #(#MenuItem |
1458 #(#MenuItem |
1459 #label: 'Where' |
1459 #label: 'Where' |
1460 #translateLabel: true |
1460 #translateLabel: true |
1461 #hideMenuOnActivated: false |
1461 #hideMenuOnActivated: false |
1462 #indication: #showWhere |
1462 #indication: #showWhere |
1463 ) |
1463 ) |
1464 #(#MenuItem |
1464 #(#MenuItem |
1465 #label: '-' |
1465 #label: '-' |
1466 ) |
1466 ) |
1467 #(#MenuItem |
1467 #(#MenuItem |
1468 #label: 'Show Dead Processes' |
1468 #label: 'Show Dead Processes' |
1469 #translateLabel: true |
1469 #translateLabel: true |
1470 #indication: #showDead |
1470 #indication: #showDead |
1471 ) |
1471 ) |
1472 #(#MenuItem |
1472 #(#MenuItem |
1473 #label: '-' |
1473 #label: '-' |
1474 ) |
1474 ) |
1475 #(#MenuItem |
1475 #(#MenuItem |
1476 #label: 'Update' |
1476 #label: 'Update' |
1477 #itemValue: #updateView |
1477 #itemValue: #updateView |
1478 #translateLabel: true |
1478 #translateLabel: true |
1479 ) |
1479 ) |
1480 ) |
1480 ) |
1481 nil |
1481 nil |
1482 nil |
1482 nil |
1483 ) |
1483 ) |
1484 ! ! |
1484 ! ! |
1485 |
1485 |
1486 !ProcessMonitorV2 class methodsFor:'tableColumns specs'! |
1486 !ProcessMonitorV2 class methodsFor:'tableColumns specs'! |
1487 |
1487 |
1498 |
1498 |
1499 <resource: #tableColumns> |
1499 <resource: #tableColumns> |
1500 |
1500 |
1501 ^#( |
1501 ^#( |
1502 #(#DataSetColumnSpec |
1502 #(#DataSetColumnSpec |
1503 #label: 'Id' |
1503 #label: 'Id' |
1504 #id: #id |
1504 #id: #id |
1505 #labelAlignment: #left |
1505 #labelAlignment: #left |
1506 #labelButtonType: #Button |
1506 #labelButtonType: #Button |
1507 #labelActionSelector: #sortProcessListBy: |
1507 #labelActionSelector: #sortProcessListBy: |
1508 #labelActionArgument: 'idVal' |
1508 #labelActionArgument: 'idVal' |
1509 #width: 45 |
1509 #width: 45 |
1510 #type: #number |
1510 #type: #number |
1511 #model: #processId |
1511 #model: #processId |
1512 #canSelect: false |
1512 #canSelect: false |
1513 #showRowSeparator: false |
1513 #showRowSeparator: false |
1514 #showColSeparator: false |
1514 #showColSeparator: false |
1515 ) |
1515 ) |
1516 #(#DataSetColumnSpec |
1516 #(#DataSetColumnSpec |
1517 #label: 'Group' |
1517 #label: 'Group' |
1518 #id: #group |
1518 #id: #group |
1519 #labelAlignment: #left |
1519 #labelAlignment: #left |
1520 #labelButtonType: #Button |
1520 #labelButtonType: #Button |
1521 #labelActionSelector: #sortProcessListBy: |
1521 #labelActionSelector: #sortProcessListBy: |
1522 #labelActionArgument: 'groupVal' |
1522 #labelActionArgument: 'groupVal' |
1523 #width: 45 |
1523 #width: 45 |
1524 #model: #processGroup |
1524 #model: #processGroup |
1525 #canSelect: false |
1525 #canSelect: false |
1526 #showRowSeparator: false |
1526 #showRowSeparator: false |
1527 #showColSeparator: false |
1527 #showColSeparator: false |
1528 ) |
1528 ) |
1529 #(#DataSetColumnSpec |
1529 #(#DataSetColumnSpec |
1530 #label: 'Name' |
1530 #label: 'Name' |
1531 #id: #name |
1531 #id: #name |
1532 #labelAlignment: #left |
1532 #labelAlignment: #left |
1533 #labelButtonType: #Button |
1533 #labelButtonType: #Button |
1534 #labelActionSelector: #sortProcessListBy: |
1534 #labelActionSelector: #sortProcessListBy: |
1535 #labelActionArgument: 'processName' |
1535 #labelActionArgument: 'processName' |
1536 #width: 200 |
1536 #width: 200 |
1537 #model: #processName |
1537 #model: #processName |
1538 #canSelect: false |
1538 #canSelect: false |
1539 #showRowSeparator: false |
1539 #showRowSeparator: false |
1540 #showColSeparator: false |
1540 #showColSeparator: false |
1541 ) |
1541 ) |
1542 #(#DataSetColumnSpec |
1542 #(#DataSetColumnSpec |
1543 #label: '' |
1543 #label: '' |
1544 #id: #active |
1544 #id: #active |
1545 #labelButtonType: #Button |
1545 #labelButtonType: #Button |
1546 #labelActionSelector: #sortProcessListBy: |
1546 #labelActionSelector: #sortProcessListBy: |
1547 #labelActionArgument: 'processActive' |
1547 #labelActionArgument: 'processActive' |
1548 #width: 10 |
1548 #width: 10 |
1549 #height: 5 |
1549 #height: 5 |
1550 #model: #processActive |
1550 #model: #processActive |
1551 #canSelect: false |
1551 #canSelect: false |
1552 #showRowSeparator: false |
1552 #showRowSeparator: false |
1553 #showColSeparator: false |
1553 #showColSeparator: false |
1554 ) |
1554 ) |
1555 #(#DataSetColumnSpec |
1555 #(#DataSetColumnSpec |
1556 #label: 'State' |
1556 #label: 'State' |
1557 #id: #state |
1557 #id: #state |
1558 #labelAlignment: #left |
1558 #labelAlignment: #left |
1559 #labelButtonType: #Button |
1559 #labelButtonType: #Button |
1560 #labelActionSelector: #sortProcessListBy: |
1560 #labelActionSelector: #sortProcessListBy: |
1561 #labelActionArgument: 'processState' |
1561 #labelActionArgument: 'processState' |
1562 #width: 100 |
1562 #width: 100 |
1563 #model: #processState |
1563 #model: #processState |
1564 #canSelect: false |
1564 #canSelect: false |
1565 #showRowSeparator: false |
1565 #showRowSeparator: false |
1566 #showColSeparator: false |
1566 #showColSeparator: false |
1567 ) |
1567 ) |
1568 #(#DataSetColumnSpec |
1568 #(#DataSetColumnSpec |
1569 #label: 'Prio' |
1569 #label: 'Prio' |
1570 #id: #prio |
1570 #id: #prio |
1571 #labelAlignment: #left |
1571 #labelAlignment: #left |
1572 #labelButtonType: #Button |
1572 #labelButtonType: #Button |
1573 #labelActionSelector: #sortProcessListBy: |
1573 #labelActionSelector: #sortProcessListBy: |
1574 #labelActionArgument: 'prioVal' |
1574 #labelActionArgument: 'prioVal' |
1575 #width: 40 |
1575 #width: 40 |
1576 #model: #processPrio |
1576 #model: #processPrio |
1577 #canSelect: false |
1577 #canSelect: false |
1578 #showRowSeparator: false |
1578 #showRowSeparator: false |
1579 #showColSeparator: false |
1579 #showColSeparator: false |
1580 ) |
1580 ) |
1581 #(#DataSetColumnSpec |
1581 #(#DataSetColumnSpec |
1582 #label: 'Used Stack' |
1582 #label: 'Used Stack' |
1583 #id: #usedStack |
1583 #id: #usedStack |
1584 #labelAlignment: #left |
1584 #labelAlignment: #left |
1585 #labelButtonType: #Button |
1585 #labelButtonType: #Button |
1586 #labelActionSelector: #sortProcessListBy: |
1586 #labelActionSelector: #sortProcessListBy: |
1587 #labelActionArgument: 'processUsedStack' |
1587 #labelActionArgument: 'processUsedStack' |
1588 #columnAlignment: #right |
1588 #columnAlignment: #right |
1589 #width: 75 |
1589 #width: 75 |
1590 #type: #number |
1590 #type: #number |
1591 #model: #processUsedStack |
1591 #model: #processUsedStack |
1592 #canSelect: false |
1592 #canSelect: false |
1593 #showRowSeparator: false |
1593 #showRowSeparator: false |
1594 #showColSeparator: false |
1594 #showColSeparator: false |
1595 ) |
1595 ) |
1596 #(#DataSetColumnSpec |
1596 #(#DataSetColumnSpec |
1597 #label: 'Total Stack' |
1597 #label: 'Total Stack' |
1598 #id: #totalStack |
1598 #id: #totalStack |
1599 #labelAlignment: #left |
1599 #labelAlignment: #left |
1600 #labelButtonType: #Button |
1600 #labelButtonType: #Button |
1601 #labelActionSelector: #sortProcessListBy: |
1601 #labelActionSelector: #sortProcessListBy: |
1602 #labelActionArgument: 'processTotalStack' |
1602 #labelActionArgument: 'processTotalStack' |
1603 #columnAlignment: #right |
1603 #columnAlignment: #right |
1604 #width: 75 |
1604 #width: 75 |
1605 #model: #processTotalStack |
1605 #model: #processTotalStack |
1606 #canSelect: false |
1606 #canSelect: false |
1607 #showRowSeparator: false |
1607 #showRowSeparator: false |
1608 #showColSeparator: false |
1608 #showColSeparator: false |
1609 ) |
1609 ) |
1610 #(#DataSetColumnSpec |
1610 #(#DataSetColumnSpec |
1611 #label: 'Current-Segment' |
1611 #label: 'Current-Segment' |
1612 #id: #currentSegment |
1612 #id: #currentSegment |
1613 #labelAlignment: #left |
1613 #labelAlignment: #left |
1614 #labelButtonType: #Button |
1614 #labelButtonType: #Button |
1615 #labelActionSelector: #sortProcessListBy: |
1615 #labelActionSelector: #sortProcessListBy: |
1616 #labelActionArgument: 'processCurrentSegment' |
1616 #labelActionArgument: 'processCurrentSegment' |
1617 #width: 110 |
1617 #width: 110 |
1618 #model: #processCurrentSegment |
1618 #model: #processCurrentSegment |
1619 #canSelect: false |
1619 #canSelect: false |
1620 #showRowSeparator: false |
1620 #showRowSeparator: false |
1621 #showColSeparator: false |
1621 #showColSeparator: false |
1622 ) |
1622 ) |
1623 #(#DataSetColumnSpec |
1623 #(#DataSetColumnSpec |
1624 #label: 'Switch' |
1624 #label: 'Switch' |
1625 #id: #switch |
1625 #id: #switch |
1626 #labelAlignment: #left |
1626 #labelAlignment: #left |
1627 #labelButtonType: #Button |
1627 #labelButtonType: #Button |
1628 #labelActionSelector: #sortProcessListBy: |
1628 #labelActionSelector: #sortProcessListBy: |
1629 #labelActionArgument: 'processSwitch' |
1629 #labelActionArgument: 'processSwitch' |
1630 #columnAlignment: #right |
1630 #columnAlignment: #right |
1631 #width: 55 |
1631 #width: 55 |
1632 #type: #number |
1632 #type: #number |
1633 #model: #processSwitch |
1633 #model: #processSwitch |
1634 #canSelect: false |
1634 #canSelect: false |
1635 #showRowSeparator: false |
1635 #showRowSeparator: false |
1636 #showColSeparator: false |
1636 #showColSeparator: false |
1637 ) |
1637 ) |
1638 #(#DataSetColumnSpec |
1638 #(#DataSetColumnSpec |
1639 #label: 'Where' |
1639 #label: 'Where' |
1640 #id: #where |
1640 #id: #where |
1641 #labelAlignment: #left |
1641 #labelAlignment: #left |
1642 #labelButtonType: #Button |
1642 #labelButtonType: #Button |
1643 #labelActionSelector: #sortProcessListBy: |
1643 #labelActionSelector: #sortProcessListBy: |
1644 #labelActionArgument: 'processWhere' |
1644 #labelActionArgument: 'processWhere' |
1645 #model: #processWhere |
1645 #model: #processWhere |
1646 #canSelect: false |
1646 #canSelect: false |
1647 #showRowSeparator: false |
1647 #showRowSeparator: false |
1648 #showColSeparator: false |
1648 #showColSeparator: false |
1649 ) |
1649 ) |
1650 ) |
1650 ) |
1651 ! ! |
1651 ! ! |
1652 |
1652 |
1653 !ProcessMonitorV2 methodsFor:'accessing'! |
1653 !ProcessMonitorV2 methodsFor:'accessing'! |
1909 ! |
1909 ! |
1910 |
1910 |
1911 selectedProcesses |
1911 selectedProcesses |
1912 |
1912 |
1913 selectedProcesses isNil ifTrue:[ |
1913 selectedProcesses isNil ifTrue:[ |
1914 selectedProcesses := ValueHolder new. |
1914 selectedProcesses := ValueHolder new. |
1915 selectedProcesses addDependent:self. |
1915 selectedProcesses addDependent:self. |
1916 ]. |
1916 ]. |
1917 ^ selectedProcesses. |
1917 ^ selectedProcesses. |
1918 ! |
1918 ! |
1919 |
1919 |
1920 selectionRestartable |
1920 selectionRestartable |
1921 |
1921 |
1922 selectionRestartable isNil ifTrue:[ |
1922 selectionRestartable isNil ifTrue:[ |
1923 selectionRestartable := ValueHolder new. |
1923 selectionRestartable := ValueHolder new. |
1924 ]. |
1924 ]. |
1925 ^ selectionRestartable |
1925 ^ selectionRestartable |
1926 ! |
1926 ! |
1927 |
1927 |
1928 showDead |
1928 showDead |
1929 "return/create the 'showDead' value holder (automatically generated)" |
1929 "return/create the 'showDead' value holder (automatically generated)" |
1930 |
1930 |
1931 showDead isNil ifTrue:[ |
1931 showDead isNil ifTrue:[ |
1932 showDead := false asValue. |
1932 showDead := false asValue. |
1933 showDead addDependent:self. |
1933 showDead addDependent:self. |
1934 ]. |
1934 ]. |
1935 ^ showDead |
1935 ^ showDead |
1936 ! |
1936 ! |
1937 |
1937 |
1938 sortBlock |
1938 sortBlock |
1939 |
1939 |
1940 sortBlock isNil ifTrue:[ |
1940 sortBlock isNil ifTrue:[ |
1941 | curSortOrder defaultSortInstance| |
1941 | curSortOrder defaultSortInstance| |
1942 defaultSortInstance := #idVal. |
1942 defaultSortInstance := #idVal. |
1943 sortBlock := [:a :b | |
1943 sortBlock := [:a :b | |
1944 ((a perform:defaultSortInstance) < (b perform:defaultSortInstance)) |
1944 ((a perform:defaultSortInstance) < (b perform:defaultSortInstance)) |
1945 ]. |
1945 ]. |
1946 curSortOrder := self currentSortOrder value. |
1946 curSortOrder := self currentSortOrder value. |
1947 curSortOrder at:#column put:defaultSortInstance. |
1947 curSortOrder at:#column put:defaultSortInstance. |
1948 curSortOrder at:#reverse put:true. |
1948 curSortOrder at:#reverse put:true. |
1949 ]. |
1949 ]. |
1950 ^ sortBlock |
1950 ^ sortBlock |
1951 ! |
1951 ! |
1952 |
1952 |
1953 tableColumns |
1953 tableColumns |
1954 |
1954 |
1955 tableColumns isNil ifTrue:[ |
1955 tableColumns isNil ifTrue:[ |
1956 tableColumns := self class tableColumns asValue. |
1956 tableColumns := self class tableColumns asValue. |
1957 ]. |
1957 ]. |
1958 ^ tableColumns. |
1958 ^ tableColumns. |
1959 ! |
1959 ! |
1960 |
1960 |
1961 updateContentsDelayTime |
1961 updateContentsDelayTime |
1962 |
1962 |
1963 updateContentsDelayTime isNil ifTrue:[ |
1963 updateContentsDelayTime isNil ifTrue:[ |
1964 updateContentsDelayTime := updateDelay asValue. |
1964 updateContentsDelayTime := updateDelay asValue. |
1965 updateContentsDelayTime onChangeSend:#evaluateEnableInDecreaseButtons to:self. |
1965 updateContentsDelayTime onChangeSend:#evaluateEnableInDecreaseButtons to:self. |
1966 ]. |
1966 ]. |
1967 ^ updateContentsDelayTime. |
1967 ^ updateContentsDelayTime. |
1968 ! |
1968 ! |
1969 |
1969 |
1970 updateListDelayTime |
1970 updateListDelayTime |
1971 |
1971 |
1972 updateListDelayTime isNil ifTrue:[ |
1972 updateListDelayTime isNil ifTrue:[ |
1973 updateListDelayTime := listUpdateDelay asValue. |
1973 updateListDelayTime := listUpdateDelay asValue. |
1974 updateListDelayTime onChangeSend:#evaluateEnableInDecreaseButtons to:self. |
1974 updateListDelayTime onChangeSend:#evaluateEnableInDecreaseButtons to:self. |
1975 ]. |
1975 ]. |
1976 ^ updateListDelayTime. |
1976 ^ updateListDelayTime. |
1977 ! ! |
1977 ! ! |
1978 |
1978 |
1979 !ProcessMonitorV2 methodsFor:'aspects column'! |
1979 !ProcessMonitorV2 methodsFor:'aspects column'! |
1980 |
1980 |
1981 showCurrentSegment |
1981 showCurrentSegment |
1982 "return/create the 'showCurrentSegment' value holder (automatically generated)" |
1982 "return/create the 'showCurrentSegment' value holder (automatically generated)" |
1983 |
1983 |
1984 showCurrentSegment isNil ifTrue:[ |
1984 showCurrentSegment isNil ifTrue:[ |
1985 showCurrentSegment := showDetail asValue. |
1985 showCurrentSegment := showDetail asValue. |
1986 showCurrentSegment onChangeSend:#viewedColumnsChanged to:self. |
1986 showCurrentSegment onChangeSend:#viewedColumnsChanged to:self. |
1987 ]. |
1987 ]. |
1988 ^ showCurrentSegment |
1988 ^ showCurrentSegment |
1989 ! |
1989 ! |
1990 |
1990 |
1991 showGroup |
1991 showGroup |
1992 "return/create the 'showGroup' value holder (automatically generated)" |
1992 "return/create the 'showGroup' value holder (automatically generated)" |
1993 |
1993 |
1994 showGroup isNil ifTrue:[ |
1994 showGroup isNil ifTrue:[ |
1995 showGroup := true asValue. |
1995 showGroup := true asValue. |
1996 showGroup onChangeSend:#viewedColumnsChanged to:self. |
1996 showGroup onChangeSend:#viewedColumnsChanged to:self. |
1997 ]. |
1997 ]. |
1998 ^ showGroup |
1998 ^ showGroup |
1999 ! |
1999 ! |
2000 |
2000 |
2001 showPrio |
2001 showPrio |
2002 "return/create the 'showPrio' value holder (automatically generated)" |
2002 "return/create the 'showPrio' value holder (automatically generated)" |
2003 |
2003 |
2004 showPrio isNil ifTrue:[ |
2004 showPrio isNil ifTrue:[ |
2005 showPrio := true asValue. |
2005 showPrio := true asValue. |
2006 showPrio onChangeSend:#viewedColumnsChanged to:self. |
2006 showPrio onChangeSend:#viewedColumnsChanged to:self. |
2007 ]. |
2007 ]. |
2008 ^ showPrio |
2008 ^ showPrio |
2009 ! |
2009 ! |
2010 |
2010 |
2011 showProcessId |
2011 showProcessId |
2012 |
2012 |
2013 showProcessId isNil ifTrue:[ |
2013 showProcessId isNil ifTrue:[ |
2014 showProcessId := true asValue. |
2014 showProcessId := true asValue. |
2015 showProcessId onChangeSend:#viewedColumnsChanged to:self |
2015 showProcessId onChangeSend:#viewedColumnsChanged to:self |
2016 ]. |
2016 ]. |
2017 ^ showProcessId |
2017 ^ showProcessId |
2018 ! |
2018 ! |
2019 |
2019 |
2020 showState |
2020 showState |
2021 "return/create the 'showState' value holder (automatically generated)" |
2021 "return/create the 'showState' value holder (automatically generated)" |
2022 |
2022 |
2023 showState isNil ifTrue:[ |
2023 showState isNil ifTrue:[ |
2024 showState := true asValue. |
2024 showState := true asValue. |
2025 showState onChangeSend:#viewedColumnsChanged to:self |
2025 showState onChangeSend:#viewedColumnsChanged to:self |
2026 ]. |
2026 ]. |
2027 ^ showState |
2027 ^ showState |
2028 ! |
2028 ! |
2029 |
2029 |
2030 showSwitch |
2030 showSwitch |
2031 "return/create the 'showSwitch' value holder (automatically generated)" |
2031 "return/create the 'showSwitch' value holder (automatically generated)" |
2032 |
2032 |
2033 showSwitch isNil ifTrue:[ |
2033 showSwitch isNil ifTrue:[ |
2034 showSwitch := showDetail asValue. |
2034 showSwitch := showDetail asValue. |
2035 showSwitch onChangeSend:#viewedColumnsChanged to:self |
2035 showSwitch onChangeSend:#viewedColumnsChanged to:self |
2036 ]. |
2036 ]. |
2037 ^ showSwitch |
2037 ^ showSwitch |
2038 ! |
2038 ! |
2039 |
2039 |
2040 showTotalStack |
2040 showTotalStack |
2041 "return/create the 'showTotalStack' value holder (automatically generated)" |
2041 "return/create the 'showTotalStack' value holder (automatically generated)" |
2042 |
2042 |
2043 showTotalStack isNil ifTrue:[ |
2043 showTotalStack isNil ifTrue:[ |
2044 showTotalStack := showDetail asValue. |
2044 showTotalStack := showDetail asValue. |
2045 showTotalStack onChangeSend:#viewedColumnsChanged to:self |
2045 showTotalStack onChangeSend:#viewedColumnsChanged to:self |
2046 ]. |
2046 ]. |
2047 ^ showTotalStack |
2047 ^ showTotalStack |
2048 ! |
2048 ! |
2049 |
2049 |
2050 showUsedStack |
2050 showUsedStack |
2051 "return/create the 'showUsedStack' value holder (automatically generated)" |
2051 "return/create the 'showUsedStack' value holder (automatically generated)" |
2052 |
2052 |
2053 showUsedStack isNil ifTrue:[ |
2053 showUsedStack isNil ifTrue:[ |
2054 showUsedStack := showDetail asValue. |
2054 showUsedStack := showDetail asValue. |
2055 showUsedStack onChangeSend:#viewedColumnsChanged to:self |
2055 showUsedStack onChangeSend:#viewedColumnsChanged to:self |
2056 ]. |
2056 ]. |
2057 ^ showUsedStack |
2057 ^ showUsedStack |
2058 ! |
2058 ! |
2059 |
2059 |
2060 showWhere |
2060 showWhere |
2061 "return/create the 'showWhere' value holder (automatically generated)" |
2061 "return/create the 'showWhere' value holder (automatically generated)" |
2062 |
2062 |
2063 showWhere isNil ifTrue:[ |
2063 showWhere isNil ifTrue:[ |
2064 showWhere := true asValue. |
2064 showWhere := true asValue. |
2065 showWhere onChangeSend:#viewedColumnsChanged to:self |
2065 showWhere onChangeSend:#viewedColumnsChanged to:self |
2066 ]. |
2066 ]. |
2067 ^ showWhere |
2067 ^ showWhere |
2068 ! ! |
2068 ! ! |
2069 |
2069 |
2070 !ProcessMonitorV2 methodsFor:'change & update'! |
2070 !ProcessMonitorV2 methodsFor:'change & update'! |
2101 "Invoked when an object that I depend upon sends a change notification." |
2101 "Invoked when an object that I depend upon sends a change notification." |
2102 |
2102 |
2103 "stub code automatically generated - please change as required" |
2103 "stub code automatically generated - please change as required" |
2104 |
2104 |
2105 changedObject == builder window ifTrue:[ |
2105 changedObject == builder window ifTrue:[ |
2106 something == #visibility ifTrue:[ |
2106 something == #visibility ifTrue:[ |
2107 self updateList. |
2107 self updateList. |
2108 ]. |
2108 ]. |
2109 ]. |
2109 ]. |
2110 changedObject == self selectedProcesses ifTrue:[ |
2110 changedObject == self selectedProcesses ifTrue:[ |
2111 self selectionChanged. |
2111 self selectionChanged. |
2112 ^ self |
2112 ^ self |
2113 ]. |
2113 ]. |
2114 changedObject == self showDead ifTrue:[ |
2114 changedObject == self showDead ifTrue:[ |
2115 self updateList. |
2115 self updateList. |
2116 ^ self |
2116 ^ self |
2117 ]. |
2117 ]. |
2118 super update:something with:aParameter from:changedObject |
2118 super update:something with:aParameter from:changedObject |
2119 ! |
2119 ! |
2120 |
2120 |
2121 viewedColumnsChanged |
2121 viewedColumnsChanged |
2122 |
2122 |
2123 | columns buffer locCurrentSortOrder currentSortOrderColumn currentSortOrderReverse oldSelection sel| |
2123 | columns buffer locCurrentSortOrder currentSortOrderColumn currentSortOrderReverse oldSelection sel| |
2124 |
2124 |
2125 sel := self selectedProcesses value. |
2125 sel := self selectedProcesses value. |
2126 sel notNil ifTrue:[ |
2126 sel notNil ifTrue:[ |
2127 oldSelection := OrderedCollection new. |
2127 oldSelection := OrderedCollection new. |
2128 sel do:[:proItem| |
2128 sel do:[:proItem| |
2129 proItem processInstance notNil ifTrue:[ |
2129 proItem processInstance notNil ifTrue:[ |
2130 oldSelection add:(proItem processInstance) |
2130 oldSelection add:(proItem processInstance) |
2131 ]. |
2131 ]. |
2132 ]. |
2132 ]. |
2133 ]. |
2133 ]. |
2134 "/ Transcript showCR:'oldSelection on catch in viewedColumnsChanged', (oldSelection isNil ifTrue:['nil'] ifFalse:[oldSelection first printString]). |
2134 "/ Transcript showCR:'oldSelection on catch in viewedColumnsChanged', (oldSelection isNil ifTrue:['nil'] ifFalse:[oldSelection first printString]). |
2135 columns := OrderedCollection new. |
2135 columns := OrderedCollection new. |
2136 self class tableColumns do:[:el| |
2136 self class tableColumns do:[:el| |
2137 columns add:(DataSetColumnSpec decodeFromLiteralArray:el). |
2137 columns add:(DataSetColumnSpec decodeFromLiteralArray:el). |
2138 ]. |
2138 ]. |
2139 buffer := columns copy. |
2139 buffer := columns copy. |
2140 locCurrentSortOrder := self currentSortOrder value. |
2140 locCurrentSortOrder := self currentSortOrder value. |
2141 currentSortOrderColumn := locCurrentSortOrder at:#column ifAbsent:nil. |
2141 currentSortOrderColumn := locCurrentSortOrder at:#column ifAbsent:nil. |
2142 currentSortOrderReverse := locCurrentSortOrder at:#reverse ifAbsent:nil. |
2142 currentSortOrderReverse := locCurrentSortOrder at:#reverse ifAbsent:nil. |
2143 buffer do:[:col | |
2143 buffer do:[:col | |
2144 | id | |
2144 | id | |
2145 id := col id. |
2145 id := col id. |
2146 id notNil ifTrue:[ |
2146 id notNil ifTrue:[ |
2147 (col labelActionArgument notNil and:[col labelActionArgument asSymbol == currentSortOrderColumn]) ifTrue:[ |
2147 (col labelActionArgument notNil and:[col labelActionArgument asSymbol == currentSortOrderColumn]) ifTrue:[ |
2148 | label icon| |
2148 | label icon| |
2149 label := col label. |
2149 label := col label. |
2150 icon := currentSortOrderReverse ifTrue:[self class detailsMenuIconDown] ifFalse:[self class detailsMenuIconUp]. |
2150 icon := currentSortOrderReverse ifTrue:[self class detailsMenuIconDown] ifFalse:[self class detailsMenuIconUp]. |
2151 col label:(LabelAndIcon label:label icon:icon). |
2151 col label:(LabelAndIcon label:label icon:icon). |
2152 ]. |
2152 ]. |
2153 #( |
2153 #( |
2154 ( #id #showProcessId) |
2154 ( #id #showProcessId) |
2155 ( #group #showGroup) |
2155 ( #group #showGroup) |
2156 ( #prio #showPrio) |
2156 ( #prio #showPrio) |
2157 ( #currentSegment #showCurrentSegment) |
2157 ( #currentSegment #showCurrentSegment) |
2158 ( #state #showState) |
2158 ( #state #showState) |
2159 ( #switch #showSwitch) |
2159 ( #switch #showSwitch) |
2160 ( #totalStack #showTotalStack) |
2160 ( #totalStack #showTotalStack) |
2161 ( #usedStack #showUsedStack) |
2161 ( #usedStack #showUsedStack) |
2162 ( #where #showWhere) |
2162 ( #where #showWhere) |
2163 ) pairsDo:[:colName :holderAccessorSelector | |
2163 ) pairsDo:[:colName :holderAccessorSelector | |
2164 (id == colName and:[(self perform:holderAccessorSelector) value not]) ifTrue:[ |
2164 (id == colName and:[(self perform:holderAccessorSelector) value not]) ifTrue:[ |
2165 columns remove:col. |
2165 columns remove:col. |
2166 ] |
2166 ] |
2167 ] |
2167 ] |
2168 ] |
2168 ] |
2169 ]. |
2169 ]. |
2170 updateSema critical:[ |
2170 updateSema critical:[ |
2171 self tableColumns value:columns. |
2171 self tableColumns value:columns. |
2172 "/ self updateTable:nil. |
2172 "/ self updateTable:nil. |
2173 "/ Transcript showCR:'oldSelection on set in viewedColumnsChanged', (oldSelection isNil ifTrue:['nil'] ifFalse:[oldSelection first printString]). |
2173 "/ Transcript showCR:'oldSelection on set in viewedColumnsChanged', (oldSelection isNil ifTrue:['nil'] ifFalse:[oldSelection first printString]). |
2174 self changeSelectionToProcesses:oldSelection. |
2174 self changeSelectionToProcesses:oldSelection. |
2175 ]. |
2175 ]. |
2176 |
2176 |
2177 "Modified: / 27-03-2007 / 08:43:49 / cg" |
2177 "Modified: / 27-03-2007 / 08:43:49 / cg" |
2178 ! ! |
2178 ! ! |
2179 |
2179 |
2496 isApplicationProcess:aProcess |
2496 isApplicationProcess:aProcess |
2497 ^ (self windowGroupOfProcess:aProcess) notNil. |
2497 ^ (self windowGroupOfProcess:aProcess) notNil. |
2498 ! |
2498 ! |
2499 |
2499 |
2500 windowGroupOfProcess:aProcess |
2500 windowGroupOfProcess:aProcess |
2501 WindowGroup scheduledWindowGroups |
2501 WindowGroup scheduledWindowGroups |
2502 do:[:eachGroup | |
2502 do:[:eachGroup | |
2503 (eachGroup process == aProcess) ifTrue:[ |
2503 (eachGroup process == aProcess) ifTrue:[ |
2504 eachGroup isModal ifTrue:[ |
2504 eachGroup isModal ifTrue:[ |
2505 ^ eachGroup previousGroup |
2505 ^ eachGroup previousGroup |
2506 ]. |
2506 ]. |
2507 ^ eachGroup |
2507 ^ eachGroup |
2508 ] |
2508 ] |
2509 ]. |
2509 ]. |
2510 |
2510 |
2511 ^ nil |
2511 ^ nil |
2512 ! ! |
2512 ! ! |
2513 |
2513 |
2514 !ProcessMonitorV2 methodsFor:'queries - table string'! |
2514 !ProcessMonitorV2 methodsFor:'queries - table string'! |
2515 |
2515 |
2516 getActiveStringFor:aProcess running:isRunning |
2516 getActiveStringFor:aProcess running:isRunning |
2517 |stateCharacter| |
2517 |stateCharacter| |
2518 |
2518 |
2519 isRunning ifTrue:[ |
2519 isRunning ifTrue:[ |
2520 stateCharacter := '*'. |
2520 stateCharacter := '*'. |
2521 ] ifFalse:[ |
2521 ] ifFalse:[ |
2522 [ |
2522 [ |
2523 (Processor scheduledProcesses includes:aProcess) ifTrue:[ |
2523 (Processor scheduledProcesses includes:aProcess) ifTrue:[ |
2524 stateCharacter := '+' |
2524 stateCharacter := '+' |
2525 ] ifFalse:[ |
2525 ] ifFalse:[ |
2526 stateCharacter := ''. |
2526 stateCharacter := ''. |
2527 ]. |
2527 ]. |
2528 ] valueUninterruptably. |
2528 ] valueUninterruptably. |
2529 ]. |
2529 ]. |
2530 ^ stateCharacter. |
2530 ^ stateCharacter. |
2531 ! |
2531 ! |
2532 |
2532 |
2533 getCurrentSegmentStringFor:con |
2533 getCurrentSegmentStringFor:con |
2534 |
2534 |
2535 con notNil ifTrue:[ |
2535 con notNil ifTrue:[ |
2536 | contextCount c sender| |
2536 | contextCount c sender| |
2537 contextCount := 1. |
2537 contextCount := 1. |
2538 c := con. |
2538 c := con. |
2539 [(sender := c sender) notNil] whileTrue:[ |
2539 [(sender := c sender) notNil] whileTrue:[ |
2540 c := sender. |
2540 c := sender. |
2541 contextCount := contextCount + 1. |
2541 contextCount := contextCount + 1. |
2542 ]. |
2542 ]. |
2543 ^ (((ObjectMemory addressOf:con) printStringRadix:16), |
2543 ^ (((ObjectMemory addressOf:con) printStringRadix:16), |
2544 ' .. ', |
2544 ' .. ', |
2545 ((ObjectMemory addressOf:c) printStringRadix:16)). |
2545 ((ObjectMemory addressOf:c) printStringRadix:16)). |
2546 ]. |
2546 ]. |
2547 ^ '' |
2547 ^ '' |
2548 ! |
2548 ! |
2549 |
2549 |
2550 getGroupStringFor:aProcess |
2550 getGroupStringFor:aProcess |
2551 |
2551 |
2552 |gId| |
2552 |gId| |
2553 |
2553 |
2554 gId := aProcess processGroupId. |
2554 gId := aProcess processGroupId. |
2555 ((gId == aProcess id) or:[gId isNil]) ifTrue:[ |
2555 ((gId == aProcess id) or:[gId isNil]) ifTrue:[ |
2556 "/ a group leader |
2556 "/ a group leader |
2557 ^ '-'. |
2557 ^ '-'. |
2558 ] ifFalse:[ |
2558 ] ifFalse:[ |
2559 ^ gId. |
2559 ^ gId. |
2560 ]. |
2560 ]. |
2561 ! |
2561 ! |
2562 |
2562 |
2563 getPrioStringFor:aProcess |
2563 getPrioStringFor:aProcess |
2564 |
2564 |
2565 |prioRange| |
2565 |prioRange| |
2566 |
2566 |
2567 Processor supportDynamicPriorities ifTrue:[ |
2567 Processor supportDynamicPriorities ifTrue:[ |
2568 (prioRange := aProcess priorityRange) isNil ifTrue:[ |
2568 (prioRange := aProcess priorityRange) isNil ifTrue:[ |
2569 ^ aProcess priority asString. |
2569 ^ aProcess priority asString. |
2570 ] ifFalse:[ |
2570 ] ifFalse:[ |
2571 ^ (aProcess priority asString, |
2571 ^ (aProcess priority asString, |
2572 ' [', |
2572 ' [', |
2573 prioRange start printString, |
2573 prioRange start printString, |
2574 '..', |
2574 '..', |
2575 prioRange stop printString, |
2575 prioRange stop printString, |
2576 ']'). |
2576 ']'). |
2577 ]. |
2577 ]. |
2578 ]. |
2578 ]. |
2579 ^ '' |
2579 ^ '' |
2580 ! |
2580 ! |
2581 |
2581 |
2582 getTotalStackStringFor:aProcess |
2582 getTotalStackStringFor:aProcess |
2583 |
2583 |
2584 |
2584 |
2585 aProcess id == 0 ifTrue:[ |
2585 aProcess id == 0 ifTrue:[ |
2586 ^ 'unlimited'. |
2586 ^ 'unlimited'. |
2587 ] ifFalse:[ |
2587 ] ifFalse:[ |
2588 | tStackSize noOfSegs | |
2588 | tStackSize noOfSegs | |
2589 ((tStackSize := aProcess totalStackSize) notNil and:[ |
2589 ((tStackSize := aProcess totalStackSize) notNil and:[ |
2590 (noOfSegs := aProcess numberOfStackSegments) notNil |
2590 (noOfSegs := aProcess numberOfStackSegments) notNil |
2591 ]) ifTrue:[ |
2591 ]) ifTrue:[ |
2592 ^ ((tStackSize printString), |
2592 ^ ((tStackSize printString), |
2593 ' (', |
2593 ' (', |
2594 (noOfSegs printString), |
2594 (noOfSegs printString), |
2595 ')' ) |
2595 ')' ) |
2596 ] |
2596 ] |
2597 ]. |
2597 ]. |
2598 ^ '' |
2598 ^ '' |
2599 ! |
2599 ! |
2600 |
2600 |
2601 getWhereStringFor:con running:isRunning |
2601 getWhereStringFor:con running:isRunning |
2602 |c found skipping rs rc r sel| |
2602 |c found skipping rs rc r sel| |
2603 |
2603 |
2604 con notNil ifTrue:[ |
2604 con notNil ifTrue:[ |
2605 c := con. |
2605 c := con. |
2606 found := false. |
2606 found := false. |
2607 isRunning ifFalse:[ |
2607 isRunning ifFalse:[ |
2608 "/ search for a semaphore-wait in the top 10 contexts |
2608 "/ search for a semaphore-wait in the top 10 contexts |
2609 1 to:10 do:[:n | |
2609 1 to:10 do:[:n | |
2610 found ifFalse:[ |
2610 found ifFalse:[ |
2611 c notNil ifTrue:[ |
2611 c notNil ifTrue:[ |
2612 (c receiver class == Semaphore) ifTrue:[ |
2612 (c receiver class == Semaphore) ifTrue:[ |
2613 c selector == #wait ifTrue:[ |
2613 c selector == #wait ifTrue:[ |
2614 found := true. |
2614 found := true. |
2615 ] |
2615 ] |
2616 ]. |
2616 ]. |
2617 c := c sender. |
2617 c := c sender. |
2618 ] |
2618 ] |
2619 ] |
2619 ] |
2620 ]. |
2620 ]. |
2621 ]. |
2621 ]. |
2622 found ifFalse:[ |
2622 found ifFalse:[ |
2623 "/ search for a non-processor, non-process |
2623 "/ search for a non-processor, non-process |
2624 "/ receiver in the top 10 contexts |
2624 "/ receiver in the top 10 contexts |
2625 c := con. |
2625 c := con. |
2626 1 to:10 do:[:n | |
2626 1 to:10 do:[:n | |
2627 |r| |
2627 found ifFalse:[ |
2628 |
2628 c notNil ifTrue:[ |
2629 found ifFalse:[ |
2629 ((r := c receiver) ~~ Processor and:[ r class ~~ Process ]) ifTrue:[ |
2630 c notNil ifTrue:[ |
2630 found := true. |
2631 ((r := c receiver) ~~ Processor and:[ r class ~~ Process ]) ifTrue:[ |
2631 ] ifFalse:[ |
2632 found := true. |
2632 c := c sender. |
2633 ] ifFalse:[ |
2633 ] |
2634 c := c sender. |
2634 ] |
2635 ] |
2635 ] |
2636 ] |
2636 ] |
2637 ] |
2637 ]. |
2638 ] |
2638 |
2639 ]. |
2639 "/ skip, until an interesting context is |
2640 |
2640 "/ found. |
2641 "/ skip, until an interesting context is |
2641 "/ this skips intermediate contexts, which lead |
2642 "/ found. |
2642 "/ to the sema-wait (for example, unwind blocks, |
2643 "/ this skips intermediate contexts, which lead |
2643 "/ delay-stuff etc.) |
2644 "/ to the sema-wait (for example, unwind blocks, |
2644 found ifFalse:[ |
2645 "/ delay-stuff etc.) |
2645 c := con |
2646 found ifFalse:[ |
2646 ]. |
2647 c := con |
2647 skipping := true. |
2648 ]. |
2648 [ skipping ] whileTrue:[ |
2649 skipping := true. |
2649 skipping := false. |
2650 [ skipping ] whileTrue:[ |
2650 (c notNil and:[ c receiver == Delay or:[ c receiver class == Delay ] ]) ifTrue:[ |
2651 skipping := false. |
2651 c := c sender. |
2652 (c notNil and:[ c receiver == Delay or:[ c receiver class == Delay ] ]) ifTrue:[ |
2652 skipping := true. |
2653 c := c sender. |
2653 ]. |
2654 skipping := true. |
2654 [ |
2655 ]. |
2655 c notNil and:[ c receiver isBlock and:[ c selector startsWith:'value' ] ] |
2656 [ |
2656 ] whileTrue:[ |
2657 c notNil and:[ c receiver isBlock and:[ c selector startsWith:'value' ] ] |
2657 c := c sender. |
2658 ] whileTrue:[ |
2658 skipping := true. |
2659 c := c sender. |
2659 ]. |
2660 skipping := true. |
2660 [ |
2661 ]. |
2661 c notNil and:[ c receiver isBlock and:[ c selector = 'ensure:' ] ] |
2662 [ |
2662 ] whileTrue:[ |
2663 c notNil and:[ c receiver isBlock and:[ c selector = 'ensure:' ] ] |
2663 c := c sender. |
2664 ] whileTrue:[ |
2664 skipping := true. |
2665 c := c sender. |
2665 ]. |
2666 skipping := true. |
2666 [ |
2667 ]. |
2667 c notNil |
2668 [ |
2668 and:[ c receiver == OperatingSystem and:[ c selector == #unblockInterrupts ] ] |
2669 c notNil |
2669 ] whileTrue:[ |
2670 and:[ c receiver == OperatingSystem and:[ c selector == #unblockInterrupts ] ] |
2670 c := c sender. |
2671 ] whileTrue:[ |
2671 skipping := true. |
2672 c := c sender. |
2672 ]. |
2673 skipping := true. |
2673 [ |
2674 ]. |
2674 c notNil and:[ c isBlockContext ] |
2675 [ |
2675 ] whileTrue:[ |
2676 c notNil and:[ c isBlockContext ] |
2676 c := c home. |
2677 ] whileTrue:[ |
2677 skipping := true. |
2678 c := c home. |
2678 ]. |
2679 skipping := true. |
2679 ]. |
2680 ]. |
2680 c notNil ifTrue:[ |
2681 ]. |
2681 sel := c selector. |
2682 c notNil ifTrue:[ |
2682 sel isNil ifTrue:[ |
2683 sel := c selector. |
2683 sel := '* unknown *' |
2684 sel isNil ifTrue:[ |
2684 ]. |
2685 sel := '* unknown *' |
2685 r := c receiver. |
2686 ]. |
2686 rc := r class. |
2687 r := c receiver. |
2687 rs := rc name. |
2688 rc := r class. |
2688 (rc == SharedQueue |
2689 rs := rc name. |
2689 or:[rc == RecursionLock]) ifTrue:[ |
2690 (rc == SharedQueue |
2690 rs := rs , ' (', (r identityHash bitShift:-12) hexPrintString,') '. |
2691 or:[rc == RecursionLock]) ifTrue:[ |
2691 ]. |
2692 rs := rs , ' (', (r identityHash bitShift:-12) hexPrintString,') '. |
2692 ^ (rs , '>>' , sel). |
2693 ]. |
2693 ] |
2694 ^ (rs , '>>' , sel). |
|
2695 ] |
|
2696 ]. |
2694 ]. |
2697 ^ '' |
2695 ^ '' |
2698 |
2696 |
2699 "Modified: / 07-06-2007 / 22:53:40 / cg" |
2697 "Modified: / 07-06-2007 / 22:53:40 / cg" |
2700 ! ! |
2698 ! ! |
2701 |
2699 |
2702 !ProcessMonitorV2 methodsFor:'sorting'! |
2700 !ProcessMonitorV2 methodsFor:'sorting'! |
2703 |
2701 |
2704 sortProcessListBy:instanceName |
2702 sortProcessListBy:instanceName |
2705 "method to sort the list of BugReport" |
2703 "method to sort the list of BugReport" |
2706 |
2704 |
2707 | aSymbol isReverse cmpOp currentSortOrder| |
2705 | aSymbol isReverse cmpOp currentSortOrder| |
2708 |
2706 |
2709 aSymbol := instanceName asSymbol. |
2707 aSymbol := instanceName asSymbol. |
2710 isReverse := false. |
2708 isReverse := false. |
2711 currentSortOrder := self currentSortOrder value. |
2709 currentSortOrder := self currentSortOrder value. |
2712 currentSortOrder isEmpty ifTrue:[ |
2710 currentSortOrder isEmpty ifTrue:[ |
2713 currentSortOrder at:#column put:aSymbol. |
2711 currentSortOrder at:#column put:aSymbol. |
2714 currentSortOrder at:#reverse put:false. |
2712 currentSortOrder at:#reverse put:false. |
2715 ] ifFalse:[ |
2713 ] ifFalse:[ |
2716 (currentSortOrder at:#column) = aSymbol ifTrue:[ |
2714 (currentSortOrder at:#column) = aSymbol ifTrue:[ |
2717 "/ same column like before - change sort order ifReverse is true |
2715 "/ same column like before - change sort order ifReverse is true |
2718 isReverse := currentSortOrder at:#reverse. |
2716 isReverse := currentSortOrder at:#reverse. |
2719 currentSortOrder at:#reverse put:(isReverse not). |
2717 currentSortOrder at:#reverse put:(isReverse not). |
2720 ] ifFalse:[ |
2718 ] ifFalse:[ |
2721 "/ another column - remark column |
2719 "/ another column - remark column |
2722 currentSortOrder at:#column put:aSymbol. |
2720 currentSortOrder at:#column put:aSymbol. |
2723 ] |
2721 ] |
2724 ]. |
2722 ]. |
2725 (currentSortOrder at:#reverse) ifTrue:[ |
2723 (currentSortOrder at:#reverse) ifTrue:[ |
2726 cmpOp := #'>' |
2724 cmpOp := #'>' |
2727 ] ifFalse:[ |
2725 ] ifFalse:[ |
2728 cmpOp := #'<' |
2726 cmpOp := #'<' |
2729 ]. |
2727 ]. |
2730 sortBlock := [:a :b | |
2728 sortBlock := [:a :b | |
2731 |entry1 entry2| |
2729 |entry1 entry2| |
2732 |
2730 |
2733 entry1 := (a perform:aSymbol) ? 0. |
2731 entry1 := (a perform:aSymbol) ? 0. |
2734 entry2 := (b perform:aSymbol) ? 0. |
2732 entry2 := (b perform:aSymbol) ? 0. |
2735 entry1 = entry2 ifTrue:[ |
2733 entry1 = entry2 ifTrue:[ |
2736 (a idVal < 0 and:[b idVal < 0]) ifTrue:[ |
2734 (a idVal < 0 and:[b idVal < 0]) ifTrue:[ |
2737 "/ two dead ones (take anything which remains constant) |
2735 "/ two dead ones (take anything which remains constant) |
2738 a processName ~= b processName ifTrue:[ |
2736 a processName ~= b processName ifTrue:[ |
2739 a processName < b processName |
2737 a processName < b processName |
2740 ] ifFalse:[ |
2738 ] ifFalse:[ |
2741 a processInstance identityHash < b processInstance identityHash |
2739 a processInstance identityHash < b processInstance identityHash |
2742 ] |
2740 ] |
2743 ] ifFalse:[ |
2741 ] ifFalse:[ |
2744 a idVal < b idVal |
2742 a idVal < b idVal |
2745 ] |
2743 ] |
2746 ] ifFalse:[ |
2744 ] ifFalse:[ |
2747 entry1 perform:cmpOp with:entry2 |
2745 entry1 perform:cmpOp with:entry2 |
2748 ] |
2746 ] |
2749 ]. |
2747 ]. |
2750 self viewedColumnsChanged. |
2748 self viewedColumnsChanged. |
2751 ! ! |
2749 ! ! |
2752 |
2750 |
2753 !ProcessMonitorV2 methodsFor:'update process'! |
2751 !ProcessMonitorV2 methodsFor:'update process'! |
2754 |
2752 |
2755 fillItemInformationIn:processItem |
2753 fillItemInformationIn:processItem |
2756 |
2754 |
2757 | running con aProcess| |
2755 | running con aProcess| |
2758 |
2756 |
2759 aProcess := processItem processInstance. |
2757 aProcess := processItem processInstance. |
2760 aProcess isNil ifTrue:[ |
2758 aProcess isNil ifTrue:[ |
2761 ^ self. |
2759 ^ self. |
2762 ]. |
2760 ]. |
2763 |
2761 |
2764 processItem processId:aProcess id. |
2762 processItem processId:aProcess id. |
2765 processItem idVal:aProcess id ? -1. |
2763 processItem idVal:aProcess id ? -1. |
2766 |
2764 |
2849 oldItem weakArrayWithProcesses:newItem weakArrayWithProcesses. |
2847 oldItem weakArrayWithProcesses:newItem weakArrayWithProcesses. |
2850 oldItem processInstanceIndexInWeakArray:newItem processInstanceIndexInWeakArray. |
2848 oldItem processInstanceIndexInWeakArray:newItem processInstanceIndexInWeakArray. |
2851 |
2849 |
2852 "/ ID |
2850 "/ ID |
2853 oldItem processId ~= newItem processId ifTrue:[ |
2851 oldItem processId ~= newItem processId ifTrue:[ |
2854 oldItem processId:newItem processId. |
2852 oldItem processId:newItem processId. |
2855 processTable invalidateRowAt:index colAt:colIdx. |
2853 processTable invalidateRowAt:index colAt:colIdx. |
2856 ]. |
2854 ]. |
2857 |
2855 |
2858 "/ GROUP |
2856 "/ GROUP |
2859 self showGroup value ifTrue:[ |
2857 self showGroup value ifTrue:[ |
2860 colIdx := colIdx + 1. |
2858 colIdx := colIdx + 1. |
2861 oldItem processGroup ~= newItem processGroup ifTrue:[ |
2859 oldItem processGroup ~= newItem processGroup ifTrue:[ |
2862 oldItem processGroup:newItem processGroup. |
2860 oldItem processGroup:newItem processGroup. |
2863 processTable invalidateRowAt:index colAt:colIdx. |
2861 processTable invalidateRowAt:index colAt:colIdx. |
2864 ]. |
2862 ]. |
2865 ]. |
2863 ]. |
2866 |
2864 |
2867 "/ NAME |
2865 "/ NAME |
2868 colIdx := colIdx + 1. |
2866 colIdx := colIdx + 1. |
2869 oldItem processName ~= newItem processName ifTrue:[ |
2867 oldItem processName ~= newItem processName ifTrue:[ |
2870 oldItem processName:newItem processName. |
2868 oldItem processName:newItem processName. |
2871 processTable invalidateRowAt:index colAt:colIdx. |
2869 processTable invalidateRowAt:index colAt:colIdx. |
2872 ]. |
2870 ]. |
2873 |
2871 |
2874 "/ ACTIVE |
2872 "/ ACTIVE |
2875 colIdx := colIdx + 1. |
2873 colIdx := colIdx + 1. |
2876 oldItem processActive ~= newItem processActive ifTrue:[ |
2874 oldItem processActive ~= newItem processActive ifTrue:[ |
2877 oldItem processActive:newItem processActive. |
2875 oldItem processActive:newItem processActive. |
2878 "/ (processTable columnAt:colIdx). |
2876 "/ (processTable columnAt:colIdx). |
2879 processTable invalidateRowAt:index colAt:colIdx. |
2877 processTable invalidateRowAt:index colAt:colIdx. |
2880 ]. |
2878 ]. |
2881 |
2879 |
2882 "/ STATE |
2880 "/ STATE |
2883 self showState value ifTrue:[ |
2881 self showState value ifTrue:[ |
2884 colIdx := colIdx + 1. |
2882 colIdx := colIdx + 1. |
2885 oldItem processState ~= newItem processState ifTrue:[ |
2883 oldItem processState ~= newItem processState ifTrue:[ |
2886 oldItem processState:newItem processState. |
2884 oldItem processState:newItem processState. |
2887 "/ (processTable columnAt:colIdx). |
2885 "/ (processTable columnAt:colIdx). |
2888 processTable invalidateRowAt:index colAt:colIdx. |
2886 processTable invalidateRowAt:index colAt:colIdx. |
2889 ]. |
2887 ]. |
2890 ]. |
2888 ]. |
2891 |
2889 |
2892 "/ PRIO |
2890 "/ PRIO |
2893 self showPrio value ifTrue:[ |
2891 self showPrio value ifTrue:[ |
2894 colIdx := colIdx + 1. |
2892 colIdx := colIdx + 1. |
2895 oldItem processPrio ~= newItem processPrio ifTrue:[ |
2893 oldItem processPrio ~= newItem processPrio ifTrue:[ |
2896 oldItem processPrio:newItem processPrio. |
2894 oldItem processPrio:newItem processPrio. |
2897 processTable invalidateRowAt:index colAt:colIdx. |
2895 processTable invalidateRowAt:index colAt:colIdx. |
2898 ]. |
2896 ]. |
2899 ]. |
2897 ]. |
2900 |
2898 |
2901 "/ USED STACK |
2899 "/ USED STACK |
2902 self showUsedStack value ifTrue:[ |
2900 self showUsedStack value ifTrue:[ |
2903 colIdx := colIdx + 1. |
2901 colIdx := colIdx + 1. |
2904 oldItem processUsedStack ~= newItem processUsedStack ifTrue:[ |
2902 oldItem processUsedStack ~= newItem processUsedStack ifTrue:[ |
2905 oldItem processUsedStack:newItem processUsedStack. |
2903 oldItem processUsedStack:newItem processUsedStack. |
2906 processTable invalidateRowAt:index colAt:colIdx. |
2904 processTable invalidateRowAt:index colAt:colIdx. |
2907 ]. |
2905 ]. |
2908 ]. |
2906 ]. |
2909 |
2907 |
2910 "/ TOTAL STACK |
2908 "/ TOTAL STACK |
2911 self showTotalStack value ifTrue:[ |
2909 self showTotalStack value ifTrue:[ |
2912 colIdx := colIdx + 1. |
2910 colIdx := colIdx + 1. |
2913 oldItem processTotalStack ~= newItem processTotalStack ifTrue:[ |
2911 oldItem processTotalStack ~= newItem processTotalStack ifTrue:[ |
2914 oldItem processTotalStack:newItem processTotalStack. |
2912 oldItem processTotalStack:newItem processTotalStack. |
2915 processTable invalidateRowAt:index colAt:colIdx. |
2913 processTable invalidateRowAt:index colAt:colIdx. |
2916 ]. |
2914 ]. |
2917 ]. |
2915 ]. |
2918 |
2916 |
2919 "/ CURRENT SEGMENT |
2917 "/ CURRENT SEGMENT |
2920 self showCurrentSegment value ifTrue:[ |
2918 self showCurrentSegment value ifTrue:[ |
2921 colIdx := colIdx + 1. |
2919 colIdx := colIdx + 1. |
2922 oldItem processCurrentSegment ~= newItem processCurrentSegment ifTrue:[ |
2920 oldItem processCurrentSegment ~= newItem processCurrentSegment ifTrue:[ |
2923 oldItem processCurrentSegment:newItem processCurrentSegment. |
2921 oldItem processCurrentSegment:newItem processCurrentSegment. |
2924 processTable invalidateRowAt:index colAt:colIdx. |
2922 processTable invalidateRowAt:index colAt:colIdx. |
2925 ]. |
2923 ]. |
2926 ]. |
2924 ]. |
2927 |
2925 |
2928 "/ Switch |
2926 "/ Switch |
2929 self showSwitch value ifTrue:[ |
2927 self showSwitch value ifTrue:[ |
2930 colIdx := colIdx + 1. |
2928 colIdx := colIdx + 1. |
2931 oldItem processSwitch ~= newItem processSwitch ifTrue:[ |
2929 oldItem processSwitch ~= newItem processSwitch ifTrue:[ |
2932 oldItem processSwitch:newItem processSwitch. |
2930 oldItem processSwitch:newItem processSwitch. |
2933 processTable invalidateRowAt:index colAt:colIdx. |
2931 processTable invalidateRowAt:index colAt:colIdx. |
2934 ]. |
2932 ]. |
2935 ]. |
2933 ]. |
2936 |
2934 |
2937 "/ WHERE |
2935 "/ WHERE |
2938 self showWhere value ifTrue:[ |
2936 self showWhere value ifTrue:[ |
2939 colIdx := colIdx + 1. |
2937 colIdx := colIdx + 1. |
2940 oldItem processWhere ~= newItem processWhere ifTrue:[ |
2938 oldItem processWhere ~= newItem processWhere ifTrue:[ |
2941 oldItem processWhere:newItem processWhere. |
2939 oldItem processWhere:newItem processWhere. |
2942 processTable invalidateRowAt:index colAt:colIdx. |
2940 processTable invalidateRowAt:index colAt:colIdx. |
2943 ]. |
2941 ]. |
2944 ]. |
2942 ]. |
2945 |
2943 |
2946 "Modified: / 19-03-2007 / 10:28:27 / cg" |
2944 "Modified: / 19-03-2007 / 10:28:27 / cg" |
2947 ! |
2945 ! |
2948 |
2946 |
2949 updateList |
2947 updateList |
2950 |
2948 |
2951 |newList| |
2949 |newList| |
2952 |
2950 |
2953 processTable shown ifTrue:[ |
2951 processTable shown ifTrue:[ |
2954 newList := self getProcessList. |
2952 newList := self getProcessList. |
2955 visibleBlock notNil ifTrue:[ |
2953 visibleBlock notNil ifTrue:[ |
2956 newList := newList select:[:aProc|visibleBlock value:aProc] |
2954 newList := newList select:[:aProc|visibleBlock value:aProc] |
2957 ]. |
2955 ]. |
2958 self updateStatus:newList. |
2956 self updateStatus:newList. |
2959 ]. |
2957 ]. |
2960 updateBlock notNil ifTrue:[ |
2958 updateBlock notNil ifTrue:[ |
2961 Processor removeTimedBlock:listUpdateBlock. |
2959 Processor removeTimedBlock:listUpdateBlock. |
2962 Processor addTimedBlock:listUpdateBlock afterSeconds:self scaledUpdateListDelayTime. |
2960 Processor addTimedBlock:listUpdateBlock afterSeconds:self scaledUpdateListDelayTime. |
2963 ]. |
2961 ]. |
2964 ! |
2962 ! |
2965 |
2963 |
2966 updateStatus:newProcessList |
2964 updateStatus:newProcessList |
2967 |
2965 |
2968 |startTime endTime deltaT| |
2966 |startTime endTime deltaT| |
2969 |
2967 |
2970 |
2968 |
2971 startTime := Timestamp now. |
2969 startTime := Timestamp now. |
2972 updateSema critical:[ |
2970 updateSema critical:[ |
2973 self updateTable:newProcessList. |
2971 self updateTable:newProcessList. |
2974 ]. |
2972 ]. |
2975 |
2973 |
2976 endTime := Timestamp now. |
2974 endTime := Timestamp now. |
2977 deltaT := (endTime millisecondDeltaFrom:startTime) / 1000.0. |
2975 deltaT := (endTime millisecondDeltaFrom:startTime) / 1000.0. |
2978 "/ Transcript show:deltaT; show:' ' ; showCR:(self scaledUpdateContentsDelayTime / 10.0). |
2976 "/ Transcript show:deltaT; show:' ' ; showCR:(self scaledUpdateContentsDelayTime / 10.0). |
2979 deltaT > (self scaledUpdateContentsDelayTime / 5) ifTrue:[ |
2977 deltaT > (self scaledUpdateContentsDelayTime / 5) ifTrue:[ |
2980 "/ the update took longer than 20% - make delay longer, to reduce cpu load. |
2978 "/ the update took longer than 20% - make delay longer, to reduce cpu load. |
2981 self updateContentsDelayTime value:(self scaledUpdateContentsDelayTime * 2). |
2979 self updateContentsDelayTime value:(self scaledUpdateContentsDelayTime * 2). |
2982 "/ Transcript show:'+++ '; showCR:self scaledUpdateContentsDelayTime. |
2980 "/ Transcript show:'+++ '; showCR:self scaledUpdateContentsDelayTime. |
2983 ] ifFalse:[ |
2981 ] ifFalse:[ |
2984 "/ self scaledUpdateContentsDelayTime > 0.5 ifTrue:[ |
2982 "/ self scaledUpdateContentsDelayTime > 0.5 ifTrue:[ |
2985 "/ deltaT < (self scaledUpdateContentsDelayTime / 20) ifTrue:[ |
2983 "/ deltaT < (self scaledUpdateContentsDelayTime / 20) ifTrue:[ |
2986 "/ "/ the update took less than 5% - make delay smaller for better animation. |
2984 "/ "/ the update took less than 5% - make delay smaller for better animation. |
2987 "/ self updateContentsDelayTime value:((self scaledUpdateContentsDelayTime / 2) max:0.5). |
2985 "/ self updateContentsDelayTime value:((self scaledUpdateContentsDelayTime / 2) max:0.5). |
2988 "/ "/ Transcript show:'--- ';showCR:self scaledUpdateContentsDelayTime. |
2986 "/ "/ Transcript show:'--- ';showCR:self scaledUpdateContentsDelayTime. |
2989 "/ ]. |
2987 "/ ]. |
2990 "/ ]. |
2988 "/ ]. |
2991 ]. |
2989 ]. |
2992 updateBlock notNil ifTrue:[ |
2990 updateBlock notNil ifTrue:[ |
2993 Processor removeTimedBlock:updateBlock. |
2991 Processor removeTimedBlock:updateBlock. |
2994 Processor addTimedBlock:updateBlock afterSeconds:self scaledUpdateContentsDelayTime. |
2992 Processor addTimedBlock:updateBlock afterSeconds:self scaledUpdateContentsDelayTime. |
2995 ] |
2993 ] |
2996 ! |
2994 ! |
2997 |
2995 |
2998 updateTable:newProcessList |
2996 updateTable:newProcessList |
2999 |oldSelection newList sel diff weakProcessList| |
2997 |oldSelection newList sel diff weakProcessList| |
3000 |
2998 |
3001 processTable shown ifTrue:[ |
2999 processTable shown ifTrue:[ |
3002 "/ Transcript showCR:('update the table', Timestamp now printString, 'with new list:', newProcessList notNil asString). |
3000 "/ Transcript showCR:('update the table', Timestamp now printString, 'with new list:', newProcessList notNil asString). |
3003 sel := self selectedProcesses value. |
3001 sel := self selectedProcesses value. |
3004 sel notNil ifTrue:[ |
3002 sel notNil ifTrue:[ |
3005 oldSelection := OrderedCollection new. |
3003 oldSelection := OrderedCollection new. |
3006 sel do:[:proItem| |
3004 sel do:[:proItem| |
3007 proItem processInstance notNil ifTrue:[ |
3005 proItem processInstance notNil ifTrue:[ |
3008 oldSelection add:(proItem processInstance) |
3006 oldSelection add:(proItem processInstance) |
3009 ]. |
3007 ]. |
3010 ]. |
3008 ]. |
3011 ]. |
3009 ]. |
3012 "/ Transcript showCR:'oldSelection on catch in updateTable: ', (oldSelection isEmptyOrNil ifTrue:['nil'] ifFalse:[oldSelection first printString]). |
3010 "/ Transcript showCR:'oldSelection on catch in updateTable: ', (oldSelection isEmptyOrNil ifTrue:['nil'] ifFalse:[oldSelection first printString]). |
3013 newProcessList isNil ifTrue:[ |
3011 newProcessList isNil ifTrue:[ |
3014 newList := OrderedCollection new. |
3012 newList := OrderedCollection new. |
3015 processList do:[:oldItem | |
3013 processList do:[:oldItem | |
3016 | newItem | |
3014 | newItem | |
3017 (self showDead value |
3015 (self showDead value |
3018 or:[oldItem processInstance notNil |
3016 or:[oldItem processInstance notNil |
3019 and:[oldItem processInstance isDead not]]) ifTrue:[ |
3017 and:[oldItem processInstance isDead not]]) ifTrue:[ |
3020 newItem := oldItem copy. |
3018 newItem := oldItem copy. |
3021 self fillItemInformationIn:newItem. |
3019 self fillItemInformationIn:newItem. |
3022 newList add:newItem. |
3020 newList add:newItem. |
3023 ] |
3021 ] |
3024 ]. |
3022 ]. |
3025 ] ifFalse:[ |
3023 ] ifFalse:[ |
3026 "/ remove dead processes if not shown |
3024 "/ remove dead processes if not shown |
3027 newList := OrderedCollection new. |
3025 newList := OrderedCollection new. |
3028 weakProcessList := WeakArray withAll:newProcessList. |
3026 weakProcessList := WeakArray withAll:newProcessList. |
3029 weakProcessList keysAndValuesDo:[:indexInWeakArray :procOrNilOrZero | |
3027 weakProcessList keysAndValuesDo:[:indexInWeakArray :procOrNilOrZero | |
3030 "/ in a weakarray, dead entries are 0 |
3028 "/ in a weakarray, dead entries are 0 |
3031 (procOrNilOrZero notNil and:[procOrNilOrZero ~~ 0]) ifTrue:[ |
3029 (procOrNilOrZero notNil and:[procOrNilOrZero ~~ 0]) ifTrue:[ |
3032 (procOrNilOrZero isDead not or:[self showDead value]) ifTrue:[ |
3030 (procOrNilOrZero isDead not or:[self showDead value]) ifTrue:[ |
3033 | processItem | |
3031 | processItem | |
3034 processItem := ProcessItem new. |
3032 processItem := ProcessItem new. |
3035 self fillItemInformationIn:processItem with:procOrNilOrZero inArray:weakProcessList atIndex:indexInWeakArray. |
3033 self fillItemInformationIn:processItem with:procOrNilOrZero inArray:weakProcessList atIndex:indexInWeakArray. |
3036 newList add:processItem. |
3034 newList add:processItem. |
3037 ] |
3035 ] |
3038 ] |
3036 ] |
3039 ]. |
3037 ]. |
3040 ]. |
3038 ]. |
3041 newList sort:self sortBlock. |
3039 newList sort:self sortBlock. |
3042 newList doWithIndex:[:newItem :index| |
3040 newList doWithIndex:[:newItem :index| |
3043 | oldItem | |
3041 | oldItem | |
3044 oldItem := processList at:index ifAbsent:nil. |
3042 oldItem := processList at:index ifAbsent:nil. |
3045 oldItem isNil ifTrue:[ |
3043 oldItem isNil ifTrue:[ |
3046 processList add:newItem beforeIndex:index |
3044 processList add:newItem beforeIndex:index |
3047 ] ifFalse:[ |
3045 ] ifFalse:[ |
3048 self updateChangedItem:oldItem newItem:newItem atIndex:index |
3046 self updateChangedItem:oldItem newItem:newItem atIndex:index |
3049 ] |
3047 ] |
3050 ]. |
3048 ]. |
3051 diff := processList size - newList size. |
3049 diff := processList size - newList size. |
3052 diff > 0 ifTrue:[ |
3050 diff > 0 ifTrue:[ |
3053 processList removeLast:diff |
3051 processList removeLast:diff |
3054 ]. |
3052 ]. |
3055 "/ Transcript showCR:'oldSelection on set in updateTable: ', (oldSelection isEmptyOrNil ifTrue:['nil'] ifFalse:[oldSelection first printString]). |
3053 "/ Transcript showCR:'oldSelection on set in updateTable: ', (oldSelection isEmptyOrNil ifTrue:['nil'] ifFalse:[oldSelection first printString]). |
3056 self changeSelectionToProcesses:oldSelection. |
3054 self changeSelectionToProcesses:oldSelection. |
3057 ]. |
3055 ]. |
3058 ! ! |
3056 ! ! |
3059 |
3057 |
3060 !ProcessMonitorV2::ProcessItem methodsFor:'accessing'! |
3058 !ProcessMonitorV2::ProcessItem methodsFor:'accessing'! |
3061 |
3059 |