17 instanceVariableNames:'updatingLabelShown breakpointList shownCopyOfBreakpointList |
17 instanceVariableNames:'updatingLabelShown breakpointList shownCopyOfBreakpointList |
18 selectionIndexHolder currentSortColumn currentSortIsReverse |
18 selectionIndexHolder currentSortColumn currentSortIsReverse |
19 showHalts showOthers showAssertions showAssertionsInTests |
19 showHalts showOthers showAssertions showAssertionsInTests |
20 showCodeBreakpoints showCodeBreakpointsFor showMethodBreakpoints |
20 showCodeBreakpoints showCodeBreakpointsFor showMethodBreakpoints |
21 showLineBreakpoints showDebugCode codeView infoHolder |
21 showLineBreakpoints showDebugCode codeView infoHolder |
22 updateProcess showWhichHaltsHolder' |
22 updateProcess showWhichHaltsHolder packageFilter classNameFilter' |
23 classVariableNames:'MessagesAndTypes' |
23 classVariableNames:'MessagesAndTypes' |
24 poolDictionaries:'' |
24 poolDictionaries:'' |
25 category:'Interface-Smalltalk-Breakpoints' |
25 category:'Interface-Debugger' |
26 ! |
26 ! |
27 |
27 |
28 Object subclass:#BreakpointListEntry |
28 Object subclass:#BreakpointListEntry |
29 instanceVariableNames:'type ignoredInfo arg className selector lineNumber info enabled' |
29 instanceVariableNames:'type ignoredInfo arg className selector lineNumber info enabled' |
30 classVariableNames:'' |
30 classVariableNames:'' |
566 labelActionArgument: 'selector' |
599 labelActionArgument: 'selector' |
567 width: 200 |
600 width: 200 |
568 model: selector |
601 model: selector |
569 canSelect: false |
602 canSelect: false |
570 ) |
603 ) |
571 "/ (DataSetColumnSpec |
604 (DataSetColumnSpec |
572 "/ label: 'Line' |
605 label: 'Ign' |
573 "/ labelAlignment: left |
606 labelButtonType: Button |
574 "/ activeHelpKey: '' |
607 columnAlignment: center |
575 "/ activeHelpKeyForLabel: '' |
608 width: 50 |
576 "/ labelButtonType: Button |
609 model: isIgnoredString |
577 "/ labelActionSelector: sortBy: |
610 menuFromApplication: false |
578 "/ labelActionArgument: 'lineNumber' |
611 writeSelector: isIgnored: |
579 "/ width: 35 |
612 ) |
580 "/ model: lineNumber |
|
581 "/ canSelect: false |
|
582 "/ ) |
|
583 (DataSetColumnSpec |
613 (DataSetColumnSpec |
584 label: 'Info' |
614 label: 'Info' |
585 labelAlignment: left |
615 labelAlignment: left |
586 activeHelpKey: '' |
616 activeHelpKey: '' |
587 activeHelpKeyForLabel: '' |
617 activeHelpKeyForLabel: '' |
862 |
893 |
863 "Created: / 22-10-2006 / 02:00:41 / cg" |
894 "Created: / 22-10-2006 / 02:00:41 / cg" |
864 ! |
895 ! |
865 |
896 |
866 selectedItemIsEnabledLineBreak |
897 selectedItemIsEnabledLineBreak |
867 |entry| |
898 |selIndex entry| |
868 |
899 |
869 entry := (self breakpointListEntryAtIndex:self selectionIndexHolder value). |
900 (selIndex := self selectionIndexHolder value) isNil ifTrue:[^ false]. |
|
901 entry := self breakpointListEntryAtIndex:selIndex. |
870 ^ entry isLineBreakpoint and:[entry breakPoint isEnabled] |
902 ^ entry isLineBreakpoint and:[entry breakPoint isEnabled] |
871 ! |
903 ! |
872 |
904 |
873 selectedItemIsIgnoredHalt |
905 selectedItemIsIgnoredHalt |
874 |entry info| |
906 |selIndex entry info| |
875 |
907 |
876 entry := (self breakpointListEntryAtIndex:self selectionIndexHolder value). |
908 (selIndex := self selectionIndexHolder value) isNil ifTrue:[^ false]. |
|
909 entry := self breakpointListEntryAtIndex:selIndex. |
877 info := Debugger haltIgnoreInformationFor:(entry method) atLineNr:(entry lineNumber). |
910 info := Debugger haltIgnoreInformationFor:(entry method) atLineNr:(entry lineNumber). |
878 ^ info notNil and:[ info isHaltIgnored ]. |
911 ^ info notNil and:[ info isHaltIgnored ]. |
879 ! |
912 ! |
880 |
913 |
881 selectionIndexHolder |
914 selectionIndexHolder |
992 "filter those items which are to be shown from the complete list" |
1025 "filter those items which are to be shown from the complete list" |
993 |
1026 |
994 |newList showWhichHalt| |
1027 |newList showWhichHalt| |
995 |
1028 |
996 newList := breakpointList. |
1029 newList := breakpointList. |
|
1030 |
|
1031 classNameFilter notEmptyOrNil ifTrue:[ |
|
1032 newList := newList select:[:entry | entry relatedToClass:classNameFilter]. |
|
1033 ]. |
|
1034 packageFilter notEmptyOrNil ifTrue:[ |
|
1035 newList := newList select:[:entry | entry relatedToPackage:packageFilter]. |
|
1036 ]. |
997 |
1037 |
998 self showOthers ifFalse:[ |
1038 self showOthers ifFalse:[ |
999 newList := newList reject:[:entry | entry isOther]. |
1039 newList := newList reject:[:entry | entry isOther]. |
1000 ]. |
1040 ]. |
1001 self showDebugCode ifFalse:[ |
1041 self showDebugCode ifFalse:[ |
1535 |
1575 |
1536 self assert:(3 > 4) |
1576 self assert:(3 > 4) |
1537 ! |
1577 ! |
1538 |
1578 |
1539 aMethodWith_assert2 |
1579 aMethodWith_assert2 |
1540 "only here for demonstration purposes - should be found in the list" |
1580 "only here for demonstration purposes - should be found in the breakpoint browser''s list" |
1541 |
1581 |
1542 self assert:(3 > 4) message:'well - that ought to work' |
1582 self assert:(3 > 4) message:'well - that ought to work' |
1543 ! |
1583 ! |
1544 |
1584 |
1545 aMethodWith_breakPoint |
1585 aMethodWith_breakPoint |
1546 "only here for demonstration purposes - should be found in the list" |
1586 "only here for demonstration purposes - should be found in the breakpoint browser''s list" |
1547 |
1587 |
1548 self breakPoint:#cg |
1588 self breakPoint:#cg |
1549 ! |
1589 ! |
1550 |
1590 |
1551 aMethodWith_breakPoint2 |
1591 aMethodWith_breakPoint2 |
1552 "only here for demonstration purposes - should be found in the list" |
1592 "only here for demonstration purposes - should be found in the breakpoint browser''s list" |
1553 |
1593 |
1554 self breakPoint:#cg info:'hello there' |
1594 self breakPoint:#cg info:'hello there' |
1555 ! |
1595 ! |
1556 |
1596 |
1557 aMethodWith_debugCode |
1597 aMethodWith_debugCode |
1558 "only here for demonstration purposes - should be found in the list" |
1598 "only here for demonstration purposes - should be found in the breakpoint browser''s list" |
1559 |
1599 |
1560 self |
1600 self |
1561 debuggingCodeFor:#cg |
1601 debuggingCodeFor:#cg |
1562 is:[ |
1602 is:[ |
1563 self bla. |
1603 self bla. |
1564 Transcript show:'some debug prints here' |
1604 Transcript show:'some debug prints here' |
1565 ]. |
1605 ]. |
1566 ! |
1606 ! |
1567 |
1607 |
1568 aMethodWith_halt |
1608 aMethodWith_halt |
1569 "only here for demonstration purposes - should be found in the list" |
1609 "only here for demonstration purposes - should be found in the breakpoint browser''s list" |
1570 |
1610 |
1571 self halt |
1611 self halt |
1572 |
1612 |
1573 "after the first halt, in the debugger, ignore this halt for some time and see what |
1613 "after the first halt, in the debugger, ignore this halt for some time and see what |
1574 the breakpoint browser shows... |
1614 the breakpoint browser shows... |
1612 |
1652 |
1613 "Created: / 22-10-2006 / 01:49:13 / cg" |
1653 "Created: / 22-10-2006 / 01:49:13 / cg" |
1614 "Modified: / 18-02-2007 / 12:56:30 / cg" |
1654 "Modified: / 18-02-2007 / 12:56:30 / cg" |
1615 ! |
1655 ! |
1616 |
1656 |
|
1657 openClassFilterDialog |
|
1658 |nameOrPattern| |
|
1659 |
|
1660 nameOrPattern := Dialog |
|
1661 requestClassName:'Only show breakpoints for class(es) matching (empty to show all):' |
|
1662 initialAnswer:(classNameFilter ? '*'). |
|
1663 nameOrPattern isNil ifTrue:[^ self]. "/ cancel |
|
1664 (nameOrPattern isEmpty or:[nameOrPattern = '*']) ifTrue:[ |
|
1665 classNameFilter := nil. |
|
1666 ] ifFalse:[ |
|
1667 classNameFilter := nameOrPattern. |
|
1668 ]. |
|
1669 self updateShownBreakpointList |
|
1670 ! |
|
1671 |
1617 openDocumentation |
1672 openDocumentation |
1618 HTMLDocumentView openFullOnDocumentationFile:'tools/misc/TOP.html#BREAKPOINTLIST'. |
1673 HTMLDocumentView openFullOnDocumentationFile:'tools/misc/TOP.html#BREAKPOINTLIST'. |
|
1674 ! |
|
1675 |
|
1676 openPackageFilterDialog |
|
1677 |nameOrPattern| |
|
1678 |
|
1679 nameOrPattern := Dialog |
|
1680 request:'Only show breakpoints for code in package(s) matching (empty to show all):' |
|
1681 list:(Smalltalk allProjectIDs) |
|
1682 initialAnswer:(packageFilter ? '*'). |
|
1683 nameOrPattern isNil ifTrue:[^ self]. "/ cancel |
|
1684 (nameOrPattern isEmpty or:[nameOrPattern = '*']) ifTrue:[ |
|
1685 packageFilter := nil. |
|
1686 ] ifFalse:[ |
|
1687 packageFilter := nameOrPattern. |
|
1688 ]. |
|
1689 self updateShownBreakpointList |
1619 ! |
1690 ! |
1620 |
1691 |
1621 resort |
1692 resort |
1622 |sortBlock sortBlock1| |
1693 |sortBlock sortBlock1| |
1623 |
1694 |
1745 className := classNameArg. |
1828 className := classNameArg. |
1746 selector := selectorArg. |
1829 selector := selectorArg. |
1747 lineNumber := lineNumberArg. |
1830 lineNumber := lineNumberArg. |
1748 info := infoArg. |
1831 info := infoArg. |
1749 enabled := enabledArg. |
1832 enabled := enabledArg. |
|
1833 ! |
|
1834 |
|
1835 typeString |
|
1836 "/ loks ugly |
|
1837 "/ self isIgnored ifTrue:[ |
|
1838 "/ ^ type asText allStrikedOut |
|
1839 "/ ]. |
|
1840 ^ type |
1750 ! ! |
1841 ! ! |
1751 |
1842 |
1752 |
1843 |
1753 !BreakpointBrowser::BreakpointListEntry methodsFor:'actions'! |
1844 !BreakpointBrowser::BreakpointListEntry methodsFor:'actions'! |
1754 |
1845 |
1765 |
1856 |
1766 ! |
1857 ! |
1767 |
1858 |
1768 method |
1859 method |
1769 ^ (Smalltalk classNamed:className) compiledMethodAt:selector. |
1860 ^ (Smalltalk classNamed:className) compiledMethodAt:selector. |
|
1861 ! ! |
|
1862 |
|
1863 |
|
1864 !BreakpointBrowser::BreakpointListEntry methodsFor:'queries'! |
|
1865 |
|
1866 relatedToClass:aClassNamePattern |
|
1867 className isNil ifTrue:[^ true]. |
|
1868 (aClassNamePattern includesMatchCharacters) ifTrue:[ |
|
1869 ^ aClassNamePattern match: className |
|
1870 ]. |
|
1871 ^ className startsWith:aClassNamePattern |
|
1872 ! |
|
1873 |
|
1874 relatedToPackage:aPackagePattern |
|
1875 |mthd package| |
|
1876 |
|
1877 (mthd := self method) isNil ifTrue:[^ false]. |
|
1878 package := mthd package. |
|
1879 (aPackagePattern includesMatchCharacters) ifTrue:[ |
|
1880 ^ aPackagePattern match: package |
|
1881 ]. |
|
1882 ^ package startsWith:aPackagePattern |
1770 ! ! |
1883 ! ! |
1771 |
1884 |
1772 |
1885 |
1773 !BreakpointBrowser::BreakpointListEntry methodsFor:'testing'! |
1886 !BreakpointBrowser::BreakpointListEntry methodsFor:'testing'! |
1774 |
1887 |
1878 |
1991 |
1879 |
1992 |
1880 !BreakpointBrowser class methodsFor:'documentation'! |
1993 !BreakpointBrowser class methodsFor:'documentation'! |
1881 |
1994 |
1882 version |
1995 version |
1883 ^ '$Header: /cvs/stx/stx/libtool/Tools__BreakpointBrowser.st,v 1.40 2013-03-26 00:43:36 cg Exp $' |
1996 ^ '$Header: /cvs/stx/stx/libtool/Tools__BreakpointBrowser.st,v 1.44 2013-03-30 15:57:52 cg Exp $' |
1884 ! |
1997 ! |
1885 |
1998 |
1886 version_CVS |
1999 version_CVS |
1887 ^ '$Header: /cvs/stx/stx/libtool/Tools__BreakpointBrowser.st,v 1.40 2013-03-26 00:43:36 cg Exp $' |
2000 ^ '$Header: /cvs/stx/stx/libtool/Tools__BreakpointBrowser.st,v 1.44 2013-03-30 15:57:52 cg Exp $' |
1888 ! |
2001 ! |
1889 |
2002 |
1890 version_HG |
2003 version_HG |
1891 |
2004 |
1892 ^ '$Changeset: <not expanded> $' |
2005 ^ '$Changeset: <not expanded> $' |