Best JavaScript code snippet using ladle
many-actions.gyp
Source:many-actions.gyp
1# Copyright (c) 2012 Google Inc. All rights reserved.2# Use of this source code is governed by a BSD-style license that can be3# found in the LICENSE file.4{5 'target_defaults': {6 'msvs_cygwin_dirs': ['../../../../<(DEPTH)/third_party/cygwin'],7 },8 'targets': [9 {10 'target_name': 'a',11 'type': 'none',12 'actions': [13 {14 'action_name': 'do_0',15 'inputs': [],16 'outputs': ['<(PRODUCT_DIR)/generated_0.h'],17 'action': [18 'touch',19 '<(PRODUCT_DIR)/generated_0.h',20 ],21 },22 {23 'action_name': 'do_1',24 'inputs': [],25 'outputs': ['<(PRODUCT_DIR)/generated_1.h'],26 'action': [27 'touch',28 '<(PRODUCT_DIR)/generated_1.h',29 ],30 },31 {32 'action_name': 'do_2',33 'inputs': [],34 'outputs': ['<(PRODUCT_DIR)/generated_2.h'],35 'action': [36 'touch',37 '<(PRODUCT_DIR)/generated_2.h',38 ],39 },40 {41 'action_name': 'do_3',42 'inputs': [],43 'outputs': ['<(PRODUCT_DIR)/generated_3.h'],44 'action': [45 'touch',46 '<(PRODUCT_DIR)/generated_3.h',47 ],48 },49 {50 'action_name': 'do_4',51 'inputs': [],52 'outputs': ['<(PRODUCT_DIR)/generated_4.h'],53 'action': [54 'touch',55 '<(PRODUCT_DIR)/generated_4.h',56 ],57 },58 {59 'action_name': 'do_5',60 'inputs': [],61 'outputs': ['<(PRODUCT_DIR)/generated_5.h'],62 'action': [63 'touch',64 '<(PRODUCT_DIR)/generated_5.h',65 ],66 },67 {68 'action_name': 'do_6',69 'inputs': [],70 'outputs': ['<(PRODUCT_DIR)/generated_6.h'],71 'action': [72 'touch',73 '<(PRODUCT_DIR)/generated_6.h',74 ],75 },76 {77 'action_name': 'do_7',78 'inputs': [],79 'outputs': ['<(PRODUCT_DIR)/generated_7.h'],80 'action': [81 'touch',82 '<(PRODUCT_DIR)/generated_7.h',83 ],84 },85 {86 'action_name': 'do_8',87 'inputs': [],88 'outputs': ['<(PRODUCT_DIR)/generated_8.h'],89 'action': [90 'touch',91 '<(PRODUCT_DIR)/generated_8.h',92 ],93 },94 {95 'action_name': 'do_9',96 'inputs': [],97 'outputs': ['<(PRODUCT_DIR)/generated_9.h'],98 'action': [99 'touch',100 '<(PRODUCT_DIR)/generated_9.h',101 ],102 },103 {104 'action_name': 'do_10',105 'inputs': [],106 'outputs': ['<(PRODUCT_DIR)/generated_10.h'],107 'action': [108 'touch',109 '<(PRODUCT_DIR)/generated_10.h',110 ],111 },112 {113 'action_name': 'do_11',114 'inputs': [],115 'outputs': ['<(PRODUCT_DIR)/generated_11.h'],116 'action': [117 'touch',118 '<(PRODUCT_DIR)/generated_11.h',119 ],120 },121 {122 'action_name': 'do_12',123 'inputs': [],124 'outputs': ['<(PRODUCT_DIR)/generated_12.h'],125 'action': [126 'touch',127 '<(PRODUCT_DIR)/generated_12.h',128 ],129 },130 {131 'action_name': 'do_13',132 'inputs': [],133 'outputs': ['<(PRODUCT_DIR)/generated_13.h'],134 'action': [135 'touch',136 '<(PRODUCT_DIR)/generated_13.h',137 ],138 },139 {140 'action_name': 'do_14',141 'inputs': [],142 'outputs': ['<(PRODUCT_DIR)/generated_14.h'],143 'action': [144 'touch',145 '<(PRODUCT_DIR)/generated_14.h',146 ],147 },148 {149 'action_name': 'do_15',150 'inputs': [],151 'outputs': ['<(PRODUCT_DIR)/generated_15.h'],152 'action': [153 'touch',154 '<(PRODUCT_DIR)/generated_15.h',155 ],156 },157 {158 'action_name': 'do_16',159 'inputs': [],160 'outputs': ['<(PRODUCT_DIR)/generated_16.h'],161 'action': [162 'touch',163 '<(PRODUCT_DIR)/generated_16.h',164 ],165 },166 {167 'action_name': 'do_17',168 'inputs': [],169 'outputs': ['<(PRODUCT_DIR)/generated_17.h'],170 'action': [171 'touch',172 '<(PRODUCT_DIR)/generated_17.h',173 ],174 },175 {176 'action_name': 'do_18',177 'inputs': [],178 'outputs': ['<(PRODUCT_DIR)/generated_18.h'],179 'action': [180 'touch',181 '<(PRODUCT_DIR)/generated_18.h',182 ],183 },184 {185 'action_name': 'do_19',186 'inputs': [],187 'outputs': ['<(PRODUCT_DIR)/generated_19.h'],188 'action': [189 'touch',190 '<(PRODUCT_DIR)/generated_19.h',191 ],192 },193 {194 'action_name': 'do_20',195 'inputs': [],196 'outputs': ['<(PRODUCT_DIR)/generated_20.h'],197 'action': [198 'touch',199 '<(PRODUCT_DIR)/generated_20.h',200 ],201 },202 {203 'action_name': 'do_21',204 'inputs': [],205 'outputs': ['<(PRODUCT_DIR)/generated_21.h'],206 'action': [207 'touch',208 '<(PRODUCT_DIR)/generated_21.h',209 ],210 },211 {212 'action_name': 'do_22',213 'inputs': [],214 'outputs': ['<(PRODUCT_DIR)/generated_22.h'],215 'action': [216 'touch',217 '<(PRODUCT_DIR)/generated_22.h',218 ],219 },220 {221 'action_name': 'do_23',222 'inputs': [],223 'outputs': ['<(PRODUCT_DIR)/generated_23.h'],224 'action': [225 'touch',226 '<(PRODUCT_DIR)/generated_23.h',227 ],228 },229 {230 'action_name': 'do_24',231 'inputs': [],232 'outputs': ['<(PRODUCT_DIR)/generated_24.h'],233 'action': [234 'touch',235 '<(PRODUCT_DIR)/generated_24.h',236 ],237 },238 {239 'action_name': 'do_25',240 'inputs': [],241 'outputs': ['<(PRODUCT_DIR)/generated_25.h'],242 'action': [243 'touch',244 '<(PRODUCT_DIR)/generated_25.h',245 ],246 },247 {248 'action_name': 'do_26',249 'inputs': [],250 'outputs': ['<(PRODUCT_DIR)/generated_26.h'],251 'action': [252 'touch',253 '<(PRODUCT_DIR)/generated_26.h',254 ],255 },256 {257 'action_name': 'do_27',258 'inputs': [],259 'outputs': ['<(PRODUCT_DIR)/generated_27.h'],260 'action': [261 'touch',262 '<(PRODUCT_DIR)/generated_27.h',263 ],264 },265 {266 'action_name': 'do_28',267 'inputs': [],268 'outputs': ['<(PRODUCT_DIR)/generated_28.h'],269 'action': [270 'touch',271 '<(PRODUCT_DIR)/generated_28.h',272 ],273 },274 {275 'action_name': 'do_29',276 'inputs': [],277 'outputs': ['<(PRODUCT_DIR)/generated_29.h'],278 'action': [279 'touch',280 '<(PRODUCT_DIR)/generated_29.h',281 ],282 },283 {284 'action_name': 'do_30',285 'inputs': [],286 'outputs': ['<(PRODUCT_DIR)/generated_30.h'],287 'action': [288 'touch',289 '<(PRODUCT_DIR)/generated_30.h',290 ],291 },292 {293 'action_name': 'do_31',294 'inputs': [],295 'outputs': ['<(PRODUCT_DIR)/generated_31.h'],296 'action': [297 'touch',298 '<(PRODUCT_DIR)/generated_31.h',299 ],300 },301 {302 'action_name': 'do_32',303 'inputs': [],304 'outputs': ['<(PRODUCT_DIR)/generated_32.h'],305 'action': [306 'touch',307 '<(PRODUCT_DIR)/generated_32.h',308 ],309 },310 {311 'action_name': 'do_33',312 'inputs': [],313 'outputs': ['<(PRODUCT_DIR)/generated_33.h'],314 'action': [315 'touch',316 '<(PRODUCT_DIR)/generated_33.h',317 ],318 },319 {320 'action_name': 'do_34',321 'inputs': [],322 'outputs': ['<(PRODUCT_DIR)/generated_34.h'],323 'action': [324 'touch',325 '<(PRODUCT_DIR)/generated_34.h',326 ],327 },328 {329 'action_name': 'do_35',330 'inputs': [],331 'outputs': ['<(PRODUCT_DIR)/generated_35.h'],332 'action': [333 'touch',334 '<(PRODUCT_DIR)/generated_35.h',335 ],336 },337 {338 'action_name': 'do_36',339 'inputs': [],340 'outputs': ['<(PRODUCT_DIR)/generated_36.h'],341 'action': [342 'touch',343 '<(PRODUCT_DIR)/generated_36.h',344 ],345 },346 {347 'action_name': 'do_37',348 'inputs': [],349 'outputs': ['<(PRODUCT_DIR)/generated_37.h'],350 'action': [351 'touch',352 '<(PRODUCT_DIR)/generated_37.h',353 ],354 },355 {356 'action_name': 'do_38',357 'inputs': [],358 'outputs': ['<(PRODUCT_DIR)/generated_38.h'],359 'action': [360 'touch',361 '<(PRODUCT_DIR)/generated_38.h',362 ],363 },364 {365 'action_name': 'do_39',366 'inputs': [],367 'outputs': ['<(PRODUCT_DIR)/generated_39.h'],368 'action': [369 'touch',370 '<(PRODUCT_DIR)/generated_39.h',371 ],372 },373 {374 'action_name': 'do_40',375 'inputs': [],376 'outputs': ['<(PRODUCT_DIR)/generated_40.h'],377 'action': [378 'touch',379 '<(PRODUCT_DIR)/generated_40.h',380 ],381 },382 {383 'action_name': 'do_41',384 'inputs': [],385 'outputs': ['<(PRODUCT_DIR)/generated_41.h'],386 'action': [387 'touch',388 '<(PRODUCT_DIR)/generated_41.h',389 ],390 },391 {392 'action_name': 'do_42',393 'inputs': [],394 'outputs': ['<(PRODUCT_DIR)/generated_42.h'],395 'action': [396 'touch',397 '<(PRODUCT_DIR)/generated_42.h',398 ],399 },400 {401 'action_name': 'do_43',402 'inputs': [],403 'outputs': ['<(PRODUCT_DIR)/generated_43.h'],404 'action': [405 'touch',406 '<(PRODUCT_DIR)/generated_43.h',407 ],408 },409 {410 'action_name': 'do_44',411 'inputs': [],412 'outputs': ['<(PRODUCT_DIR)/generated_44.h'],413 'action': [414 'touch',415 '<(PRODUCT_DIR)/generated_44.h',416 ],417 },418 {419 'action_name': 'do_45',420 'inputs': [],421 'outputs': ['<(PRODUCT_DIR)/generated_45.h'],422 'action': [423 'touch',424 '<(PRODUCT_DIR)/generated_45.h',425 ],426 },427 {428 'action_name': 'do_46',429 'inputs': [],430 'outputs': ['<(PRODUCT_DIR)/generated_46.h'],431 'action': [432 'touch',433 '<(PRODUCT_DIR)/generated_46.h',434 ],435 },436 {437 'action_name': 'do_47',438 'inputs': [],439 'outputs': ['<(PRODUCT_DIR)/generated_47.h'],440 'action': [441 'touch',442 '<(PRODUCT_DIR)/generated_47.h',443 ],444 },445 {446 'action_name': 'do_48',447 'inputs': [],448 'outputs': ['<(PRODUCT_DIR)/generated_48.h'],449 'action': [450 'touch',451 '<(PRODUCT_DIR)/generated_48.h',452 ],453 },454 {455 'action_name': 'do_49',456 'inputs': [],457 'outputs': ['<(PRODUCT_DIR)/generated_49.h'],458 'action': [459 'touch',460 '<(PRODUCT_DIR)/generated_49.h',461 ],462 },463 {464 'action_name': 'do_50',465 'inputs': [],466 'outputs': ['<(PRODUCT_DIR)/generated_50.h'],467 'action': [468 'touch',469 '<(PRODUCT_DIR)/generated_50.h',470 ],471 },472 {473 'action_name': 'do_51',474 'inputs': [],475 'outputs': ['<(PRODUCT_DIR)/generated_51.h'],476 'action': [477 'touch',478 '<(PRODUCT_DIR)/generated_51.h',479 ],480 },481 {482 'action_name': 'do_52',483 'inputs': [],484 'outputs': ['<(PRODUCT_DIR)/generated_52.h'],485 'action': [486 'touch',487 '<(PRODUCT_DIR)/generated_52.h',488 ],489 },490 {491 'action_name': 'do_53',492 'inputs': [],493 'outputs': ['<(PRODUCT_DIR)/generated_53.h'],494 'action': [495 'touch',496 '<(PRODUCT_DIR)/generated_53.h',497 ],498 },499 {500 'action_name': 'do_54',501 'inputs': [],502 'outputs': ['<(PRODUCT_DIR)/generated_54.h'],503 'action': [504 'touch',505 '<(PRODUCT_DIR)/generated_54.h',506 ],507 },508 {509 'action_name': 'do_55',510 'inputs': [],511 'outputs': ['<(PRODUCT_DIR)/generated_55.h'],512 'action': [513 'touch',514 '<(PRODUCT_DIR)/generated_55.h',515 ],516 },517 {518 'action_name': 'do_56',519 'inputs': [],520 'outputs': ['<(PRODUCT_DIR)/generated_56.h'],521 'action': [522 'touch',523 '<(PRODUCT_DIR)/generated_56.h',524 ],525 },526 {527 'action_name': 'do_57',528 'inputs': [],529 'outputs': ['<(PRODUCT_DIR)/generated_57.h'],530 'action': [531 'touch',532 '<(PRODUCT_DIR)/generated_57.h',533 ],534 },535 {536 'action_name': 'do_58',537 'inputs': [],538 'outputs': ['<(PRODUCT_DIR)/generated_58.h'],539 'action': [540 'touch',541 '<(PRODUCT_DIR)/generated_58.h',542 ],543 },544 {545 'action_name': 'do_59',546 'inputs': [],547 'outputs': ['<(PRODUCT_DIR)/generated_59.h'],548 'action': [549 'touch',550 '<(PRODUCT_DIR)/generated_59.h',551 ],552 },553 {554 'action_name': 'do_60',555 'inputs': [],556 'outputs': ['<(PRODUCT_DIR)/generated_60.h'],557 'action': [558 'touch',559 '<(PRODUCT_DIR)/generated_60.h',560 ],561 },562 {563 'action_name': 'do_61',564 'inputs': [],565 'outputs': ['<(PRODUCT_DIR)/generated_61.h'],566 'action': [567 'touch',568 '<(PRODUCT_DIR)/generated_61.h',569 ],570 },571 {572 'action_name': 'do_62',573 'inputs': [],574 'outputs': ['<(PRODUCT_DIR)/generated_62.h'],575 'action': [576 'touch',577 '<(PRODUCT_DIR)/generated_62.h',578 ],579 },580 {581 'action_name': 'do_63',582 'inputs': [],583 'outputs': ['<(PRODUCT_DIR)/generated_63.h'],584 'action': [585 'touch',586 '<(PRODUCT_DIR)/generated_63.h',587 ],588 },589 {590 'action_name': 'do_64',591 'inputs': [],592 'outputs': ['<(PRODUCT_DIR)/generated_64.h'],593 'action': [594 'touch',595 '<(PRODUCT_DIR)/generated_64.h',596 ],597 },598 {599 'action_name': 'do_65',600 'inputs': [],601 'outputs': ['<(PRODUCT_DIR)/generated_65.h'],602 'action': [603 'touch',604 '<(PRODUCT_DIR)/generated_65.h',605 ],606 },607 {608 'action_name': 'do_66',609 'inputs': [],610 'outputs': ['<(PRODUCT_DIR)/generated_66.h'],611 'action': [612 'touch',613 '<(PRODUCT_DIR)/generated_66.h',614 ],615 },616 {617 'action_name': 'do_67',618 'inputs': [],619 'outputs': ['<(PRODUCT_DIR)/generated_67.h'],620 'action': [621 'touch',622 '<(PRODUCT_DIR)/generated_67.h',623 ],624 },625 {626 'action_name': 'do_68',627 'inputs': [],628 'outputs': ['<(PRODUCT_DIR)/generated_68.h'],629 'action': [630 'touch',631 '<(PRODUCT_DIR)/generated_68.h',632 ],633 },634 {635 'action_name': 'do_69',636 'inputs': [],637 'outputs': ['<(PRODUCT_DIR)/generated_69.h'],638 'action': [639 'touch',640 '<(PRODUCT_DIR)/generated_69.h',641 ],642 },643 {644 'action_name': 'do_70',645 'inputs': [],646 'outputs': ['<(PRODUCT_DIR)/generated_70.h'],647 'action': [648 'touch',649 '<(PRODUCT_DIR)/generated_70.h',650 ],651 },652 {653 'action_name': 'do_71',654 'inputs': [],655 'outputs': ['<(PRODUCT_DIR)/generated_71.h'],656 'action': [657 'touch',658 '<(PRODUCT_DIR)/generated_71.h',659 ],660 },661 {662 'action_name': 'do_72',663 'inputs': [],664 'outputs': ['<(PRODUCT_DIR)/generated_72.h'],665 'action': [666 'touch',667 '<(PRODUCT_DIR)/generated_72.h',668 ],669 },670 {671 'action_name': 'do_73',672 'inputs': [],673 'outputs': ['<(PRODUCT_DIR)/generated_73.h'],674 'action': [675 'touch',676 '<(PRODUCT_DIR)/generated_73.h',677 ],678 },679 {680 'action_name': 'do_74',681 'inputs': [],682 'outputs': ['<(PRODUCT_DIR)/generated_74.h'],683 'action': [684 'touch',685 '<(PRODUCT_DIR)/generated_74.h',686 ],687 },688 {689 'action_name': 'do_75',690 'inputs': [],691 'outputs': ['<(PRODUCT_DIR)/generated_75.h'],692 'action': [693 'touch',694 '<(PRODUCT_DIR)/generated_75.h',695 ],696 },697 {698 'action_name': 'do_76',699 'inputs': [],700 'outputs': ['<(PRODUCT_DIR)/generated_76.h'],701 'action': [702 'touch',703 '<(PRODUCT_DIR)/generated_76.h',704 ],705 },706 {707 'action_name': 'do_77',708 'inputs': [],709 'outputs': ['<(PRODUCT_DIR)/generated_77.h'],710 'action': [711 'touch',712 '<(PRODUCT_DIR)/generated_77.h',713 ],714 },715 {716 'action_name': 'do_78',717 'inputs': [],718 'outputs': ['<(PRODUCT_DIR)/generated_78.h'],719 'action': [720 'touch',721 '<(PRODUCT_DIR)/generated_78.h',722 ],723 },724 {725 'action_name': 'do_79',726 'inputs': [],727 'outputs': ['<(PRODUCT_DIR)/generated_79.h'],728 'action': [729 'touch',730 '<(PRODUCT_DIR)/generated_79.h',731 ],732 },733 {734 'action_name': 'do_80',735 'inputs': [],736 'outputs': ['<(PRODUCT_DIR)/generated_80.h'],737 'action': [738 'touch',739 '<(PRODUCT_DIR)/generated_80.h',740 ],741 },742 {743 'action_name': 'do_81',744 'inputs': [],745 'outputs': ['<(PRODUCT_DIR)/generated_81.h'],746 'action': [747 'touch',748 '<(PRODUCT_DIR)/generated_81.h',749 ],750 },751 {752 'action_name': 'do_82',753 'inputs': [],754 'outputs': ['<(PRODUCT_DIR)/generated_82.h'],755 'action': [756 'touch',757 '<(PRODUCT_DIR)/generated_82.h',758 ],759 },760 {761 'action_name': 'do_83',762 'inputs': [],763 'outputs': ['<(PRODUCT_DIR)/generated_83.h'],764 'action': [765 'touch',766 '<(PRODUCT_DIR)/generated_83.h',767 ],768 },769 {770 'action_name': 'do_84',771 'inputs': [],772 'outputs': ['<(PRODUCT_DIR)/generated_84.h'],773 'action': [774 'touch',775 '<(PRODUCT_DIR)/generated_84.h',776 ],777 },778 {779 'action_name': 'do_85',780 'inputs': [],781 'outputs': ['<(PRODUCT_DIR)/generated_85.h'],782 'action': [783 'touch',784 '<(PRODUCT_DIR)/generated_85.h',785 ],786 },787 {788 'action_name': 'do_86',789 'inputs': [],790 'outputs': ['<(PRODUCT_DIR)/generated_86.h'],791 'action': [792 'touch',793 '<(PRODUCT_DIR)/generated_86.h',794 ],795 },796 {797 'action_name': 'do_87',798 'inputs': [],799 'outputs': ['<(PRODUCT_DIR)/generated_87.h'],800 'action': [801 'touch',802 '<(PRODUCT_DIR)/generated_87.h',803 ],804 },805 {806 'action_name': 'do_88',807 'inputs': [],808 'outputs': ['<(PRODUCT_DIR)/generated_88.h'],809 'action': [810 'touch',811 '<(PRODUCT_DIR)/generated_88.h',812 ],813 },814 {815 'action_name': 'do_89',816 'inputs': [],817 'outputs': ['<(PRODUCT_DIR)/generated_89.h'],818 'action': [819 'touch',820 '<(PRODUCT_DIR)/generated_89.h',821 ],822 },823 {824 'action_name': 'do_90',825 'inputs': [],826 'outputs': ['<(PRODUCT_DIR)/generated_90.h'],827 'action': [828 'touch',829 '<(PRODUCT_DIR)/generated_90.h',830 ],831 },832 {833 'action_name': 'do_91',834 'inputs': [],835 'outputs': ['<(PRODUCT_DIR)/generated_91.h'],836 'action': [837 'touch',838 '<(PRODUCT_DIR)/generated_91.h',839 ],840 },841 {842 'action_name': 'do_92',843 'inputs': [],844 'outputs': ['<(PRODUCT_DIR)/generated_92.h'],845 'action': [846 'touch',847 '<(PRODUCT_DIR)/generated_92.h',848 ],849 },850 {851 'action_name': 'do_93',852 'inputs': [],853 'outputs': ['<(PRODUCT_DIR)/generated_93.h'],854 'action': [855 'touch',856 '<(PRODUCT_DIR)/generated_93.h',857 ],858 },859 {860 'action_name': 'do_94',861 'inputs': [],862 'outputs': ['<(PRODUCT_DIR)/generated_94.h'],863 'action': [864 'touch',865 '<(PRODUCT_DIR)/generated_94.h',866 ],867 },868 {869 'action_name': 'do_95',870 'inputs': [],871 'outputs': ['<(PRODUCT_DIR)/generated_95.h'],872 'action': [873 'touch',874 '<(PRODUCT_DIR)/generated_95.h',875 ],876 },877 {878 'action_name': 'do_96',879 'inputs': [],880 'outputs': ['<(PRODUCT_DIR)/generated_96.h'],881 'action': [882 'touch',883 '<(PRODUCT_DIR)/generated_96.h',884 ],885 },886 {887 'action_name': 'do_97',888 'inputs': [],889 'outputs': ['<(PRODUCT_DIR)/generated_97.h'],890 'action': [891 'touch',892 '<(PRODUCT_DIR)/generated_97.h',893 ],894 },895 {896 'action_name': 'do_98',897 'inputs': [],898 'outputs': ['<(PRODUCT_DIR)/generated_98.h'],899 'action': [900 'touch',901 '<(PRODUCT_DIR)/generated_98.h',902 ],903 },904 {905 'action_name': 'do_99',906 'inputs': [],907 'outputs': ['<(PRODUCT_DIR)/generated_99.h'],908 'action': [909 'touch',910 '<(PRODUCT_DIR)/generated_99.h',911 ],912 },913 {914 'action_name': 'do_100',915 'inputs': [],916 'outputs': ['<(PRODUCT_DIR)/generated_100.h'],917 'action': [918 'touch',919 '<(PRODUCT_DIR)/generated_100.h',920 ],921 },922 {923 'action_name': 'do_101',924 'inputs': [],925 'outputs': ['<(PRODUCT_DIR)/generated_101.h'],926 'action': [927 'touch',928 '<(PRODUCT_DIR)/generated_101.h',929 ],930 },931 {932 'action_name': 'do_102',933 'inputs': [],934 'outputs': ['<(PRODUCT_DIR)/generated_102.h'],935 'action': [936 'touch',937 '<(PRODUCT_DIR)/generated_102.h',938 ],939 },940 {941 'action_name': 'do_103',942 'inputs': [],943 'outputs': ['<(PRODUCT_DIR)/generated_103.h'],944 'action': [945 'touch',946 '<(PRODUCT_DIR)/generated_103.h',947 ],948 },949 {950 'action_name': 'do_104',951 'inputs': [],952 'outputs': ['<(PRODUCT_DIR)/generated_104.h'],953 'action': [954 'touch',955 '<(PRODUCT_DIR)/generated_104.h',956 ],957 },958 {959 'action_name': 'do_105',960 'inputs': [],961 'outputs': ['<(PRODUCT_DIR)/generated_105.h'],962 'action': [963 'touch',964 '<(PRODUCT_DIR)/generated_105.h',965 ],966 },967 {968 'action_name': 'do_106',969 'inputs': [],970 'outputs': ['<(PRODUCT_DIR)/generated_106.h'],971 'action': [972 'touch',973 '<(PRODUCT_DIR)/generated_106.h',974 ],975 },976 {977 'action_name': 'do_107',978 'inputs': [],979 'outputs': ['<(PRODUCT_DIR)/generated_107.h'],980 'action': [981 'touch',982 '<(PRODUCT_DIR)/generated_107.h',983 ],984 },985 {986 'action_name': 'do_108',987 'inputs': [],988 'outputs': ['<(PRODUCT_DIR)/generated_108.h'],989 'action': [990 'touch',991 '<(PRODUCT_DIR)/generated_108.h',992 ],993 },994 {995 'action_name': 'do_109',996 'inputs': [],997 'outputs': ['<(PRODUCT_DIR)/generated_109.h'],998 'action': [999 'touch',1000 '<(PRODUCT_DIR)/generated_109.h',1001 ],1002 },1003 {1004 'action_name': 'do_110',1005 'inputs': [],1006 'outputs': ['<(PRODUCT_DIR)/generated_110.h'],1007 'action': [1008 'touch',1009 '<(PRODUCT_DIR)/generated_110.h',1010 ],1011 },1012 {1013 'action_name': 'do_111',1014 'inputs': [],1015 'outputs': ['<(PRODUCT_DIR)/generated_111.h'],1016 'action': [1017 'touch',1018 '<(PRODUCT_DIR)/generated_111.h',1019 ],1020 },1021 {1022 'action_name': 'do_112',1023 'inputs': [],1024 'outputs': ['<(PRODUCT_DIR)/generated_112.h'],1025 'action': [1026 'touch',1027 '<(PRODUCT_DIR)/generated_112.h',1028 ],1029 },1030 {1031 'action_name': 'do_113',1032 'inputs': [],1033 'outputs': ['<(PRODUCT_DIR)/generated_113.h'],1034 'action': [1035 'touch',1036 '<(PRODUCT_DIR)/generated_113.h',1037 ],1038 },1039 {1040 'action_name': 'do_114',1041 'inputs': [],1042 'outputs': ['<(PRODUCT_DIR)/generated_114.h'],1043 'action': [1044 'touch',1045 '<(PRODUCT_DIR)/generated_114.h',1046 ],1047 },1048 {1049 'action_name': 'do_115',1050 'inputs': [],1051 'outputs': ['<(PRODUCT_DIR)/generated_115.h'],1052 'action': [1053 'touch',1054 '<(PRODUCT_DIR)/generated_115.h',1055 ],1056 },1057 {1058 'action_name': 'do_116',1059 'inputs': [],1060 'outputs': ['<(PRODUCT_DIR)/generated_116.h'],1061 'action': [1062 'touch',1063 '<(PRODUCT_DIR)/generated_116.h',1064 ],1065 },1066 {1067 'action_name': 'do_117',1068 'inputs': [],1069 'outputs': ['<(PRODUCT_DIR)/generated_117.h'],1070 'action': [1071 'touch',1072 '<(PRODUCT_DIR)/generated_117.h',1073 ],1074 },1075 {1076 'action_name': 'do_118',1077 'inputs': [],1078 'outputs': ['<(PRODUCT_DIR)/generated_118.h'],1079 'action': [1080 'touch',1081 '<(PRODUCT_DIR)/generated_118.h',1082 ],1083 },1084 {1085 'action_name': 'do_119',1086 'inputs': [],1087 'outputs': ['<(PRODUCT_DIR)/generated_119.h'],1088 'action': [1089 'touch',1090 '<(PRODUCT_DIR)/generated_119.h',1091 ],1092 },1093 {1094 'action_name': 'do_120',1095 'inputs': [],1096 'outputs': ['<(PRODUCT_DIR)/generated_120.h'],1097 'action': [1098 'touch',1099 '<(PRODUCT_DIR)/generated_120.h',1100 ],1101 },1102 {1103 'action_name': 'do_121',1104 'inputs': [],1105 'outputs': ['<(PRODUCT_DIR)/generated_121.h'],1106 'action': [1107 'touch',1108 '<(PRODUCT_DIR)/generated_121.h',1109 ],1110 },1111 {1112 'action_name': 'do_122',1113 'inputs': [],1114 'outputs': ['<(PRODUCT_DIR)/generated_122.h'],1115 'action': [1116 'touch',1117 '<(PRODUCT_DIR)/generated_122.h',1118 ],1119 },1120 {1121 'action_name': 'do_123',1122 'inputs': [],1123 'outputs': ['<(PRODUCT_DIR)/generated_123.h'],1124 'action': [1125 'touch',1126 '<(PRODUCT_DIR)/generated_123.h',1127 ],1128 },1129 {1130 'action_name': 'do_124',1131 'inputs': [],1132 'outputs': ['<(PRODUCT_DIR)/generated_124.h'],1133 'action': [1134 'touch',1135 '<(PRODUCT_DIR)/generated_124.h',1136 ],1137 },1138 {1139 'action_name': 'do_125',1140 'inputs': [],1141 'outputs': ['<(PRODUCT_DIR)/generated_125.h'],1142 'action': [1143 'touch',1144 '<(PRODUCT_DIR)/generated_125.h',1145 ],1146 },1147 {1148 'action_name': 'do_126',1149 'inputs': [],1150 'outputs': ['<(PRODUCT_DIR)/generated_126.h'],1151 'action': [1152 'touch',1153 '<(PRODUCT_DIR)/generated_126.h',1154 ],1155 },1156 {1157 'action_name': 'do_127',1158 'inputs': [],1159 'outputs': ['<(PRODUCT_DIR)/generated_127.h'],1160 'action': [1161 'touch',1162 '<(PRODUCT_DIR)/generated_127.h',1163 ],1164 },1165 {1166 'action_name': 'do_128',1167 'inputs': [],1168 'outputs': ['<(PRODUCT_DIR)/generated_128.h'],1169 'action': [1170 'touch',1171 '<(PRODUCT_DIR)/generated_128.h',1172 ],1173 },1174 {1175 'action_name': 'do_129',1176 'inputs': [],1177 'outputs': ['<(PRODUCT_DIR)/generated_129.h'],1178 'action': [1179 'touch',1180 '<(PRODUCT_DIR)/generated_129.h',1181 ],1182 },1183 {1184 'action_name': 'do_130',1185 'inputs': [],1186 'outputs': ['<(PRODUCT_DIR)/generated_130.h'],1187 'action': [1188 'touch',1189 '<(PRODUCT_DIR)/generated_130.h',1190 ],1191 },1192 {1193 'action_name': 'do_131',1194 'inputs': [],1195 'outputs': ['<(PRODUCT_DIR)/generated_131.h'],1196 'action': [1197 'touch',1198 '<(PRODUCT_DIR)/generated_131.h',1199 ],1200 },1201 {1202 'action_name': 'do_132',1203 'inputs': [],1204 'outputs': ['<(PRODUCT_DIR)/generated_132.h'],1205 'action': [1206 'touch',1207 '<(PRODUCT_DIR)/generated_132.h',1208 ],1209 },1210 {1211 'action_name': 'do_133',1212 'inputs': [],1213 'outputs': ['<(PRODUCT_DIR)/generated_133.h'],1214 'action': [1215 'touch',1216 '<(PRODUCT_DIR)/generated_133.h',1217 ],1218 },1219 {1220 'action_name': 'do_134',1221 'inputs': [],1222 'outputs': ['<(PRODUCT_DIR)/generated_134.h'],1223 'action': [1224 'touch',1225 '<(PRODUCT_DIR)/generated_134.h',1226 ],1227 },1228 {1229 'action_name': 'do_135',1230 'inputs': [],1231 'outputs': ['<(PRODUCT_DIR)/generated_135.h'],1232 'action': [1233 'touch',1234 '<(PRODUCT_DIR)/generated_135.h',1235 ],1236 },1237 {1238 'action_name': 'do_136',1239 'inputs': [],1240 'outputs': ['<(PRODUCT_DIR)/generated_136.h'],1241 'action': [1242 'touch',1243 '<(PRODUCT_DIR)/generated_136.h',1244 ],1245 },1246 {1247 'action_name': 'do_137',1248 'inputs': [],1249 'outputs': ['<(PRODUCT_DIR)/generated_137.h'],1250 'action': [1251 'touch',1252 '<(PRODUCT_DIR)/generated_137.h',1253 ],1254 },1255 {1256 'action_name': 'do_138',1257 'inputs': [],1258 'outputs': ['<(PRODUCT_DIR)/generated_138.h'],1259 'action': [1260 'touch',1261 '<(PRODUCT_DIR)/generated_138.h',1262 ],1263 },1264 {1265 'action_name': 'do_139',1266 'inputs': [],1267 'outputs': ['<(PRODUCT_DIR)/generated_139.h'],1268 'action': [1269 'touch',1270 '<(PRODUCT_DIR)/generated_139.h',1271 ],1272 },1273 {1274 'action_name': 'do_140',1275 'inputs': [],1276 'outputs': ['<(PRODUCT_DIR)/generated_140.h'],1277 'action': [1278 'touch',1279 '<(PRODUCT_DIR)/generated_140.h',1280 ],1281 },1282 {1283 'action_name': 'do_141',1284 'inputs': [],1285 'outputs': ['<(PRODUCT_DIR)/generated_141.h'],1286 'action': [1287 'touch',1288 '<(PRODUCT_DIR)/generated_141.h',1289 ],1290 },1291 {1292 'action_name': 'do_142',1293 'inputs': [],1294 'outputs': ['<(PRODUCT_DIR)/generated_142.h'],1295 'action': [1296 'touch',1297 '<(PRODUCT_DIR)/generated_142.h',1298 ],1299 },1300 {1301 'action_name': 'do_143',1302 'inputs': [],1303 'outputs': ['<(PRODUCT_DIR)/generated_143.h'],1304 'action': [1305 'touch',1306 '<(PRODUCT_DIR)/generated_143.h',1307 ],1308 },1309 {1310 'action_name': 'do_144',1311 'inputs': [],1312 'outputs': ['<(PRODUCT_DIR)/generated_144.h'],1313 'action': [1314 'touch',1315 '<(PRODUCT_DIR)/generated_144.h',1316 ],1317 },1318 {1319 'action_name': 'do_145',1320 'inputs': [],1321 'outputs': ['<(PRODUCT_DIR)/generated_145.h'],1322 'action': [1323 'touch',1324 '<(PRODUCT_DIR)/generated_145.h',1325 ],1326 },1327 {1328 'action_name': 'do_146',1329 'inputs': [],1330 'outputs': ['<(PRODUCT_DIR)/generated_146.h'],1331 'action': [1332 'touch',1333 '<(PRODUCT_DIR)/generated_146.h',1334 ],1335 },1336 {1337 'action_name': 'do_147',1338 'inputs': [],1339 'outputs': ['<(PRODUCT_DIR)/generated_147.h'],1340 'action': [1341 'touch',1342 '<(PRODUCT_DIR)/generated_147.h',1343 ],1344 },1345 {1346 'action_name': 'do_148',1347 'inputs': [],1348 'outputs': ['<(PRODUCT_DIR)/generated_148.h'],1349 'action': [1350 'touch',1351 '<(PRODUCT_DIR)/generated_148.h',1352 ],1353 },1354 {1355 'action_name': 'do_149',1356 'inputs': [],1357 'outputs': ['<(PRODUCT_DIR)/generated_149.h'],1358 'action': [1359 'touch',1360 '<(PRODUCT_DIR)/generated_149.h',1361 ],1362 },1363 {1364 'action_name': 'do_150',1365 'inputs': [],1366 'outputs': ['<(PRODUCT_DIR)/generated_150.h'],1367 'action': [1368 'touch',1369 '<(PRODUCT_DIR)/generated_150.h',1370 ],1371 },1372 {1373 'action_name': 'do_151',1374 'inputs': [],1375 'outputs': ['<(PRODUCT_DIR)/generated_151.h'],1376 'action': [1377 'touch',1378 '<(PRODUCT_DIR)/generated_151.h',1379 ],1380 },1381 {1382 'action_name': 'do_152',1383 'inputs': [],1384 'outputs': ['<(PRODUCT_DIR)/generated_152.h'],1385 'action': [1386 'touch',1387 '<(PRODUCT_DIR)/generated_152.h',1388 ],1389 },1390 {1391 'action_name': 'do_153',1392 'inputs': [],1393 'outputs': ['<(PRODUCT_DIR)/generated_153.h'],1394 'action': [1395 'touch',1396 '<(PRODUCT_DIR)/generated_153.h',1397 ],1398 },1399 {1400 'action_name': 'do_154',1401 'inputs': [],1402 'outputs': ['<(PRODUCT_DIR)/generated_154.h'],1403 'action': [1404 'touch',1405 '<(PRODUCT_DIR)/generated_154.h',1406 ],1407 },1408 {1409 'action_name': 'do_155',1410 'inputs': [],1411 'outputs': ['<(PRODUCT_DIR)/generated_155.h'],1412 'action': [1413 'touch',1414 '<(PRODUCT_DIR)/generated_155.h',1415 ],1416 },1417 {1418 'action_name': 'do_156',1419 'inputs': [],1420 'outputs': ['<(PRODUCT_DIR)/generated_156.h'],1421 'action': [1422 'touch',1423 '<(PRODUCT_DIR)/generated_156.h',1424 ],1425 },1426 {1427 'action_name': 'do_157',1428 'inputs': [],1429 'outputs': ['<(PRODUCT_DIR)/generated_157.h'],1430 'action': [1431 'touch',1432 '<(PRODUCT_DIR)/generated_157.h',1433 ],1434 },1435 {1436 'action_name': 'do_158',1437 'inputs': [],1438 'outputs': ['<(PRODUCT_DIR)/generated_158.h'],1439 'action': [1440 'touch',1441 '<(PRODUCT_DIR)/generated_158.h',1442 ],1443 },1444 {1445 'action_name': 'do_159',1446 'inputs': [],1447 'outputs': ['<(PRODUCT_DIR)/generated_159.h'],1448 'action': [1449 'touch',1450 '<(PRODUCT_DIR)/generated_159.h',1451 ],1452 },1453 {1454 'action_name': 'do_160',1455 'inputs': [],1456 'outputs': ['<(PRODUCT_DIR)/generated_160.h'],1457 'action': [1458 'touch',1459 '<(PRODUCT_DIR)/generated_160.h',1460 ],1461 },1462 {1463 'action_name': 'do_161',1464 'inputs': [],1465 'outputs': ['<(PRODUCT_DIR)/generated_161.h'],1466 'action': [1467 'touch',1468 '<(PRODUCT_DIR)/generated_161.h',1469 ],1470 },1471 {1472 'action_name': 'do_162',1473 'inputs': [],1474 'outputs': ['<(PRODUCT_DIR)/generated_162.h'],1475 'action': [1476 'touch',1477 '<(PRODUCT_DIR)/generated_162.h',1478 ],1479 },1480 {1481 'action_name': 'do_163',1482 'inputs': [],1483 'outputs': ['<(PRODUCT_DIR)/generated_163.h'],1484 'action': [1485 'touch',1486 '<(PRODUCT_DIR)/generated_163.h',1487 ],1488 },1489 {1490 'action_name': 'do_164',1491 'inputs': [],1492 'outputs': ['<(PRODUCT_DIR)/generated_164.h'],1493 'action': [1494 'touch',1495 '<(PRODUCT_DIR)/generated_164.h',1496 ],1497 },1498 {1499 'action_name': 'do_165',1500 'inputs': [],1501 'outputs': ['<(PRODUCT_DIR)/generated_165.h'],1502 'action': [1503 'touch',1504 '<(PRODUCT_DIR)/generated_165.h',1505 ],1506 },1507 {1508 'action_name': 'do_166',1509 'inputs': [],1510 'outputs': ['<(PRODUCT_DIR)/generated_166.h'],1511 'action': [1512 'touch',1513 '<(PRODUCT_DIR)/generated_166.h',1514 ],1515 },1516 {1517 'action_name': 'do_167',1518 'inputs': [],1519 'outputs': ['<(PRODUCT_DIR)/generated_167.h'],1520 'action': [1521 'touch',1522 '<(PRODUCT_DIR)/generated_167.h',1523 ],1524 },1525 {1526 'action_name': 'do_168',1527 'inputs': [],1528 'outputs': ['<(PRODUCT_DIR)/generated_168.h'],1529 'action': [1530 'touch',1531 '<(PRODUCT_DIR)/generated_168.h',1532 ],1533 },1534 {1535 'action_name': 'do_169',1536 'inputs': [],1537 'outputs': ['<(PRODUCT_DIR)/generated_169.h'],1538 'action': [1539 'touch',1540 '<(PRODUCT_DIR)/generated_169.h',1541 ],1542 },1543 {1544 'action_name': 'do_170',1545 'inputs': [],1546 'outputs': ['<(PRODUCT_DIR)/generated_170.h'],1547 'action': [1548 'touch',1549 '<(PRODUCT_DIR)/generated_170.h',1550 ],1551 },1552 {1553 'action_name': 'do_171',1554 'inputs': [],1555 'outputs': ['<(PRODUCT_DIR)/generated_171.h'],1556 'action': [1557 'touch',1558 '<(PRODUCT_DIR)/generated_171.h',1559 ],1560 },1561 {1562 'action_name': 'do_172',1563 'inputs': [],1564 'outputs': ['<(PRODUCT_DIR)/generated_172.h'],1565 'action': [1566 'touch',1567 '<(PRODUCT_DIR)/generated_172.h',1568 ],1569 },1570 {1571 'action_name': 'do_173',1572 'inputs': [],1573 'outputs': ['<(PRODUCT_DIR)/generated_173.h'],1574 'action': [1575 'touch',1576 '<(PRODUCT_DIR)/generated_173.h',1577 ],1578 },1579 {1580 'action_name': 'do_174',1581 'inputs': [],1582 'outputs': ['<(PRODUCT_DIR)/generated_174.h'],1583 'action': [1584 'touch',1585 '<(PRODUCT_DIR)/generated_174.h',1586 ],1587 },1588 {1589 'action_name': 'do_175',1590 'inputs': [],1591 'outputs': ['<(PRODUCT_DIR)/generated_175.h'],1592 'action': [1593 'touch',1594 '<(PRODUCT_DIR)/generated_175.h',1595 ],1596 },1597 {1598 'action_name': 'do_176',1599 'inputs': [],1600 'outputs': ['<(PRODUCT_DIR)/generated_176.h'],1601 'action': [1602 'touch',1603 '<(PRODUCT_DIR)/generated_176.h',1604 ],1605 },1606 {1607 'action_name': 'do_177',1608 'inputs': [],1609 'outputs': ['<(PRODUCT_DIR)/generated_177.h'],1610 'action': [1611 'touch',1612 '<(PRODUCT_DIR)/generated_177.h',1613 ],1614 },1615 {1616 'action_name': 'do_178',1617 'inputs': [],1618 'outputs': ['<(PRODUCT_DIR)/generated_178.h'],1619 'action': [1620 'touch',1621 '<(PRODUCT_DIR)/generated_178.h',1622 ],1623 },1624 {1625 'action_name': 'do_179',1626 'inputs': [],1627 'outputs': ['<(PRODUCT_DIR)/generated_179.h'],1628 'action': [1629 'touch',1630 '<(PRODUCT_DIR)/generated_179.h',1631 ],1632 },1633 {1634 'action_name': 'do_180',1635 'inputs': [],1636 'outputs': ['<(PRODUCT_DIR)/generated_180.h'],1637 'action': [1638 'touch',1639 '<(PRODUCT_DIR)/generated_180.h',1640 ],1641 },1642 {1643 'action_name': 'do_181',1644 'inputs': [],1645 'outputs': ['<(PRODUCT_DIR)/generated_181.h'],1646 'action': [1647 'touch',1648 '<(PRODUCT_DIR)/generated_181.h',1649 ],1650 },1651 {1652 'action_name': 'do_182',1653 'inputs': [],1654 'outputs': ['<(PRODUCT_DIR)/generated_182.h'],1655 'action': [1656 'touch',1657 '<(PRODUCT_DIR)/generated_182.h',1658 ],1659 },1660 {1661 'action_name': 'do_183',1662 'inputs': [],1663 'outputs': ['<(PRODUCT_DIR)/generated_183.h'],1664 'action': [1665 'touch',1666 '<(PRODUCT_DIR)/generated_183.h',1667 ],1668 },1669 {1670 'action_name': 'do_184',1671 'inputs': [],1672 'outputs': ['<(PRODUCT_DIR)/generated_184.h'],1673 'action': [1674 'touch',1675 '<(PRODUCT_DIR)/generated_184.h',1676 ],1677 },1678 {1679 'action_name': 'do_185',1680 'inputs': [],1681 'outputs': ['<(PRODUCT_DIR)/generated_185.h'],1682 'action': [1683 'touch',1684 '<(PRODUCT_DIR)/generated_185.h',1685 ],1686 },1687 {1688 'action_name': 'do_186',1689 'inputs': [],1690 'outputs': ['<(PRODUCT_DIR)/generated_186.h'],1691 'action': [1692 'touch',1693 '<(PRODUCT_DIR)/generated_186.h',1694 ],1695 },1696 {1697 'action_name': 'do_187',1698 'inputs': [],1699 'outputs': ['<(PRODUCT_DIR)/generated_187.h'],1700 'action': [1701 'touch',1702 '<(PRODUCT_DIR)/generated_187.h',1703 ],1704 },1705 {1706 'action_name': 'do_188',1707 'inputs': [],1708 'outputs': ['<(PRODUCT_DIR)/generated_188.h'],1709 'action': [1710 'touch',1711 '<(PRODUCT_DIR)/generated_188.h',1712 ],1713 },1714 {1715 'action_name': 'do_189',1716 'inputs': [],1717 'outputs': ['<(PRODUCT_DIR)/generated_189.h'],1718 'action': [1719 'touch',1720 '<(PRODUCT_DIR)/generated_189.h',1721 ],1722 },1723 {1724 'action_name': 'do_190',1725 'inputs': [],1726 'outputs': ['<(PRODUCT_DIR)/generated_190.h'],1727 'action': [1728 'touch',1729 '<(PRODUCT_DIR)/generated_190.h',1730 ],1731 },1732 {1733 'action_name': 'do_191',1734 'inputs': [],1735 'outputs': ['<(PRODUCT_DIR)/generated_191.h'],1736 'action': [1737 'touch',1738 '<(PRODUCT_DIR)/generated_191.h',1739 ],1740 },1741 {1742 'action_name': 'do_192',1743 'inputs': [],1744 'outputs': ['<(PRODUCT_DIR)/generated_192.h'],1745 'action': [1746 'touch',1747 '<(PRODUCT_DIR)/generated_192.h',1748 ],1749 },1750 {1751 'action_name': 'do_193',1752 'inputs': [],1753 'outputs': ['<(PRODUCT_DIR)/generated_193.h'],1754 'action': [1755 'touch',1756 '<(PRODUCT_DIR)/generated_193.h',1757 ],1758 },1759 {1760 'action_name': 'do_194',1761 'inputs': [],1762 'outputs': ['<(PRODUCT_DIR)/generated_194.h'],1763 'action': [1764 'touch',1765 '<(PRODUCT_DIR)/generated_194.h',1766 ],1767 },1768 {1769 'action_name': 'do_195',1770 'inputs': [],1771 'outputs': ['<(PRODUCT_DIR)/generated_195.h'],1772 'action': [1773 'touch',1774 '<(PRODUCT_DIR)/generated_195.h',1775 ],1776 },1777 {1778 'action_name': 'do_196',1779 'inputs': [],1780 'outputs': ['<(PRODUCT_DIR)/generated_196.h'],1781 'action': [1782 'touch',1783 '<(PRODUCT_DIR)/generated_196.h',1784 ],1785 },1786 {1787 'action_name': 'do_197',1788 'inputs': [],1789 'outputs': ['<(PRODUCT_DIR)/generated_197.h'],1790 'action': [1791 'touch',1792 '<(PRODUCT_DIR)/generated_197.h',1793 ],1794 },1795 {1796 'action_name': 'do_198',1797 'inputs': [],1798 'outputs': ['<(PRODUCT_DIR)/generated_198.h'],1799 'action': [1800 'touch',1801 '<(PRODUCT_DIR)/generated_198.h',1802 ],1803 },1804 {1805 'action_name': 'do_199',1806 'inputs': [],1807 'outputs': ['<(PRODUCT_DIR)/generated_199.h'],1808 'action': [1809 'touch',1810 '<(PRODUCT_DIR)/generated_199.h',1811 ],1812 },1813 ],1814 },1815 ],...
extract_actions_test.py
Source:extract_actions_test.py
1#!/usr/bin/env python2# Copyright 2014 The Chromium Authors. All rights reserved.3# Use of this source code is governed by a BSD-style license that can be4# found in the LICENSE file.5import unittest6import extract_actions7# Empty value to be inserted to |ACTIONS_MOCK|.8NO_VALUE = ''9ONE_OWNER = '<owner>name1@google.com</owner>\n'10TWO_OWNERS = """11<owner>name1@google.com</owner>\n12<owner>name2@google.com</owner>\n13"""14DESCRIPTION = '<description>Description.</description>\n'15TWO_DESCRIPTIONS = """16<description>Description.</description>\n17<description>Description2.</description>\n18"""19OBSOLETE = '<obsolete>Not used anymore. Replaced by action2.</obsolete>\n'20TWO_OBSOLETE = '<obsolete>Obsolete1.</obsolete><obsolete>Obsolete2.</obsolete>'21COMMENT = '<!--comment-->'22NOT_USER_TRIGGERED = 'not_user_triggered="true"'23# A format string to mock the input action.xml file.24ACTIONS_XML = """25{comment}26<actions>27<action name="action1" {not_user_triggered}>28{owners}{obsolete}{description}29</action>30</actions>"""31NO_OWNER_EXPECTED_XML = (32 '<actions>\n\n'33 '<action name="action1">\n'34 ' <owner>Please list the metric\'s owners. '35 'Add more owner tags as needed.</owner>\n'36 ' <description>Description.</description>\n'37 '</action>\n\n'38 '</actions>\n'39)40ONE_OWNER_EXPECTED_XML = (41 '<actions>\n\n'42 '<action name="action1">\n'43 ' <owner>name1@google.com</owner>\n'44 ' <description>Description.</description>\n'45 '</action>\n\n'46 '</actions>\n'47)48TWO_OWNERS_EXPECTED_XML = (49 '<actions>\n\n'50 '<action name="action1">\n'51 ' <owner>name1@google.com</owner>\n'52 ' <owner>name2@google.com</owner>\n'53 ' <description>Description.</description>\n'54 '</action>\n\n'55 '</actions>\n'56)57NO_DESCRIPTION_EXPECTED_XML = (58 '<actions>\n\n'59 '<action name="action1">\n'60 ' <owner>name1@google.com</owner>\n'61 ' <owner>name2@google.com</owner>\n'62 ' <description>Please enter the description of the metric.</description>\n'63 '</action>\n\n'64 '</actions>\n'65)66OBSOLETE_EXPECTED_XML = (67 '<actions>\n\n'68 '<action name="action1">\n'69 ' <owner>name1@google.com</owner>\n'70 ' <owner>name2@google.com</owner>\n'71 ' <description>Description.</description>\n'72 ' <obsolete>Not used anymore. Replaced by action2.</obsolete>\n'73 '</action>\n\n'74 '</actions>\n'75)76ADD_ACTION_EXPECTED_XML = (77 '<actions>\n\n'78 '<action name="action1">\n'79 ' <owner>name1@google.com</owner>\n'80 ' <owner>name2@google.com</owner>\n'81 ' <description>Description.</description>\n'82 '</action>\n\n'83 '<action name="action2">\n'84 ' <owner>Please list the metric\'s owners.'85 ' Add more owner tags as needed.</owner>\n'86 ' <description>Please enter the description of the metric.</description>\n'87 '</action>\n\n'88 '</actions>\n'89)90COMMENT_EXPECTED_XML = (91 '<!--comment-->\n\n'92 '<actions>\n\n'93 '<action name="action1">\n'94 ' <owner>name1@google.com</owner>\n'95 ' <owner>name2@google.com</owner>\n'96 ' <description>Description.</description>\n'97 '</action>\n\n'98 '</actions>\n'99)100NOT_USER_TRIGGERED_EXPECTED_XML = (101 '<actions>\n\n'102 '<action name="action1" not_user_triggered="true">\n'103 ' <owner>Please list the metric\'s owners. '104 'Add more owner tags as needed.</owner>\n'105 ' <description>Description.</description>\n'106 '</action>\n\n'107 '</actions>\n'108)109BASIC_SUFFIX_EXPECTED_XML = (110 '<actions>\n\n'111 '<action name="action1">\n'112 ' <owner>name1@chromium.org</owner>\n'113 ' <description>Description.</description>\n'114 '</action>\n\n'115 '<action name="action1_suffix1">\n'116 ' <owner>name1@chromium.org</owner>\n'117 ' <description>Description. Suffix Description 1.</description>\n'118 '</action>\n\n'119 '</actions>\n'120)121MULTI_ACTION_MULTI_SUFFIX_CHAIN = (122 '<actions>\n\n'123 '<action name="action1">\n'124 ' <owner>name1@chromium.org</owner>\n'125 ' <description>Description.</description>\n'126 '</action>\n\n'127 '<action name="action1_suffix1">\n'128 ' <owner>name1@chromium.org</owner>\n'129 ' <description>Description. Suffix Description 1.</description>\n'130 '</action>\n\n'131 '<action name="action1_suffix2">\n'132 ' <owner>name1@chromium.org</owner>\n'133 ' <description>Description. Suffix Description 2.</description>\n'134 '</action>\n\n'135 '<action name="action1_suffix2_suffix3">\n'136 ' <owner>name1@chromium.org</owner>\n'137 ' <description>\n'138 ' Description. Suffix Description 2. Suffix Description 3.\n'139 ' </description>\n'140 '</action>\n\n'141 '<action name="action1_suffix2_suffix3_suffix4">\n'142 ' <owner>name1@chromium.org</owner>\n'143 ' <description>\n'144 ' Description. Suffix Description 2. Suffix Description 3. '145 'Suffix Description\n'146 ' 4.\n'147 ' </description>\n'148 '</action>\n\n'149 '<action name="action2">\n'150 ' <owner>name2@chromium.org</owner>\n'151 ' <description>Description.</description>\n'152 '</action>\n\n'153 '<action name="action2_suffix1">\n'154 ' <owner>name2@chromium.org</owner>\n'155 ' <description>Description. Suffix Description 1.</description>\n'156 '</action>\n\n'157 '<action name="action2_suffix2">\n'158 ' <owner>name2@chromium.org</owner>\n'159 ' <description>Description. Suffix Description 2.</description>\n'160 '</action>\n\n'161 '</actions>\n'162)163SUFFIX_CUSTOM_SEPARATOR = (164 '<actions>\n\n'165 '<action name="action1">\n'166 ' <owner>name1@chromium.org</owner>\n'167 ' <description>Description.</description>\n'168 '</action>\n\n'169 '<action name="action1.suffix1">\n'170 ' <owner>name1@chromium.org</owner>\n'171 ' <description>Description. Suffix Description 1.</description>\n'172 '</action>\n\n'173 '</actions>\n'174)175SUFFIX_OREDERING_PREFIX = (176 '<actions>\n\n'177 '<action name="action1.prefix1_remainder">\n'178 ' <owner>name1@chromium.org</owner>\n'179 ' <description>Description. Prefix Description 1.</description>\n'180 '</action>\n\n'181 '<action name="action1.remainder">\n'182 ' <owner>name1@chromium.org</owner>\n'183 ' <description>Description.</description>\n'184 '</action>\n\n'185 '</actions>\n'186)187AFFECTED_ACTION_WITH_SUFFIX_TAG = (188 '<actions>\n\n'189 '<action name="action1">\n'190 ' <owner>name1@chromium.org</owner>\n'191 ' <description>Description.</description>\n'192 '</action>\n\n'193 '<action name="action1_suffix1">\n'194 ' <owner>name1@chromium.org</owner>\n'195 ' <description>Description. Suffix Description 1.</description>\n'196 '</action>\n\n'197 '<action name="action1_suffix2">\n'198 ' <owner>name1@chromium.org</owner>\n'199 ' <description>Description. Suffix Description 2.</description>\n'200 '</action>\n\n'201 '<action name="action2">\n'202 ' <owner>name2@chromium.org</owner>\n'203 ' <description>Description.</description>\n'204 '</action>\n\n'205 '<action name="action2_suffix2">\n'206 ' <owner>name2@chromium.org</owner>\n'207 ' <description>Description. Suffix Description 2.</description>\n'208 '</action>\n\n'209 '</actions>\n'210)211class ActionXmlTest(unittest.TestCase):212 def _GetProcessedAction(self, owner, description, obsolete,213 not_user_triggered=NO_VALUE, new_actions=[],214 comment=NO_VALUE):215 """Forms an actions XML string and returns it after processing.216 It parses the original XML string, adds new user actions (if there is any),217 and pretty prints it.218 Args:219 owner: the owner tag to be inserted in the original XML string.220 description: the description tag to be inserted in the original XML221 string.222 obsolete: the obsolete tag to be inserted in the original XML string.223 new_actions: optional. List of new user actions' names to be inserted.224 comment: the comment tag to be inserted in the original XML string.225 Returns:226 An updated and pretty-printed action XML string.227 """228 # Form the actions.xml mock content based on the input parameters.229 current_xml = ACTIONS_XML.format(owners=owner, description=description,230 obsolete=obsolete, comment=comment,231 not_user_triggered=not_user_triggered)232 actions, actions_dict, comments = extract_actions.ParseActionFile(233 current_xml)234 for new_action in new_actions:235 actions.add(new_action)236 return extract_actions.PrettyPrint(actions, actions_dict, comments)237 def _GetProcessedActionFromActionsXMLString(self, actions_xml):238 """parses the given actions XML string and pretty prints it.239 Args:240 actions_xml: actions XML string.241 Returns:242 An updated and pretty-printed actions XML string.243 """244 actions, actions_dict, comments = extract_actions.ParseActionFile(245 actions_xml)246 return extract_actions.PrettyPrint(actions, actions_dict, comments)247 def testNoOwner(self):248 xml_result = self._GetProcessedAction(NO_VALUE, DESCRIPTION, NO_VALUE)249 self.assertEqual(NO_OWNER_EXPECTED_XML, xml_result)250 def testOneOwnerOneDescription(self):251 xml_result = self._GetProcessedAction(ONE_OWNER, DESCRIPTION, NO_VALUE)252 self.assertEqual(ONE_OWNER_EXPECTED_XML, xml_result)253 def testTwoOwners(self):254 xml_result = self._GetProcessedAction(TWO_OWNERS, DESCRIPTION, NO_VALUE)255 self.assertEqual(TWO_OWNERS_EXPECTED_XML, xml_result)256 def testNoDescription(self):257 xml_result = self._GetProcessedAction(TWO_OWNERS, NO_VALUE, NO_VALUE)258 self.assertEqual(NO_DESCRIPTION_EXPECTED_XML, xml_result)259 def testTwoDescriptions(self):260 current_xml = ACTIONS_XML.format(owners=TWO_OWNERS, obsolete=NO_VALUE,261 description=TWO_DESCRIPTIONS,262 comment=NO_VALUE,263 not_user_triggered=NO_VALUE)264 # Since there are two description tags, the function ParseActionFile will265 # raise SystemExit with exit code 1.266 with self.assertRaises(SystemExit) as cm:267 _, _ = extract_actions.ParseActionFile(current_xml)268 self.assertEqual(cm.exception.code, 1)269 def testObsolete(self):270 xml_result = self._GetProcessedAction(TWO_OWNERS, DESCRIPTION, OBSOLETE)271 self.assertEqual(OBSOLETE_EXPECTED_XML, xml_result)272 def testTwoObsoletes(self):273 current_xml = ACTIONS_XML.format(owners=TWO_OWNERS, obsolete=TWO_OBSOLETE,274 description=DESCRIPTION, comment=NO_VALUE,275 not_user_triggered=NO_VALUE)276 # Since there are two obsolete tags, the function ParseActionFile will277 # raise SystemExit with exit code 1.278 with self.assertRaises(SystemExit) as cm:279 _, _ = extract_actions.ParseActionFile(current_xml)280 self.assertEqual(cm.exception.code, 1)281 def testAddNewActions(self):282 xml_result = self._GetProcessedAction(TWO_OWNERS, DESCRIPTION, NO_VALUE,283 new_actions=['action2'])284 self.assertEqual(ADD_ACTION_EXPECTED_XML, xml_result)285 def testComment(self):286 xml_result = self._GetProcessedAction(TWO_OWNERS, DESCRIPTION, NO_VALUE,287 comment=COMMENT)288 self.assertEqual(COMMENT_EXPECTED_XML, xml_result)289 def testNotUserTriggered(self):290 xml_result = self._GetProcessedAction(NO_VALUE, DESCRIPTION, NO_VALUE,291 NOT_USER_TRIGGERED)292 self.assertEqual(NOT_USER_TRIGGERED_EXPECTED_XML, xml_result)293 def testBasicSuffix(self):294 original_xml = """295 <actions>296 <action name="action1">297 <owner>name1@chromium.org</owner>298 <description>Description.</description>299 </action>300 <actions-suffixes>301 <action-suffix>302 <suffix name="suffix1" label="Suffix Description 1." />303 <affected-action name="action1" />304 </action-suffix>305 </actions-suffixes>306 </actions>307 """308 xml_result = self._GetProcessedActionFromActionsXMLString(original_xml)309 self.assertEqual(BASIC_SUFFIX_EXPECTED_XML, xml_result)310 def testMultiActionMultiSuffixChain(self):311 original_xml = """312 <actions>313 <action name="action1">314 <owner>name1@chromium.org</owner>315 <description>Description.</description>316 </action>317 <action name="action2">318 <owner>name2@chromium.org</owner>319 <description>Description.</description>320 </action>321 <actions-suffixes>322 <action-suffix>323 <suffix name="suffix1" label="Suffix Description 1." />324 <suffix name="suffix2" label="Suffix Description 2." />325 <affected-action name="action1" />326 <affected-action name="action2" />327 </action-suffix>328 <action-suffix>329 <suffix name="suffix3" label="Suffix Description 3." />330 <affected-action name="action1_suffix2" />331 </action-suffix>332 <action-suffix>333 <suffix name="suffix4" label="Suffix Description 4." />334 <affected-action name="action1_suffix2_suffix3" />335 </action-suffix>336 </actions-suffixes>337 </actions>338 """339 xml_result = self._GetProcessedActionFromActionsXMLString(original_xml)340 self.assertEqual(MULTI_ACTION_MULTI_SUFFIX_CHAIN, xml_result)341 def testSuffixCustomSeparator(self):342 original_xml = """343 <actions>344 <action name="action1">345 <owner>name1@chromium.org</owner>346 <description>Description.</description>347 </action>348 <actions-suffixes>349 <action-suffix separator='.'>350 <suffix name="suffix1" label="Suffix Description 1." />351 <affected-action name="action1" />352 </action-suffix>353 </actions-suffixes>354 </actions>355 """356 xml_result = self._GetProcessedActionFromActionsXMLString(original_xml)357 self.assertEqual(SUFFIX_CUSTOM_SEPARATOR, xml_result)358 def testSuffixOrderingPrefix(self):359 original_xml = """360 <actions>361 <action name="action1.remainder">362 <owner>name1@chromium.org</owner>363 <description>Description.</description>364 </action>365 <actions-suffixes>366 <action-suffix ordering='prefix'>367 <suffix name="prefix1" label="Prefix Description 1." />368 <affected-action name="action1.remainder" />369 </action-suffix>370 </actions-suffixes>371 </actions>372 """373 xml_result = self._GetProcessedActionFromActionsXMLString(original_xml)374 self.assertEqual(SUFFIX_OREDERING_PREFIX, xml_result)375 def testAffectedActionWithSuffixTag(self):376 original_xml = """377 <actions>378 <action name="action1">379 <owner>name1@chromium.org</owner>380 <description>Description.</description>381 </action>382 <action name="action2">383 <owner>name2@chromium.org</owner>384 <description>Description.</description>385 </action>386 <actions-suffixes>387 <action-suffix>388 <suffix name="suffix1" label="Suffix Description 1." />389 <suffix name="suffix2" label="Suffix Description 2." />390 <affected-action name="action1" />391 <affected-action name="action2" >392 <with-suffix name="suffix2" />393 </affected-action>394 </action-suffix>395 </actions-suffixes>396 </actions>397 """398 xml_result = self._GetProcessedActionFromActionsXMLString(original_xml)399 self.assertEqual(AFFECTED_ACTION_WITH_SUFFIX_TAG, xml_result)400 def testErrorActionMissing(self):401 original_xml = """402 <actions>403 <action name="action1">404 <owner>name1@chromium.org</owner>405 <description>Description.</description>406 </action>407 <actions-suffixes>408 <action-suffix>409 <suffix name="suffix1" label="Suffix Description 1." />410 <affected-action name="action1" />411 <affected-action name="action2" />412 </action-suffix>413 </actions-suffixes>414 </actions>415 """416 with self.assertRaises(SystemExit) as cm:417 extract_actions.ParseActionFile(original_xml)418 self.assertEqual(cm.exception.code, 1)419 def testErrorSuffixNameMissing(self):420 original_xml = """421 <actions>422 <action name="action1">423 <owner>name1@chromium.org</owner>424 <description>Description.</description>425 </action>426 <actions-suffixes>427 <action-suffix>428 <suffix label="Suffix Description 1." />429 <affected-action name="action1" />430 </action-suffix>431 </actions-suffixes>432 </actions>433 """434 with self.assertRaises(SystemExit) as cm:435 extract_actions.ParseActionFile(original_xml)436 self.assertEqual(cm.exception.code, 1)437 def testErrorBadActionName(self):438 original_xml = """439 <actions>440 <action name="action1">441 <owner>name1@chromium.org</owner>442 <description>Description.</description>443 </action>444 <actions-suffixes>445 <action-suffix ordering='prefix'>446 <suffix name="prefix1" label="Prefix Description 1." />447 <affected-action name="action1" />448 </action-suffix>449 </actions-suffixes>450 </actions>451 """452 with self.assertRaises(SystemExit) as cm:453 extract_actions.ParseActionFile(original_xml)454 self.assertEqual(cm.exception.code, 1)455 def testUserMetricsActionSpanningTwoLines(self):456 code = 'base::UserMetricsAction(\n"Foo.Bar"));'457 finder = extract_actions.ActionNameFinder('dummy', code,458 extract_actions.USER_METRICS_ACTION_RE)459 self.assertEqual('Foo.Bar', finder.FindNextAction())460 self.assertFalse(finder.FindNextAction())461 def testUserMetricsActionAsAParam(self):462 code = 'base::UserMetricsAction("Test.Foo"), "Test.Bar");'463 finder = extract_actions.ActionNameFinder('dummy', code,464 extract_actions.USER_METRICS_ACTION_RE)465 self.assertEqual('Test.Foo', finder.FindNextAction())466 self.assertFalse(finder.FindNextAction())467 def testNonLiteralUserMetricsAction(self):468 code = 'base::UserMetricsAction(FOO)'469 finder = extract_actions.ActionNameFinder('dummy', code,470 extract_actions.USER_METRICS_ACTION_RE)471 with self.assertRaises(Exception):472 finder.FindNextAction()473 def testTernaryUserMetricsAction(self):474 code = 'base::UserMetricsAction(foo ? "Foo.Bar" : "Bar.Foo"));'475 finder = extract_actions.ActionNameFinder('dummy', code,476 extract_actions.USER_METRICS_ACTION_RE)477 with self.assertRaises(Exception):478 finder.FindNextAction()479 def testTernaryUserMetricsActionWithNewLines(self):480 code = """base::UserMetricsAction(481 foo_bar ? "Bar.Foo" :482 "Foo.Car")"""483 finder = extract_actions.ActionNameFinder('dummy', code,484 extract_actions.USER_METRICS_ACTION_RE)485 with self.assertRaises(extract_actions.InvalidStatementException):486 finder.FindNextAction()487 def testUserMetricsActionWithExtraWhitespace(self):488 code = """base::UserMetricsAction("Foo.Bar" )"""489 finder = extract_actions.ActionNameFinder('dummy', code,490 extract_actions.USER_METRICS_ACTION_RE)491 with self.assertRaises(extract_actions.InvalidStatementException):492 finder.FindNextAction()493 def testUserMetricsActionSpanningTwoLinesJs(self):494 code = "chrome.send('coreOptionsUserMetricsAction',\n['Foo.Bar']);"495 finder = extract_actions.ActionNameFinder('dummy', code,496 extract_actions.USER_METRICS_ACTION_RE_JS)497 self.assertEqual('Foo.Bar', finder.FindNextAction())498 self.assertFalse(finder.FindNextAction())499 def testNonLiteralUserMetricsActionJs(self):500 code = "chrome.send('coreOptionsUserMetricsAction',\n[FOO]);"501 finder = extract_actions.ActionNameFinder('dummy', code,502 extract_actions.USER_METRICS_ACTION_RE_JS)503 self.assertFalse(finder.FindNextAction())504 def testTernaryUserMetricsActionJs(self):505 code = ("chrome.send('coreOptionsUserMetricsAction', "506 "[foo ? 'Foo.Bar' : 'Bar.Foo']);")507 finder = extract_actions.ActionNameFinder('dummy', code,508 extract_actions.USER_METRICS_ACTION_RE_JS)509 self.assertFalse(finder.FindNextAction())510 def testTernaryUserMetricsActionWithNewLinesJs(self):511 code = """chrome.send('coreOptionsUserMetricsAction',512 [foo ? 'Foo.Bar' :513 'Bar.Foo']);"""514 finder = extract_actions.ActionNameFinder('dummy', code,515 extract_actions.USER_METRICS_ACTION_RE_JS)516 self.assertFalse(finder.FindNextAction())517 def testUserMetricsActionWithExtraCharactersJs(self):518 code = """chrome.send('coreOptionsUserMetricsAction',519 ['Foo.Bar' + 1]);"""520 finder = extract_actions.ActionNameFinder('dummy', code,521 extract_actions.USER_METRICS_ACTION_RE_JS)522 self.assertFalse(finder.FindNextAction())523 def testComputedUserMetricsActionJs(self):524 code = """chrome.send('coreOptionsUserMetricsAction',525 ['Foo.' + foo_bar ? 'Bar' : 'Foo']);"""526 finder = extract_actions.ActionNameFinder('dummy', code,527 extract_actions.USER_METRICS_ACTION_RE_JS)528 self.assertFalse(finder.FindNextAction())529 def testUserMetricsActionWithMismatchedQuotes(self):530 code = "chrome.send('coreOptionsUserMetricsAction', [\"Foo.Bar']);"531 finder = extract_actions.ActionNameFinder('dummy', code,532 extract_actions.USER_METRICS_ACTION_RE_JS)533 self.assertFalse(finder.FindNextAction())534 def testUserMetricsActionFromPropertyJs(self):535 code = "chrome.send('coreOptionsUserMetricsAction', [objOrArray[key]]);"536 finder = extract_actions.ActionNameFinder('dummy', code,537 extract_actions.USER_METRICS_ACTION_RE_JS)538 self.assertFalse(finder.FindNextAction())539 def testUserMetricsActionFromFunctionJs(self):540 code = "chrome.send('coreOptionsUserMetricsAction', [getAction(param)]);"541 finder = extract_actions.ActionNameFinder('dummy', code,542 extract_actions.USER_METRICS_ACTION_RE_JS)543 self.assertFalse(finder.FindNextAction())544if __name__ == '__main__':...
wordprocessor.py
Source:wordprocessor.py
1from PyQt5.QtGui import *2from PyQt5.QtWidgets import *3from PyQt5.QtCore import *4from PyQt5.QtPrintSupport import *5import os6import sys7import uuid8FONT_SIZES = [7, 8, 9, 10, 11, 12, 13, 14, 18, 24, 36, 48, 64, 72, 96, 144, 288]9IMAGE_EXTENSIONS = ['.jpg','.png','.bmp']10HTML_EXTENSIONS = ['.htm', '.html']11def hexuuid():12 return uuid.uuid4().hex13def splitext(p):14 return os.path.splitext(p)[1].lower()15class TextEdit(QTextEdit):16 def canInsertFromMimeData(self, source):17 if source.hasImage():18 return True19 else:20 return super(TextEdit, self).canInsertFromMimeData(source)21 def insertFromMimeData(self, source):22 cursor = self.textCursor()23 document = self.document()24 if source.hasUrls():25 for u in source.urls():26 file_ext = splitext(str(u.toLocalFile()))27 if u.isLocalFile() and file_ext in IMAGE_EXTENSIONS:28 image = QImage(u.toLocalFile())29 document.addResource(QTextDocument.ImageResource, u, image)30 cursor.insertImage(u.toLocalFile())31 else:32 # If we hit a non-image or non-local URL break the loop and fall out33 # to the super call & let Qt handle it34 break35 else:36 # If all were valid images, finish here.37 return38 elif source.hasImage():39 image = source.imageData()40 uuid = hexuuid()41 document.addResource(QTextDocument.ImageResource, uuid, image)42 cursor.insertImage(uuid)43 return44 super(TextEdit, self).insertFromMimeData(source)45class MainWindow(QMainWindow):46 def __init__(self, *args, **kwargs):47 super(MainWindow, self).__init__(*args, **kwargs)48 layout = QVBoxLayout()49 self.editor = TextEdit()50 # Setup the QTextEdit editor configuration51 self.editor.setAutoFormatting(QTextEdit.AutoAll)52 self.editor.selectionChanged.connect(self.update_format)53 # Initialize default font size.54 font = QFont('Times', 12)55 self.editor.setFont(font)56 # We need to repeat the size to init the current format.57 self.editor.setFontPointSize(12)58 # self.path holds the path of the currently open file.59 # If none, we haven't got a file open yet (or creating new).60 self.path = None61 layout.addWidget(self.editor)62 container = QWidget()63 container.setLayout(layout)64 self.setCentralWidget(container)65 self.status = QStatusBar()66 self.setStatusBar(self.status)67 # Uncomment to disable native menubar on Mac68 # self.menuBar().setNativeMenuBar(False)69 file_toolbar = QToolBar("File")70 file_toolbar.setIconSize(QSize(14, 14))71 self.addToolBar(file_toolbar)72 file_menu = self.menuBar().addMenu("&File")73 open_file_action = QAction(QIcon(os.path.join('images', 'blue-folder-open-document.png')), "Open file...", self)74 open_file_action.setStatusTip("Open file")75 open_file_action.triggered.connect(self.file_open)76 file_menu.addAction(open_file_action)77 file_toolbar.addAction(open_file_action)78 save_file_action = QAction(QIcon(os.path.join('images', 'disk.png')), "Save", self)79 save_file_action.setStatusTip("Save current page")80 save_file_action.triggered.connect(self.file_save)81 file_menu.addAction(save_file_action)82 file_toolbar.addAction(save_file_action)83 saveas_file_action = QAction(QIcon(os.path.join('images', 'disk--pencil.png')), "Save As...", self)84 saveas_file_action.setStatusTip("Save current page to specified file")85 saveas_file_action.triggered.connect(self.file_saveas)86 file_menu.addAction(saveas_file_action)87 file_toolbar.addAction(saveas_file_action)88 print_action = QAction(QIcon(os.path.join('images', 'printer.png')), "Print...", self)89 print_action.setStatusTip("Print current page")90 print_action.triggered.connect(self.file_print)91 file_menu.addAction(print_action)92 file_toolbar.addAction(print_action)93 edit_toolbar = QToolBar("Edit")94 edit_toolbar.setIconSize(QSize(16, 16))95 self.addToolBar(edit_toolbar)96 edit_menu = self.menuBar().addMenu("&Edit")97 undo_action = QAction(QIcon(os.path.join('images', 'arrow-curve-180-left.png')), "Undo", self)98 undo_action.setStatusTip("Undo last change")99 undo_action.triggered.connect(self.editor.undo)100 edit_menu.addAction(undo_action)101 redo_action = QAction(QIcon(os.path.join('images', 'arrow-curve.png')), "Redo", self)102 redo_action.setStatusTip("Redo last change")103 redo_action.triggered.connect(self.editor.redo)104 edit_toolbar.addAction(redo_action)105 edit_menu.addAction(redo_action)106 edit_menu.addSeparator()107 cut_action = QAction(QIcon(os.path.join('images', 'scissors.png')), "Cut", self)108 cut_action.setStatusTip("Cut selected text")109 cut_action.setShortcut(QKeySequence.Cut)110 cut_action.triggered.connect(self.editor.cut)111 edit_toolbar.addAction(cut_action)112 edit_menu.addAction(cut_action)113 copy_action = QAction(QIcon(os.path.join('images', 'document-copy.png')), "Copy", self)114 copy_action.setStatusTip("Copy selected text")115 cut_action.setShortcut(QKeySequence.Copy)116 copy_action.triggered.connect(self.editor.copy)117 edit_toolbar.addAction(copy_action)118 edit_menu.addAction(copy_action)119 paste_action = QAction(QIcon(os.path.join('images', 'clipboard-paste-document-text.png')), "Paste", self)120 paste_action.setStatusTip("Paste from clipboard")121 cut_action.setShortcut(QKeySequence.Paste)122 paste_action.triggered.connect(self.editor.paste)123 edit_toolbar.addAction(paste_action)124 edit_menu.addAction(paste_action)125 select_action = QAction(QIcon(os.path.join('images', 'selection-input.png')), "Select all", self)126 select_action.setStatusTip("Select all text")127 cut_action.setShortcut(QKeySequence.SelectAll)128 select_action.triggered.connect(self.editor.selectAll)129 edit_menu.addAction(select_action)130 edit_menu.addSeparator()131 wrap_action = QAction(QIcon(os.path.join('images', 'arrow-continue.png')), "Wrap text to window", self)132 wrap_action.setStatusTip("Toggle wrap text to window")133 wrap_action.setCheckable(True)134 wrap_action.setChecked(True)135 wrap_action.triggered.connect(self.edit_toggle_wrap)136 edit_menu.addAction(wrap_action)137 format_toolbar = QToolBar("Format")138 format_toolbar.setIconSize(QSize(16, 16))139 self.addToolBar(format_toolbar)140 format_menu = self.menuBar().addMenu("&Format")141 # We need references to these actions/settings to update as selection changes, so attach to self.142 self.fonts = QFontComboBox()143 self.fonts.currentFontChanged.connect(self.editor.setCurrentFont)144 format_toolbar.addWidget(self.fonts)145 self.fontsize = QComboBox()146 self.fontsize.addItems([str(s) for s in FONT_SIZES])147 # Connect to the signal producing the text of the current selection. Convert the string to float148 # and set as the pointsize. We could also use the index + retrieve from FONT_SIZES.149 self.fontsize.currentIndexChanged[str].connect(lambda s: self.editor.setFontPointSize(float(s)) )150 format_toolbar.addWidget(self.fontsize)151 self.bold_action = QAction(QIcon(os.path.join('images', 'edit-bold.png')), "Bold", self)152 self.bold_action.setStatusTip("Bold")153 self.bold_action.setShortcut(QKeySequence.Bold)154 self.bold_action.setCheckable(True)155 self.bold_action.toggled.connect(lambda x: self.editor.setFontWeight(QFont.Bold if x else QFont.Normal))156 format_toolbar.addAction(self.bold_action)157 format_menu.addAction(self.bold_action)158 self.italic_action = QAction(QIcon(os.path.join('images', 'edit-italic.png')), "Italic", self)159 self.italic_action.setStatusTip("Italic")160 self.italic_action.setShortcut(QKeySequence.Italic)161 self.italic_action.setCheckable(True)162 self.italic_action.toggled.connect(self.editor.setFontItalic)163 format_toolbar.addAction(self.italic_action)164 format_menu.addAction(self.italic_action)165 self.underline_action = QAction(QIcon(os.path.join('images', 'edit-underline.png')), "Underline", self)166 self.underline_action.setStatusTip("Underline")167 self.underline_action.setShortcut(QKeySequence.Underline)168 self.underline_action.setCheckable(True)169 self.underline_action.toggled.connect(self.editor.setFontUnderline)170 format_toolbar.addAction(self.underline_action)171 format_menu.addAction(self.underline_action)172 format_menu.addSeparator()173 self.alignl_action = QAction(QIcon(os.path.join('images', 'edit-alignment.png')), "Align left", self)174 self.alignl_action.setStatusTip("Align text left")175 self.alignl_action.setCheckable(True)176 self.alignl_action.triggered.connect(lambda: self.editor.setAlignment(Qt.AlignLeft))177 format_toolbar.addAction(self.alignl_action)178 format_menu.addAction(self.alignl_action)179 self.alignc_action = QAction(QIcon(os.path.join('images', 'edit-alignment-center.png')), "Align center", self)180 self.alignc_action.setStatusTip("Align text center")181 self.alignc_action.setCheckable(True)182 self.alignc_action.triggered.connect(lambda: self.editor.setAlignment(Qt.AlignCenter))183 format_toolbar.addAction(self.alignc_action)184 format_menu.addAction(self.alignc_action)185 self.alignr_action = QAction(QIcon(os.path.join('images', 'edit-alignment-right.png')), "Align right", self)186 self.alignr_action.setStatusTip("Align text right")187 self.alignr_action.setCheckable(True)188 self.alignr_action.triggered.connect(lambda: self.editor.setAlignment(Qt.AlignRight))189 format_toolbar.addAction(self.alignr_action)190 format_menu.addAction(self.alignr_action)191 self.alignj_action = QAction(QIcon(os.path.join('images', 'edit-alignment-justify.png')), "Justify", self)192 self.alignj_action.setStatusTip("Justify text")193 self.alignj_action.setCheckable(True)194 self.alignj_action.triggered.connect(lambda: self.editor.setAlignment(Qt.AlignJustify))195 format_toolbar.addAction(self.alignj_action)196 format_menu.addAction(self.alignj_action)197 format_group = QActionGroup(self)198 format_group.setExclusive(True)199 format_group.addAction(self.alignl_action)200 format_group.addAction(self.alignc_action)201 format_group.addAction(self.alignr_action)202 format_group.addAction(self.alignj_action)203 format_menu.addSeparator()204 # A list of all format-related widgets/actions, so we can disable/enable signals when updating.205 self._format_actions = [206 self.fonts,207 self.fontsize,208 self.bold_action,209 self.italic_action,210 self.underline_action,211 # We don't need to disable signals for alignment, as they are paragraph-wide.212 ]213 # Initialize.214 self.update_format()215 self.update_title()216 self.show()217 def block_signals(self, objects, b):218 for o in objects:219 o.blockSignals(b)220 def update_format(self):221 """222 Update the font format toolbar/actions when a new text selection is made. This is neccessary to keep223 toolbars/etc. in sync with the current edit state.224 :return:225 """226 # Disable signals for all format widgets, so changing values here does not trigger further formatting.227 self.block_signals(self._format_actions, True)228 self.fonts.setCurrentFont(self.editor.currentFont())229 # Nasty, but we get the font-size as a float but want it was an int230 self.fontsize.setCurrentText(str(int(self.editor.fontPointSize())))231 self.italic_action.setChecked(self.editor.fontItalic())232 self.underline_action.setChecked(self.editor.fontUnderline())233 self.bold_action.setChecked(self.editor.fontWeight() == QFont.Bold)234 self.alignl_action.setChecked(self.editor.alignment() == Qt.AlignLeft)235 self.alignc_action.setChecked(self.editor.alignment() == Qt.AlignCenter)236 self.alignr_action.setChecked(self.editor.alignment() == Qt.AlignRight)237 self.alignj_action.setChecked(self.editor.alignment() == Qt.AlignJustify)238 self.block_signals(self._format_actions, False)239 def dialog_critical(self, s):240 dlg = QMessageBox(self)241 dlg.setText(s)242 dlg.setIcon(QMessageBox.Critical)243 dlg.show()244 def file_open(self):245 path, _ = QFileDialog.getOpenFileName(self, "Open file", "", "HTML documents (*.html);Text documents (*.txt);All files (*.*)")246 try:247 with open(path, 'rU') as f:248 text = f.read()249 except Exception as e:250 self.dialog_critical(str(e))251 else:252 self.path = path253 # Qt will automatically try and guess the format as txt/html254 self.editor.setText(text)255 self.update_title()256 def file_save(self):257 if self.path is None:258 # If we do not have a path, we need to use Save As.259 return self.file_saveas()260 text = self.editor.toHtml() if splitext(self.path) in HTML_EXTENSIONS else self.editor.toPlainText()261 try:262 with open(self.path, 'w') as f:263 f.write(text)264 except Exception as e:265 self.dialog_critical(str(e))266 def file_saveas(self):267 path, _ = QFileDialog.getSaveFileName(self, "Save file", "", "HTML documents (*.html);Text documents (*.txt);All files (*.*)")268 if not path:269 # If dialog is cancelled, will return ''270 return271 text = self.editor.toHtml() if splitext(path) in HTML_EXTENSIONS else self.editor.toPlainText()272 try:273 with open(path, 'w') as f:274 f.write(text)275 except Exception as e:276 self.dialog_critical(str(e))277 else:278 self.path = path279 self.update_title()280 def file_print(self):281 dlg = QPrintDialog()282 if dlg.exec_():283 self.editor.print_(dlg.printer())284 def update_title(self):285 self.setWindowTitle("%s - Megasolid Idiom" % (os.path.basename(self.path) if self.path else "Untitled"))286 def edit_toggle_wrap(self):287 self.editor.setLineWrapMode( 1 if self.editor.lineWrapMode() == 0 else 0 )288if __name__ == '__main__':289 app = QApplication(sys.argv)290 app.setApplicationName("Megasolid Idiom")291 window = MainWindow()...
top_7_stress.py
Source:top_7_stress.py
...27 def RunNavigateSteps(self, action_runner):28 super(GoogleWebSearchPage, self).RunNavigateSteps(action_runner)29 action_runner.WaitForElement(text='Next')30 def RunPageInteractions(self, action_runner):31 with action_runner.CreateGestureInteraction('ScrollAction'):32 action_runner.ScrollPage()33 old_href = _GetCurrentLocation(action_runner)34 action_runner.ClickElement(text='Next')35 _WaitForLocationChange(action_runner, old_href)36 action_runner.WaitForElement(text='Next')37 with action_runner.CreateGestureInteraction('ScrollAction'):38 action_runner.ScrollPage()39 old_href = _GetCurrentLocation(action_runner)40 action_runner.ClickElement(text='Next')41 _WaitForLocationChange(action_runner, old_href)42 action_runner.WaitForElement(text='Next')43 with action_runner.CreateGestureInteraction('ScrollAction'):44 action_runner.ScrollPage()45 old_href = _GetCurrentLocation(action_runner)46 action_runner.ClickElement(text='Next')47 _WaitForLocationChange(action_runner, old_href)48 action_runner.WaitForElement(text='Previous')49 with action_runner.CreateGestureInteraction('ScrollAction'):50 action_runner.ScrollPage()51 old_href = _GetCurrentLocation(action_runner)52 action_runner.ClickElement(text='Previous')53 _WaitForLocationChange(action_runner, old_href)54 action_runner.WaitForElement(text='Previous')55 with action_runner.CreateGestureInteraction('ScrollAction'):56 action_runner.ScrollPage()57 old_href = _GetCurrentLocation(action_runner)58 action_runner.ClickElement(text='Previous')59 _WaitForLocationChange(action_runner, old_href)60 action_runner.WaitForElement(text='Previous')61 with action_runner.CreateGestureInteraction('ScrollAction'):62 action_runner.ScrollPage()63 old_href = _GetCurrentLocation(action_runner)64 action_runner.ClickElement(text='Previous')65 _WaitForLocationChange(action_runner, old_href)66 action_runner.WaitForElement(text='Images')67 with action_runner.CreateGestureInteraction('ScrollAction'):68 action_runner.ScrollPage()69 old_href = _GetCurrentLocation(action_runner)70 action_runner.ClickElement(text='Images')71 _WaitForLocationChange(action_runner, old_href)72 action_runner.WaitForElement(text='Images')73class GmailPage(Top7StressPage):74 """ Why: productivity, top google properties """75 def __init__(self, page_set):76 super(GmailPage, self).__init__(77 url='https://mail.google.com/mail/',78 page_set=page_set)79 self.credentials = 'google'80 def RunNavigateSteps(self, action_runner):81 super(GmailPage, self).RunNavigateSteps(action_runner)82 action_runner.WaitForJavaScriptCondition(83 'window.gmonkey !== undefined &&'84 'document.getElementById("gb") !== null')85 def RunPageInteractions(self, action_runner):86 old_href = _GetCurrentLocation(action_runner)87 action_runner.ClickElement(88 'a[href="https://mail.google.com/mail/u/0/?shva=1#starred"]')89 _WaitForLocationChange(action_runner, old_href)90 old_href = _GetCurrentLocation(action_runner)91 action_runner.ClickElement(92 'a[href="https://mail.google.com/mail/u/0/?shva=1#inbox"]')93 _WaitForLocationChange(action_runner, old_href)94class GoogleCalendarPage(Top7StressPage):95 """ Why: productivity, top google properties """96 def __init__(self, page_set):97 super(GoogleCalendarPage, self).__init__(98 url='https://www.google.com/calendar/',99 page_set=page_set)100 self.credentials = 'google'101 def RunNavigateSteps(self, action_runner):102 super(GoogleCalendarPage, self).RunNavigateSteps(action_runner)103 action_runner.Wait(2)104 action_runner.WaitForElement('div[class~="navForward"]')105 action_runner.ExecuteJavaScript('''106 (function() {107 var elem = document.createElement('meta');108 elem.name='viewport';109 elem.content='initial-scale=1';110 document.body.appendChild(elem);111 })();''')112 action_runner.Wait(1)113 def RunPageInteractions(self, action_runner):114 action_runner.ClickElement('div[class~="navForward"]')115 action_runner.Wait(2)116 action_runner.WaitForElement('div[class~="navForward"]')117 action_runner.ClickElement('div[class~="navForward"]')118 action_runner.Wait(2)119 action_runner.WaitForElement('div[class~="navForward"]')120 action_runner.ClickElement('div[class~="navForward"]')121 action_runner.Wait(2)122 action_runner.WaitForElement('div[class~="navForward"]')123 action_runner.ClickElement('div[class~="navForward"]')124 action_runner.Wait(2)125 action_runner.WaitForElement('div[class~="navBack"]')126 action_runner.ClickElement('div[class~="navBack"]')127 action_runner.Wait(2)128 action_runner.WaitForElement('div[class~="navBack"]')129 action_runner.ClickElement('div[class~="navBack"]')130 action_runner.Wait(2)131 action_runner.WaitForElement('div[class~="navBack"]')132 action_runner.ClickElement('div[class~="navBack"]')133 action_runner.Wait(2)134 action_runner.WaitForElement('div[class~="navBack"]')135 action_runner.ClickElement('div[class~="navBack"]')136 action_runner.Wait(2)137 action_runner.WaitForElement('div[class~="navBack"]')138class GooglePlusPage(Top7StressPage):139 """ Why: social; top google property; Public profile; infinite scrolls """140 def __init__(self, page_set):141 super(GooglePlusPage, self).__init__(142 url='https://plus.google.com/110031535020051778989/posts',143 page_set=page_set)144 self.credentials = 'google'145 def RunNavigateSteps(self, action_runner):146 super(GooglePlusPage, self).RunNavigateSteps(action_runner)147 action_runner.WaitForElement(text='Home')148 def RunPageInteractions(self, action_runner):149 action_runner.ClickElement(text='Home')150 action_runner.Wait(2)151 action_runner.WaitForElement(text='Profile')152 action_runner.ClickElement(text='Profile')153 action_runner.Wait(2)154 action_runner.WaitForElement(text='Explore')155 action_runner.ClickElement(text='Explore')156 action_runner.Wait(2)157 action_runner.WaitForElement(text='Events')158 action_runner.ClickElement(text='Events')159 action_runner.Wait(2)160 action_runner.WaitForElement(text='Communities')161 action_runner.ClickElement(text='Communities')162 action_runner.Wait(2)163 action_runner.WaitForElement(text='Home')164class BlogspotPage(Top7StressPage):165 """ Why: #11 (Alexa global), google property; some blogger layouts have166 infinite scroll but more interesting """167 def __init__(self, page_set):168 super(BlogspotPage, self).__init__(169 url='http://googlewebmastercentral.blogspot.com/',170 page_set=page_set,171 name='Blogger')172 def RunNavigateSteps(self, action_runner):173 super(BlogspotPage, self).RunNavigateSteps(action_runner)174 action_runner.WaitForElement(text='accessibility')175 def RunPageInteractions(self, action_runner):176 action_runner.ClickElement(text='accessibility')177 action_runner.WaitForNavigate()178 with action_runner.CreateGestureInteraction('ScrollAction'):179 action_runner.ScrollPage()180 # Insert 300ms wait to simulate user finger movement,181 # and ensure scheduling of idle tasks.182 action_runner.Wait(0.3)183 action_runner.ClickElement(text='advanced')184 action_runner.WaitForNavigate()185 with action_runner.CreateGestureInteraction('ScrollAction'):186 action_runner.ScrollPage()187 action_runner.Wait(0.3)188 action_runner.ClickElement(text='beginner')189 action_runner.WaitForNavigate()190 with action_runner.CreateGestureInteraction('ScrollAction'):191 action_runner.ScrollPage()192 action_runner.Wait(0.3)193 action_runner.ClickElement(text='Home')194 action_runner.WaitForNavigate()195class WordpressPage(Top7StressPage):196 """ Why: #18 (Alexa global), Picked an interesting post """197 def __init__(self, page_set):198 super(WordpressPage, self).__init__(199 # pylint: disable=line-too-long200 url='http://en.blog.wordpress.com/2012/09/04/freshly-pressed-editors-picks-for-august-2012/',201 page_set=page_set,202 name='Wordpress')203 def RunNavigateSteps(self, action_runner):204 super(WordpressPage, self).RunNavigateSteps(action_runner)205 action_runner.WaitForElement(206 # pylint: disable=line-too-long207 'a[href="http://en.blog.wordpress.com/2012/08/30/new-themes-able-and-sight/"]')208 def RunPageInteractions(self, action_runner):209 with action_runner.CreateGestureInteraction('ScrollAction'):210 action_runner.ScrollPage()211 # Insert 300ms wait to simulate user finger movement,212 # and ensure scheduling of idle tasks.213 action_runner.Wait(0.3)214 action_runner.ClickElement(215 # pylint: disable=line-too-long216 'a[href="http://en.blog.wordpress.com/2012/08/30/new-themes-able-and-sight/"]')217 action_runner.WaitForNavigate()218 with action_runner.CreateGestureInteraction('ScrollAction'):219 action_runner.ScrollPage()220 action_runner.Wait(0.3)221 action_runner.ClickElement(text='Features')222 action_runner.WaitForNavigate()223 with action_runner.CreateGestureInteraction('ScrollAction'):224 action_runner.ScrollPage()225 action_runner.Wait(0.3)226 action_runner.ClickElement(text='News')227 action_runner.WaitForNavigate()228 with action_runner.CreateGestureInteraction('ScrollAction'):229 action_runner.ScrollPage()230class FacebookPage(Top7StressPage):231 """ Why: top social,Public profile """232 def __init__(self, page_set):233 super(FacebookPage, self).__init__(234 url='https://www.facebook.com/barackobama',235 page_set=page_set,236 name='Facebook')237 self.credentials = 'facebook2'238 def RunNavigateSteps(self, action_runner):239 super(FacebookPage, self).RunNavigateSteps(action_runner)240 action_runner.WaitForElement(text='About')241 def RunPageInteractions(self, action_runner):242 # Scroll and wait for the next page to be loaded.243 with action_runner.CreateGestureInteraction('ScrollAction'):244 action_runner.ScrollPage()245 action_runner.WaitForJavaScriptCondition(246 'document.documentElement.scrollHeight - window.innerHeight - '247 'window.pageYOffset > 0')248 # Scroll and wait again.249 with action_runner.CreateGestureInteraction('ScrollAction'):250 action_runner.ScrollPage()251 action_runner.WaitForJavaScriptCondition(252 'document.documentElement.scrollHeight - window.innerHeight - '253 'window.pageYOffset > 0')254class Top7StressPageSet(story.StorySet):255 """ Pages hand-picked for stress testing. """256 def __init__(self):257 super(Top7StressPageSet, self).__init__(258 archive_data_file='data/top_7_stress.json',259 cloud_storage_bucket=story.PARTNER_BUCKET)260 self.AddStory(GoogleWebSearchPage(self))261 self.AddStory(GmailPage(self))262 self.AddStory(GoogleCalendarPage(self))263 self.AddStory(GooglePlusPage(self))...
xbmcgui_Constants.py
Source:xbmcgui_Constants.py
1import sys23INT_MAX = sys.maxint4ACTION_ANALOG_FORWARD = 1135ACTION_ANALOG_MOVE = 496ACTION_ANALOG_MOVE_X_LEFT = 6017ACTION_ANALOG_MOVE_X_RIGHT = 6028ACTION_ANALOG_MOVE_Y_DOWN = 6049ACTION_ANALOG_MOVE_Y_UP = 60310ACTION_ANALOG_REWIND = 11411ACTION_ANALOG_SEEK_BACK = 12512ACTION_ANALOG_SEEK_FORWARD = 12413ACTION_ASPECT_RATIO = 1914ACTION_AUDIO_DELAY = 16115ACTION_AUDIO_DELAY_MIN = 5416ACTION_AUDIO_DELAY_PLUS = 5517ACTION_AUDIO_NEXT_LANGUAGE = 5618ACTION_BACKSPACE = 11019ACTION_BIG_STEP_BACK = 2320ACTION_BIG_STEP_FORWARD = 2221ACTION_BROWSE_SUBTITLE = 24722ACTION_BUILT_IN_FUNCTION = 12223ACTION_CALIBRATE_RESET = 4824ACTION_CALIBRATE_SWAP_ARROWS = 4725ACTION_CHANGE_RESOLUTION = 5726ACTION_CHANNEL_DOWN = 18527ACTION_CHANNEL_NUMBER_SEP = 19228ACTION_CHANNEL_SWITCH = 18329ACTION_CHANNEL_UP = 18430ACTION_CHAPTER_OR_BIG_STEP_BACK = 9831ACTION_CHAPTER_OR_BIG_STEP_FORWARD = 9732ACTION_CONTEXT_MENU = 11733ACTION_COPY_ITEM = 8134ACTION_CREATE_BOOKMARK = 9635ACTION_CREATE_EPISODE_BOOKMARK = 9536ACTION_CURSOR_LEFT = 12037ACTION_CURSOR_RIGHT = 12138ACTION_CYCLE_SUBTITLE = 9939ACTION_DECREASE_PAR = 22040ACTION_DECREASE_RATING = 13741ACTION_DELETE_ITEM = 8042ACTION_ENTER = 13543ACTION_ERROR = 99844ACTION_FILTER = 23345ACTION_FILTER_CLEAR = 15046ACTION_FILTER_SMS2 = 15147ACTION_FILTER_SMS3 = 15248ACTION_FILTER_SMS4 = 15349ACTION_FILTER_SMS5 = 15450ACTION_FILTER_SMS6 = 15551ACTION_FILTER_SMS7 = 15652ACTION_FILTER_SMS8 = 15753ACTION_FILTER_SMS9 = 15854ACTION_FIRST_PAGE = 15955ACTION_FORWARD = 1656ACTION_GESTURE_ABORT = 50557ACTION_GESTURE_BEGIN = 50158ACTION_GESTURE_END = 59959ACTION_GESTURE_NOTIFY = 50060ACTION_GESTURE_PAN = 50461ACTION_GESTURE_ROTATE = 50362ACTION_GESTURE_SWIPE_DOWN = 54163ACTION_GESTURE_SWIPE_DOWN_TEN = 55064ACTION_GESTURE_SWIPE_LEFT = 51165ACTION_GESTURE_SWIPE_LEFT_TEN = 52066ACTION_GESTURE_SWIPE_RIGHT = 52167ACTION_GESTURE_SWIPE_RIGHT_TEN = 53068ACTION_GESTURE_SWIPE_UP = 53169ACTION_GESTURE_SWIPE_UP_TEN = 54070ACTION_GESTURE_ZOOM = 50271ACTION_GUIPROFILE_BEGIN = 20472ACTION_HIGHLIGHT_ITEM = 873ACTION_INCREASE_PAR = 21974ACTION_INCREASE_RATING = 13675ACTION_INPUT_TEXT = 24476ACTION_JUMP_SMS2 = 14277ACTION_JUMP_SMS3 = 14378ACTION_JUMP_SMS4 = 14479ACTION_JUMP_SMS5 = 14580ACTION_JUMP_SMS6 = 14681ACTION_JUMP_SMS7 = 14782ACTION_JUMP_SMS8 = 14883ACTION_JUMP_SMS9 = 14984ACTION_LAST_PAGE = 16085ACTION_MENU = 16386ACTION_MOUSE_DOUBLE_CLICK = 10387ACTION_MOUSE_DRAG = 10688ACTION_MOUSE_END = 10989ACTION_MOUSE_LEFT_CLICK = 10090ACTION_MOUSE_LONG_CLICK = 10891ACTION_MOUSE_MIDDLE_CLICK = 10292ACTION_MOUSE_MOVE = 10793ACTION_MOUSE_RIGHT_CLICK = 10194ACTION_MOUSE_START = 10095ACTION_MOUSE_WHEEL_DOWN = 10596ACTION_MOUSE_WHEEL_UP = 10497ACTION_MOVE_DOWN = 498ACTION_MOVE_ITEM = 8299ACTION_MOVE_ITEM_DOWN = 116100ACTION_MOVE_ITEM_UP = 115101ACTION_MOVE_LEFT = 1102ACTION_MOVE_RIGHT = 2103ACTION_MOVE_UP = 3104ACTION_MUTE = 91105ACTION_NAV_BACK = 92106ACTION_NEXT_CHANNELGROUP = 186107ACTION_NEXT_CONTROL = 181108ACTION_NEXT_ITEM = 14109ACTION_NEXT_LETTER = 140110ACTION_NEXT_PICTURE = 28111ACTION_NEXT_SCENE = 138112ACTION_NEXT_SUBTITLE = 26113ACTION_NONE = 0114ACTION_NOOP = 999115ACTION_PAGE_DOWN = 6116ACTION_PAGE_UP = 5117ACTION_PARENT_DIR = 9118ACTION_PASTE = 180119ACTION_PAUSE = 12120ACTION_PLAYER_DEBUG = 27121ACTION_PLAYER_FORWARD = 77122ACTION_PLAYER_PLAY = 79123ACTION_PLAYER_PLAYPAUSE = 229124ACTION_PLAYER_PROCESS_INFO = 69125ACTION_PLAYER_PROGRAM_SELECT = 70126ACTION_PLAYER_RESET = 248127ACTION_PLAYER_REWIND = 78128ACTION_PREVIOUS_CHANNELGROUP = 187129ACTION_PREVIOUS_MENU = 10130ACTION_PREV_CONTROL = 182131ACTION_PREV_ITEM = 15132ACTION_PREV_LETTER = 141133ACTION_PREV_PICTURE = 29134ACTION_PREV_SCENE = 139135ACTION_PVR_PLAY = 188136ACTION_PVR_PLAY_RADIO = 190137ACTION_PVR_PLAY_TV = 189138ACTION_PVR_SHOW_TIMER_RULE = 191139ACTION_QUEUE_ITEM = 34140ACTION_RECORD = 170141ACTION_RELOAD_KEYMAPS = 203142ACTION_REMOVE_ITEM = 35143ACTION_RENAME_ITEM = 87144ACTION_REWIND = 17145ACTION_ROTATE_PICTURE_CCW = 51146ACTION_ROTATE_PICTURE_CW = 50147ACTION_SCAN_ITEM = 201148ACTION_SCROLL_DOWN = 112149ACTION_SCROLL_UP = 111150ACTION_SELECT_ITEM = 7151ACTION_SETTINGS_LEVEL_CHANGE = 242152ACTION_SETTINGS_RESET = 241153ACTION_SET_RATING = 164154ACTION_SHIFT = 118155ACTION_SHOW_FULLSCREEN = 36156ACTION_SHOW_GUI = 18157ACTION_SHOW_INFO = 11158ACTION_SHOW_OSD = 24159ACTION_SHOW_OSD_TIME = 123160ACTION_SHOW_PLAYLIST = 33161ACTION_SHOW_SUBTITLES = 25162ACTION_SHOW_VIDEOMENU = 134163ACTION_SMALL_STEP_BACK = 76164ACTION_STEP_BACK = 21165ACTION_STEP_FORWARD = 20166ACTION_STEREOMODE_NEXT = 235167ACTION_STEREOMODE_PREVIOUS = 236168ACTION_STEREOMODE_SELECT = 238169ACTION_STEREOMODE_SET = 240170ACTION_STEREOMODE_TOGGLE = 237171ACTION_STEREOMODE_TOMONO = 239172ACTION_STOP = 13173ACTION_SUBTITLE_ALIGN = 232174ACTION_SUBTITLE_DELAY = 162175ACTION_SUBTITLE_DELAY_MIN = 52176ACTION_SUBTITLE_DELAY_PLUS = 53177ACTION_SUBTITLE_VSHIFT_DOWN = 231178ACTION_SUBTITLE_VSHIFT_UP = 230179ACTION_SWITCH_PLAYER = 234180ACTION_SYMBOLS = 119181ACTION_TAKE_SCREENSHOT = 85182ACTION_TELETEXT_BLUE = 218183ACTION_TELETEXT_GREEN = 216184ACTION_TELETEXT_RED = 215185ACTION_TELETEXT_YELLOW = 217186ACTION_TOGGLE_COMMSKIP = 246187ACTION_TOGGLE_DIGITAL_ANALOG = 202188ACTION_TOGGLE_FONT = 249189ACTION_TOGGLE_FULLSCREEN = 199190ACTION_TOGGLE_SOURCE_DEST = 32191ACTION_TOGGLE_WATCHED = 200192ACTION_TOUCH_LONGPRESS = 411193ACTION_TOUCH_LONGPRESS_TEN = 420194ACTION_TOUCH_TAP = 401195ACTION_TOUCH_TAP_TEN = 410196ACTION_TRIGGER_OSD = 243197ACTION_VIS_PRESET_LOCK = 130198ACTION_VIS_PRESET_NEXT = 128199ACTION_VIS_PRESET_PREV = 129200ACTION_VIS_PRESET_RANDOM = 131201ACTION_VIS_PRESET_SHOW = 126202ACTION_VIS_RATE_PRESET_MINUS = 133203ACTION_VIS_RATE_PRESET_PLUS = 132204ACTION_VOICE_RECOGNIZE = 300205ACTION_VOLAMP = 90206ACTION_VOLAMP_DOWN = 94207ACTION_VOLAMP_UP = 93208ACTION_VOLUME_DOWN = 89209ACTION_VOLUME_SET = 245210ACTION_VOLUME_UP = 88211ACTION_VSHIFT_DOWN = 228212ACTION_VSHIFT_UP = 227213ACTION_ZOOM_IN = 31214ACTION_ZOOM_LEVEL_1 = 38215ACTION_ZOOM_LEVEL_2 = 39216ACTION_ZOOM_LEVEL_3 = 40217ACTION_ZOOM_LEVEL_4 = 41218ACTION_ZOOM_LEVEL_5 = 42219ACTION_ZOOM_LEVEL_6 = 43220ACTION_ZOOM_LEVEL_7 = 44221ACTION_ZOOM_LEVEL_8 = 45222ACTION_ZOOM_LEVEL_9 = 46223ACTION_ZOOM_LEVEL_NORMAL = 37224ACTION_ZOOM_OUT = 30225ALPHANUM_HIDE_INPUT = 2226CONTROL_TEXT_OFFSET_X = 10227CONTROL_TEXT_OFFSET_Y = 2228HORIZONTAL = 0229ICON_OVERLAY_HD = 6230ICON_OVERLAY_LOCKED = 3231ICON_OVERLAY_NONE = 0232ICON_OVERLAY_RAR = 1233ICON_OVERLAY_UNWATCHED = 4234ICON_OVERLAY_WATCHED = 5235ICON_OVERLAY_ZIP = 2236ICON_TYPE_FILES = 106237ICON_TYPE_MUSIC = 103238ICON_TYPE_NONE = 101239ICON_TYPE_PICTURES = 104240ICON_TYPE_PROGRAMS = 102241ICON_TYPE_SETTINGS = 109242ICON_TYPE_VIDEOS = 105243ICON_TYPE_WEATHER = 107244INPUT_ALPHANUM = 0245INPUT_DATE = 2246INPUT_IPADDRESS = 4247INPUT_NUMERIC = 1248INPUT_PASSWORD = 5249INPUT_TIME = 3250KEY_APPCOMMAND = 53248251KEY_ASCII = 61696252KEY_BUTTON_A = 256253KEY_BUTTON_B = 257254KEY_BUTTON_BACK = 275255KEY_BUTTON_BLACK = 260256KEY_BUTTON_DPAD_DOWN = 271257KEY_BUTTON_DPAD_LEFT = 272258KEY_BUTTON_DPAD_RIGHT = 273259KEY_BUTTON_DPAD_UP = 270260KEY_BUTTON_LEFT_ANALOG_TRIGGER = 278261KEY_BUTTON_LEFT_THUMB_BUTTON = 276262KEY_BUTTON_LEFT_THUMB_STICK = 264263KEY_BUTTON_LEFT_THUMB_STICK_DOWN = 281264KEY_BUTTON_LEFT_THUMB_STICK_LEFT = 282265KEY_BUTTON_LEFT_THUMB_STICK_RIGHT = 283266KEY_BUTTON_LEFT_THUMB_STICK_UP = 280267KEY_BUTTON_LEFT_TRIGGER = 262268KEY_BUTTON_RIGHT_ANALOG_TRIGGER = 279269KEY_BUTTON_RIGHT_THUMB_BUTTON = 277270KEY_BUTTON_RIGHT_THUMB_STICK = 265271KEY_BUTTON_RIGHT_THUMB_STICK_DOWN = 267272KEY_BUTTON_RIGHT_THUMB_STICK_LEFT = 268273KEY_BUTTON_RIGHT_THUMB_STICK_RIGHT = 269274KEY_BUTTON_RIGHT_THUMB_STICK_UP = 266275KEY_BUTTON_RIGHT_TRIGGER = 263276KEY_BUTTON_START = 274277KEY_BUTTON_WHITE = 261278KEY_BUTTON_X = 258279KEY_BUTTON_Y = 259280KEY_INVALID = 65535281KEY_MOUSE_CLICK = 57344282KEY_MOUSE_DOUBLE_CLICK = 57360283KEY_MOUSE_DRAG = 57604284KEY_MOUSE_DRAG_END = 57606285KEY_MOUSE_DRAG_START = 57605286KEY_MOUSE_END = 61439287KEY_MOUSE_LONG_CLICK = 57376288KEY_MOUSE_MIDDLECLICK = 57346289KEY_MOUSE_MOVE = 57603290KEY_MOUSE_NOOP = 61439291KEY_MOUSE_RDRAG = 57607292KEY_MOUSE_RDRAG_END = 57609293KEY_MOUSE_RDRAG_START = 57608294KEY_MOUSE_RIGHTCLICK = 57345295KEY_MOUSE_START = 57344296KEY_MOUSE_WHEEL_DOWN = 57602297KEY_MOUSE_WHEEL_UP = 57601298KEY_UNICODE = 61952299KEY_VKEY = 61440300KEY_VMOUSE = 61439301NOTIFICATION_ERROR = 'error'302NOTIFICATION_INFO = 'info'303NOTIFICATION_WARNING = 'warning'304PASSWORD_VERIFY = 1305REMOTE_0 = 58306REMOTE_1 = 59307REMOTE_2 = 60308REMOTE_3 = 61309REMOTE_4 = 62310REMOTE_5 = 63311REMOTE_6 = 64312REMOTE_7 = 65313REMOTE_8 = 66314REMOTE_9 = 67
...
action_utils.py
Source:action_utils.py
1# Copyright 2015 The Chromium Authors. All rights reserved.2# Use of this source code is governed by a BSD-style license that can be3# found in the LICENSE file.4"""A utility module for parsing and applying action suffixes in actions.xml.5Note: There is a copy of this file used internally by the UMA processing6infrastructure. Any changes to this file should also be done (manually) to the7internal copy. Please contact tools/metrics/OWNERS for more details.8"""9class Error(Exception):10 pass11class UndefinedActionItemError(Error):12 pass13class InvalidOrderingAttributeError(Error):14 pass15class SuffixNameEmptyError(Error):16 pass17class InvalidAffecteddActionNameError(Error):18 pass19class Action(object):20 """Represents Chrome user action.21 Attributes:22 name: name of the action.23 description: description of the action.24 owners: list of action owners25 not_user_triggered: if action is not user triggered26 obsolete: explanation on why user action is not being used anymore27 """28 def __init__(self, name, description, owners,29 not_user_triggered=False, obsolete=None):30 self.name = name31 self.description = description32 self.owners = owners33 self.not_user_triggered = not_user_triggered34 self.obsolete = obsolete35class Suffix(object):36 """Action suffix in actions.xml.37 Attributes:38 name: name of the suffix.39 description: description of the suffix.40 separator: the separator between affected action name and suffix name.41 ordering: 'suffix' or 'prefix'. if set to prefix, suffix name will be42 inserted after the first dot separator of affected action name.43 """44 def __init__(self, name, description, separator, ordering):45 if not name:46 raise SuffixNameEmptyError('Suffix name cannot be empty.')47 if ordering != 'suffix' and ordering != 'prefix':48 raise InvalidOrderingAttributeError("Ordering has to be either 'prefix' "49 "or 'suffix'.")50 self.name = name51 self.description = description52 self.separator = separator53 self.ordering = ordering54 def __repr__(self):55 return '<%s, %s, %s, %s>' % (self.name, self.description, self.separator,56 self.ordering)57def CreateActionsFromSuffixes(actions_dict, action_suffix_nodes):58 """Creates new actions from suffixes and adds them to actions_dict.59 Args:60 actions_dict: dict of existing action name to Action object.61 action_suffix_nodes: a list of action-suffix nodes62 Returns:63 A dictionary of action name to list of Suffix objects for that action.64 Raises:65 UndefinedActionItemError: if an affected action name can't be found66 """67 action_to_suffixes_dict = _CreateActionToSuffixesDict(action_suffix_nodes)68 # Some actions in action_to_suffixes_dict keys may yet to be created.69 # Therefore, while new actions can be created and added to the existing70 # actions keep calling _CreateActionsFromSuffixes.71 while _CreateActionsFromSuffixes(actions_dict, action_to_suffixes_dict):72 pass73 # If action_to_suffixes_dict is not empty by the end, we have missing actions.74 if action_to_suffixes_dict:75 raise UndefinedActionItemError('Following actions are missing: %s.'76 %(action_to_suffixes_dict.keys()))77def _CreateActionToSuffixesDict(action_suffix_nodes):78 """Creates a dict of action name to list of Suffix objects for that action.79 Args:80 action_suffix_nodes: a list of action-suffix nodes81 Returns:82 A dictionary of action name to list of Suffix objects for that action.83 """84 action_to_suffixes_dict = {}85 for action_suffix_node in action_suffix_nodes:86 separator = _GetAttribute(action_suffix_node, 'separator', '_')87 ordering = _GetAttribute(action_suffix_node, 'ordering', 'suffix')88 suffixes = [Suffix(suffix_node.getAttribute('name'),89 suffix_node.getAttribute('label'),90 separator, ordering) for suffix_node in91 action_suffix_node.getElementsByTagName('suffix')]92 action_nodes = action_suffix_node.getElementsByTagName('affected-action')93 for action_node in action_nodes:94 action_name = action_node.getAttribute('name')95 # If <affected-action> has <with-suffix> child nodes, only those suffixes96 # should be used with that action. filter the list of suffix names if so.97 action_suffix_names = [suffix_node.getAttribute('name') for suffix_node in98 action_node.getElementsByTagName('with-suffix')]99 if action_suffix_names:100 action_suffixes = [suffix for suffix in suffixes if suffix.name in101 action_suffix_names]102 else:103 action_suffixes = list(suffixes)104 if action_name in action_to_suffixes_dict:105 action_to_suffixes_dict[action_name] += action_suffixes106 else:107 action_to_suffixes_dict[action_name] = action_suffixes108 return action_to_suffixes_dict109def _GetAttribute(node, attribute_name, default_value):110 """Returns the attribute's value or default_value if attribute doesn't exist.111 Args:112 node: an XML dom element.113 attribute_name: name of the attribute.114 default_value: default value to return if attribute doesn't exist.115 Returns:116 The value of the attribute or default_value if attribute doesn't exist.117 """118 if node.hasAttribute(attribute_name):119 return node.getAttribute(attribute_name)120 else:121 return default_value122def _CreateActionsFromSuffixes(actions_dict, action_to_suffixes_dict):123 """Creates new actions with action-suffix pairs and adds them to actions_dict.124 For every key (action name) in action_to_suffixes_dict, This function looks125 to see wether it exists in actions_dict. If so it combines the Action object126 from actions_dict with all the Suffix objects from action_to_suffixes_dict to127 create new Action objects. New Action objects are added to actions_dict and128 the action name is removed from action_to_suffixes_dict.129 Args:130 actions_dict: dict of existing action name to Action object.131 action_to_suffixes_dict: dict of action name to list of Suffix objects it132 will combine with.133 Returns:134 True if any new action was added, False otherwise.135 """136 expanded_actions = set()137 for action_name, suffixes in action_to_suffixes_dict.iteritems():138 if action_name in actions_dict:139 existing_action = actions_dict[action_name]140 for suffix in suffixes:141 _CreateActionFromSuffix(actions_dict, existing_action, suffix)142 expanded_actions.add(action_name)143 for action_name in expanded_actions:144 del action_to_suffixes_dict[action_name]145 return bool(expanded_actions)146def _CreateActionFromSuffix(actions_dict, action, suffix):147 """Creates a new action with action and suffix and adds it to actions_dict.148 Args:149 actions_dict: dict of existing action name to Action object.150 action: an Action object to combine with suffix.151 suffix: a suffix object to combine with action.152 Returns:153 None.154 Raises:155 InvalidAffecteddActionNameError: if the action name does not contain a dot156 """157 if suffix.ordering == 'suffix':158 new_action_name = action.name + suffix.separator + suffix.name159 else:160 (before, dot, after) = action.name.partition('.')161 if not after:162 raise InvalidAffecteddActionNameError("Action name '%s' must contain a "163 "'.'.", action.name)164 new_action_name = before + dot + suffix.name + suffix.separator + after165 new_action_description = action.description + ' ' + suffix.description166 actions_dict[new_action_name] = Action(new_action_name,167 new_action_description,168 list(action.owners),169 action.not_user_triggered,...
regactions.py
Source:regactions.py
1from zoundry.appframework.ui.actions.image.imageactions import ZCopyImageLocationAction2from zoundry.appframework.ui.actions.image.imageactions import ZOpenImageAction3from zoundry.appframework.ui.actions.link.linkactions import ZCopyLinkLocationAction4from zoundry.appframework.ui.actions.link.linkactions import ZOpenLinkAction5from zoundry.blogapp.constants import IZBlogAppActionIDs6from zoundry.blogapp.ui.actions.blog.blogactions import ZBlogConfigureMenuAction7from zoundry.blogapp.ui.actions.blog.blogactions import ZDownloadBlogTemplateAction8from zoundry.blogapp.ui.actions.blog.blogactions import ZNewPostInBlogMenuAction9from zoundry.blogapp.ui.actions.blog.blogactions import ZViewBlogAction10from zoundry.blogapp.ui.actions.blogpost.postactions import ZCopyBlogPostUrlAction11from zoundry.blogapp.ui.actions.blogpost.postactions import ZDeleteBlogPostAction12from zoundry.blogapp.ui.actions.blogpost.postactions import ZOpenAsUnpublishedBlogPostAction13from zoundry.blogapp.ui.actions.blogpost.postactions import ZOpenBlogPostAction14from zoundry.blogapp.ui.actions.blogpost.postactions import ZViewBlogPostAction15from zoundry.blogapp.ui.menus.account.accountmenu import ZAccountSettingsMenuAction16from zoundry.blogapp.ui.menus.account.accountmenu import ZAccountSynchronizeMenuAction17from zoundry.blogapp.ui.menus.main.feedback import ZFeedbackMenuAction18from zoundry.blogapp.ui.menus.main.file import ZExitMenuAction19from zoundry.blogapp.ui.menus.main.file_new import ZNewBlogPostMenuAction20from zoundry.blogapp.ui.menus.main.file_new import ZNewBlogSiteMenuAction21from zoundry.blogapp.ui.menus.main.file_new import ZNewMediaStorageMenuAction22from zoundry.blogapp.ui.menus.main.help import ZAboutMenuAction23from zoundry.blogapp.ui.menus.main.help import ZCheck4UpdatesMenuAction24from zoundry.blogapp.ui.menus.main.help import ZGetSupportMenuAction25from zoundry.blogapp.ui.menus.main.help import ZManageTranslationsMenuAction26from zoundry.blogapp.ui.menus.main.tools import ZAccountManagerMenuAction27from zoundry.blogapp.ui.menus.main.tools import ZBackgroundTasksMenuAction28from zoundry.blogapp.ui.menus.main.tools import ZManageTemplatesMenuAction29from zoundry.blogapp.ui.menus.main.tools import ZMediaStoragesMenuAction30from zoundry.blogapp.ui.menus.main.tools import ZSettingsMenuAction31from zoundry.blogapp.ui.menus.mediastoragemanager import ZDeleteMediaStorageMenuAction32from zoundry.blogapp.ui.menus.mediastoragemanager import ZEditMediaStorageMenuAction33from zoundry.blogapp.ui.trayactions import ZExitFromTrayAction34from zoundry.blogapp.ui.trayactions import ZMinimizeAction35from zoundry.blogapp.ui.trayactions import ZRestoreAction3637# ------------------------------------------------------------------------------38# Convenience function for registering all built-in actions with the action39# registry.40# ------------------------------------------------------------------------------41def registerBlogAppActions(actionRegistry):4243 # Main menu actions.44 actionRegistry.registerAction(IZBlogAppActionIDs.EXIT_ACTION, ZExitMenuAction())45 actionRegistry.registerAction(IZBlogAppActionIDs.ACCOUNT_MANAGER_ACTION, ZAccountManagerMenuAction())46 actionRegistry.registerAction(IZBlogAppActionIDs.SETTINGS_ACTION, ZSettingsMenuAction())47 actionRegistry.registerAction(IZBlogAppActionIDs.BACKGROUND_TASKS_ACTION, ZBackgroundTasksMenuAction())48 actionRegistry.registerAction(IZBlogAppActionIDs.MANAGE_TEMPLATES_ACTION, ZManageTemplatesMenuAction())49 actionRegistry.registerAction(IZBlogAppActionIDs.MANAGE_TRANSLATIONS_ACTION, ZManageTranslationsMenuAction())50 actionRegistry.registerAction(IZBlogAppActionIDs.MEDIA_STORES_ACTION, ZMediaStoragesMenuAction())51 actionRegistry.registerAction(IZBlogAppActionIDs.ABOUT_ACTION, ZAboutMenuAction())52 actionRegistry.registerAction(IZBlogAppActionIDs.FEEDBACK_ACTION, ZFeedbackMenuAction())53 actionRegistry.registerAction(IZBlogAppActionIDs.CHECK_FOR_UPDATES_ACTION, ZCheck4UpdatesMenuAction())54 actionRegistry.registerAction(IZBlogAppActionIDs.GET_SUPPORT_ACTION, ZGetSupportMenuAction())55 actionRegistry.registerAction(IZBlogAppActionIDs.NEW_MEDIA_STORAGE_ACTION, ZNewMediaStorageMenuAction())56 actionRegistry.registerAction(IZBlogAppActionIDs.NEW_BLOG_ACCOUNT_ACTION, ZNewBlogSiteMenuAction())57 actionRegistry.registerAction(IZBlogAppActionIDs.NEW_BLOG_POST_ACTION, ZNewBlogPostMenuAction())5859 actionRegistry.registerAction(IZBlogAppActionIDs.EDIT_MEDIA_STORE_ACTION, ZEditMediaStorageMenuAction())60 actionRegistry.registerAction(IZBlogAppActionIDs.DELETE_MEDIA_STORE_ACTION, ZDeleteMediaStorageMenuAction())6162 actionRegistry.registerAction(IZBlogAppActionIDs.OPEN_BLOG_POST_ACTION, ZOpenBlogPostAction())63 actionRegistry.registerAction(IZBlogAppActionIDs.OPEN_BLOG_POST_AS_UNPUBLISHED_ACTION, ZOpenAsUnpublishedBlogPostAction())64 actionRegistry.registerAction(IZBlogAppActionIDs.VIEW_BLOG_POST_ACTION, ZViewBlogPostAction())65 actionRegistry.registerAction(IZBlogAppActionIDs.DELETE_BLOG_POST_ACTION, ZDeleteBlogPostAction())66 actionRegistry.registerAction(IZBlogAppActionIDs.COPY_BLOG_POST_URL_ACTION, ZCopyBlogPostUrlAction())6768 actionRegistry.registerAction(IZBlogAppActionIDs.MINIMIZE_ACTION, ZMinimizeAction())69 actionRegistry.registerAction(IZBlogAppActionIDs.RESTORE_ACTION, ZRestoreAction())70 actionRegistry.registerAction(IZBlogAppActionIDs.EXIT_FROM_TRAY_ACTION, ZExitFromTrayAction())7172 actionRegistry.registerAction(IZBlogAppActionIDs.CONFIGURE_BLOG_ACTION, ZBlogConfigureMenuAction())73 actionRegistry.registerAction(IZBlogAppActionIDs.BLOG_NEW_BLOG_POST_ACTION, ZNewPostInBlogMenuAction())74 actionRegistry.registerAction(IZBlogAppActionIDs.VIEW_BLOG_ACTION, ZViewBlogAction())75 actionRegistry.registerAction(IZBlogAppActionIDs.DOWNLOAD_BLOG_TEMPLATE_ACTION, ZDownloadBlogTemplateAction())7677 actionRegistry.registerAction(IZBlogAppActionIDs.ACCOUNT_SETTINGS_ACTION, ZAccountSettingsMenuAction())78 actionRegistry.registerAction(IZBlogAppActionIDs.ACCOUNT_SYNCHRONIZE_ACTION, ZAccountSynchronizeMenuAction())7980 actionRegistry.registerAction(IZBlogAppActionIDs.OPEN_LINK_ACTION, ZOpenLinkAction())81 actionRegistry.registerAction(IZBlogAppActionIDs.COPY_LINK_LOCATION_ACTION, ZCopyLinkLocationAction())8283 actionRegistry.registerAction(IZBlogAppActionIDs.OPEN_IMAGE_ACTION, ZOpenImageAction())84 actionRegistry.registerAction(IZBlogAppActionIDs.COPY_IMAGE_LOCATION_ACTION, ZCopyImageLocationAction())85
...
Turtle.py
Source:Turtle.py
1'''2Created on Oct 31, 20113@author: ajju4'''5class Action(object):6 7 def __init__(self, action_id):8 self.__action_id = action_id9 self.__next_action_map = {}10 self.__redirect_action_map = {}11 self.__moves = []12 def get_redirect_action_map(self):13 return self.__redirect_action_map14 def addRedirectAction(self, action_name, action_id):15 self.__redirect_action_map[action_name] = action_id16 def set_redirect_action_map(self, value):17 self.__redirect_action_map = value18 def del_redirect_action_map(self):19 del self.__redirect_action_map20 def set_next_action_map(self, value):21 self.__next_action_map = value22 23 24 def get_next_action_map(self):25 return self.__next_action_map26 def addNextAction(self, action_name, action_id):27 self.__next_action_map[action_name] = action_id28 def del_next_action_map(self):29 del self.__next_action_map30 def get_action_id(self):31 return self.__action_id32 def get_moves(self):33 return self.__moves34 def set_action_id(self, value):35 self.__action_id = value36 def set_moves(self, value):37 self.__moves = value38 def del_action_id(self):39 del self.__action_id40 def del_moves(self):41 del self.__moves42 43 def addMove(self, move):44 self.__moves.append(move)45 46 action_id = property(get_action_id, set_action_id, del_action_id, "action_id's docstring")47 moves = property(get_moves, set_moves, del_moves, "moves's docstring")48 next_action_map = property(get_next_action_map, set_next_action_map, del_next_action_map, "next_action_map's docstring")49 redirect_action_map = property(get_redirect_action_map, set_redirect_action_map, del_redirect_action_map, "redirect_action_map's docstring")50 51 52class Move(object):53 54 def __init__(self, modulePath, functionName, pmessage):55 self.__module_path = modulePath56 self.__function_name = functionName57 self.__pmessage = pmessage58 def get_pmessage(self):59 return self.__pmessage60 def set_pmessage(self, value):61 self.__pmessage = value62 def del_pmessage(self):63 del self.__pmessage64 def get_module_path(self):65 return self.__module_path66 def get_function_name(self):67 return self.__function_name68 def set_module_path(self, value):69 self.__module_path = value70 def set_function_name(self, value):71 self.__function_name = value72 def del_module_path(self):73 del self.__module_path74 def del_function_name(self):75 del self.__function_name76 module_path = property(get_module_path, set_module_path, del_module_path, "module_path's docstring")77 function_name = property(get_function_name, set_function_name, del_function_name, "function_name's docstring")78 pmessage = property(get_pmessage, set_pmessage, del_pmessage, "pmessage's docstring")79 80 81class Service(object):82 83 def __init__(self, name, action_id):84 self.__service_name = name85 self.__action_id = action_id86 def get_service_name(self):87 return self.__service_name88 def get_action_id(self):89 return self.__action_id90 def set_service_name(self, value):91 self.__service_name = value92 def set_action_id(self, value):93 self.__action_id = value94 def del_service_name(self):95 del self.__service_name96 def del_action_id(self):97 del self.__action_id98 service_name = property(get_service_name, set_service_name, del_service_name, "service_name's docstring")99 action_id = property(get_action_id, set_action_id, del_action_id, "action_id's docstring")100 ...
Using AI Code Generation
1var ladle = require('ladle');2var indexName = 'testindex';3var typeName = 'testtype';4var id = '1';5var data = {6};7ladleClient.action(indexName, typeName, id, 'index', data, function (err, data) {8 console.log('Error: ' + err);9 console.log('Data: ' + data);10});11var elasticsearch = require('elasticsearch');12var client = new elasticsearch.Client({13});14var indexName = 'testindex';15var typeName = 'testtype';16var id = '1';17var data = {18};19client.action({20}, function (err, data) {21 console.log('Error: ' + err);22 console.log('Data: ' + data);23});24var elasticsearch = require('elasticsearch');25var client = new elasticsearch.Client({26});27var indexName = 'testindex';28var typeName = 'testtype';29var id = '1';30var data = {31};32client.action({33}, function (err, data) {34 console.log('Error: ' + err);35 console.log('Data: ' + data);36});37var elasticsearch = require('elasticsearch');38var client = new elasticsearch.Client({39});40var indexName = 'testindex';41var typeName = 'testtype';42var id = '1';43var data = {44};45client.action({46}, function (err, data) {
Using AI Code Generation
1var ladle = require('ladle');2var ladleClient = ladle.createClient({port: 5984});3ladleClient.action('PUT', '/db', function (err, data) {4 console.log(data);5});6ladleClient.action('DELETE', '/db', function (err, data) {7 console.log(data);8});9ladleClient.action('GET', '/db/doc', function (err, data) {10 console.log(data);11});12ladleClient.action('PUT', '/db/doc', {data: {title: 'test'}}, function (err, data) {13 console.log(data);14});15ladleClient.action('PUT', '/db/doc', {data: {_rev: '1-2', title: 'test'}}, function (err, data) {16 console.log(data);17});18ladleClient.action('DELETE', '/db/doc', {data: {_rev: '1-2'}}, function (err, data) {19 console.log(data);20});21ladleClient.action('PUT', '/db/_design/doc', {data: {views: {}}}, function (err, data) {22 console.log(data);23});24ladleClient.action('PUT', '/db/_design/doc', {data: {_rev: '1-2', views: {}}}, function (err, data) {25 console.log(data);26});27ladleClient.action('DELETE', '/db/_design/doc', {data: {_rev: '1-2'}}, function (err, data) {28 console.log(data);29});30ladleClient.action('GET', '/db/_design/doc/_view/view', function (err, data) {31 console.log(data);32});33ladleClient.action('GET', '/db/_design/doc/_view/view', {params: {limit: 10}}, function (err, data) {34 console.log(data);35});36ladleClient.action('GET', '/db/_design/doc/_view/view', {params: {limit: 10}, data: {keys: [1, 2, 3]}}, function
Using AI Code Generation
1var ladle = require('ladle');2ladle.action('test', 'test', 'test', function(err, res) {3 console.log(res);4});5var ladle = require('ladle');6ladle.action('test', 'test', 'test', function(err, res) {7 console.log(res);8});9var ladle = require('ladle');10ladle.action('test', 'test', 'test', function(err, res) {11 console.log(res);12});13var ladle = require('ladle');14ladle.action('test', 'test', 'test', function(err, res) {15 console.log(res);16});17var ladle = require('ladle');18ladle.action('test', 'test', 'test', function(err, res) {19 console.log(res);20});21var ladle = require('ladle');22ladle.action('test', 'test', 'test', function(err, res) {23 console.log(res);24});25var ladle = require('ladle');26ladle.action('test', 'test', 'test', function(err, res) {27 console.log(res);28});29var ladle = require('ladle');30ladle.action('test', 'test', 'test', function(err, res) {31 console.log(res);32});33var ladle = require('ladle');34ladle.action('test', 'test', 'test', function(err, res) {35 console.log(res);36});37var ladle = require('ladle');38ladle.action('test', 'test', 'test', function(err, res) {39 console.log(res);40});
Using AI Code Generation
1var ladle = require('ladle');2var ladle = ladle.createLadle({port: 3000});3ladle.action('get', '/test', function(req, res) {4 res.send('hello world');5});6var ladle = require('ladle');7var ladle = ladle.createLadle({port: 3000});8ladle.action('get', '/test', function(req, res) {9 res.send('hello world');10});11var ladle = require('ladle');12var ladle = ladle.createLadle({port: 3000});13ladle.action('get', '/test', function(req, res) {14 res.send('hello world');15});16var ladle = require('ladle');17var ladle = ladle.createLadle({port: 3000});18ladle.action('get', '/test', function(req, res) {19 res.send('hello world');20});21var ladle = require('ladle');22var ladle = ladle.createLadle({port: 3000});23ladle.action('get', '/test', function(req, res) {24 res.send('hello world');25});26var ladle = require('ladle');27var ladle = ladle.createLadle({port: 3000});28ladle.action('get', '/test', function(req, res) {29 res.send('hello world');30});31var ladle = require('ladle');32var ladle = ladle.createLadle({port: 3000});33ladle.action('get', '/test', function(req, res) {34 res.send('hello world');35});36var ladle = require('ladle');37var ladle = ladle.createLadle({port: 3000});38ladle.action('get', '/test', function(req, res) {39 res.send('hello world');40});41var ladle = require('ladle');42var ladle = ladle.createLadle({port: 3000});43ladle.action('get', '/test',
Using AI Code Generation
1var ladle = require('ladle');2var ladle = ladle.ladle;3var ladle = ladle({port: 6379, host: 'localhost', database: 0});4ladle.action('get', 'key', function(err, result) {5 console.log(result);6});7var ladle = require('ladle');8var ladle = ladle.ladle;9var ladle = ladle({port: 6379, host: 'localhost', database: 0});10ladle.action('set', 'key', 'value', function(err, result) {11 console.log(result);12});13var ladle = require('ladle');14var ladle = ladle.ladle;15var ladle = ladle({port: 6379, host: 'localhost', database: 0});16ladle.action('set', 'key', 'value', function(err, result) {17 console.log(result);18});19var ladle = require('ladle');20var ladle = ladle.ladle;21var ladle = ladle({port: 6379, host: 'localhost', database: 0});22ladle.action('set', 'key', 'value', function(err, result) {23 console.log(result);24});25var ladle = require('ladle');26var ladle = ladle.ladle;27var ladle = ladle({port: 6379, host: 'localhost', database: 0});28ladle.action('set', 'key', 'value', function(err, result) {29 console.log(result);30});31var ladle = require('ladle');32var ladle = ladle.ladle;33var ladle = ladle({port: 6379, host: 'localhost', database: 0});34ladle.action('set', 'key', 'value', function(err, result) {35 console.log(result);36});37var ladle = require('ladle');
Using AI Code Generation
1var ladle = require('ladle');2var ladleObject = new ladle.Ladle();3ladleObject.action('test', 'test', 'test', 'test', function(err, data){4 if(err){5 console.log('error occured');6 }7 else{8 console.log('action method executed successfully');9 }10});
Using AI Code Generation
1var ladle = require('ladle');2var ladle = ladle.createClient({port: 5984, host: 'localhost'});3ladle.action('createDatabase', 'test', function(err, data) {4 console.log(data);5});6var ladle = require('ladle');7var ladle = ladle.createClient({port: 5984, host: 'localhost'});8ladle.action('createDatabase', 'test', function(err, data) {9 console.log(data);10});
Using AI Code Generation
1var ladle = require('ladle');2var ladleAction = ladle.action;3var ladleAction = ladle.action;4ladleAction('actionName', 'actionType', 'actionValue', 'actionLabel', 'actionData', 'actionCallback', 'actionErrorCallback');5var ladleView = ladle.view;6ladleView('viewName', 'viewType', 'viewValue', 'viewLabel', 'viewData', 'viewCallback', 'viewErrorCallback');7var ladleEvent = ladle.event;8ladleEvent('eventName', 'eventType', 'eventValue', 'eventLabel', 'eventData', 'eventCallback', 'eventErrorCallback');9var ladleIdentify = ladle.identify;10ladleIdentify('identifyName', 'identifyType', 'identifyValue', 'identifyLabel', 'identifyData', 'identifyCallback', 'identifyErrorCallback');11var ladleProfile = ladle.profile;12ladleProfile('profileName', 'profileType', 'profileValue', 'profileLabel', 'profileData', 'profileCallback', 'profileErrorCallback');13var ladleScreen = ladle.screen;14ladleScreen('screenName', 'screenType', 'screenValue', 'screenLabel', 'screenData', 'screenCallback', 'screenErrorCallback');15var ladleGroup = ladle.group;16ladleGroup('groupName', 'groupType', 'groupValue', 'groupLabel', 'groupData', 'groupCallback', 'groupErrorCallback');17var ladleAlias = ladle.alias;18ladleAlias('aliasName', 'aliasType', 'aliasValue', 'aliasLabel', 'aliasData', 'aliasCallback', 'aliasErrorCallback');19var ladleReset = ladle.reset;20ladleReset('resetName', 'resetType', 'resetValue', 'resetLabel', 'resetData', 'resetCallback', 'resetErrorCallback');21var ladleSet = ladle.set;22ladleSet('setName', 'setType', 'setValue',
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!