1683 browseImplementorsOfIt |
1681 browseImplementorsOfIt |
1684 "open a browser on the implementors of the selected text, |
1682 "open a browser on the implementors of the selected text, |
1685 or - if I support syntax elements, on the syntax element at the cursor position" |
1683 or - if I support syntax elements, on the syntax element at the cursor position" |
1686 |
1684 |
1687 |selectedText selector browserClass na browser |
1685 |selectedText selector browserClass na browser |
1688 cls node receiverNode dwim targetClass targetImplClass targetMethod| |
1686 cls node dwim targetClass targetImplClass| |
1689 |
1687 |
1690 selectedText := self selectedTextOrSyntaxElement. |
1688 selectedText := self selectedTextOrSyntaxElement. |
1691 selectedText notEmptyOrNil ifTrue:[ |
1689 selectedText notEmptyOrNil ifTrue:[ |
1692 self windowGroup withWaitCursorDo:[ |
1690 self windowGroup withWaitCursorDo:[ |
1693 "/ hack, for now and expecco; must ask the Parser eventually... |
1691 "/ hack, for now and expecco; must ask the Parser eventually... |
1721 ]. |
1719 ]. |
1722 browser notNil ifTrue:[ |
1720 browser notNil ifTrue:[ |
1723 "/ if the type of the receiver is known, |
1721 "/ if the type of the receiver is known, |
1724 "/ select the targeted method immediately |
1722 "/ select the targeted method immediately |
1725 (cls := self editedClass) notNil ifTrue:[ |
1723 (cls := self editedClass) notNil ifTrue:[ |
1726 dwim := DoWhatIMeanSupport new. |
1724 node := DoWhatIMeanSupport |
1727 dwim setClass:cls andContext:nil. |
|
1728 node := dwim |
|
1729 findNodeForInterval:(self selectionStartIndex to:self selectionStopIndex) |
1725 findNodeForInterval:(self selectionStartIndex to:self selectionStopIndex) |
1730 in:self contents string. |
1726 in:self contents string. |
1731 (node notNil and:[node isMessage]) ifTrue:[ |
1727 (node notNil and:[node isMessage]) ifTrue:[ |
|
1728 dwim := DoWhatIMeanSupport new. |
|
1729 dwim setClass:cls andContext:nil. |
|
1730 dwim setSelf: simulatedSelf. |
1732 targetClass := dwim classOfNode:node receiver. |
1731 targetClass := dwim classOfNode:node receiver. |
|
1732 |
1733 targetClass notNil ifTrue:[ |
1733 targetClass notNil ifTrue:[ |
1734 targetImplClass := targetClass whichClassImplements:(node selector). |
1734 targetImplClass := targetClass whichClassImplements:(node selector). |
1735 targetImplClass notNil ifTrue:[ |
1735 targetImplClass notNil ifTrue:[ |
1736 browser selectMethod:(targetImplClass compiledMethodAt:(node selector)) |
1736 browser selectMethod:(targetImplClass compiledMethodAt:(node selector)) |
1737 ]. |
1737 ]. |
1762 ifTrue:[ |
1762 ifTrue:[ |
1763 codeToEvaluate := el name |
1763 codeToEvaluate := el name |
1764 ] ifFalse:[ |
1764 ] ifFalse:[ |
1765 codeToEvaluate := (self selectionOrTextOfCursorLine ? '') withoutSeparators. |
1765 codeToEvaluate := (self selectionOrTextOfCursorLine ? '') withoutSeparators. |
1766 ]. |
1766 ]. |
1767 idx := codeToEvaluate indexOf:'»'. |
1767 idx := codeToEvaluate indexOf:'»'. |
1768 idx ~~ 0 ifTrue:[ |
1768 idx ~~ 0 ifTrue:[ |
1769 selector := (codeToEvaluate copyFrom:idx+1) withoutSeparators string. |
1769 selector := (codeToEvaluate copyFrom:idx+1) withoutSeparators string. |
1770 (selector startsWith:'#') ifTrue:[ |
1770 (selector startsWith:'#') ifTrue:[ |
1771 selector := Symbol readFrom:selector. |
1771 selector := Symbol readFrom:selector. |
1772 ]. |
1772 ]. |
2007 ('Browse Pool' browseSharedPoolOfIt ) |
2007 ('Browse Pool' browseSharedPoolOfIt ) |
2008 ('Senders of It' browseSendersOfIt ) |
2008 ('Senders of It' browseSendersOfIt ) |
2009 ('Implementors of It' browseImplementorsOfIt ImplementorsOfIt ) |
2009 ('Implementors of It' browseImplementorsOfIt ImplementorsOfIt ) |
2010 ('References to It' browseReferencesToIt ) |
2010 ('References to It' browseReferencesToIt ) |
2011 "/ ('Classes Containing It in Name' browseClassesContainingItInName ) |
2011 "/ ('Classes Containing It in Name' browseClassesContainingItInName ) |
2012 "/ ('Methods ContanÃning It in Name' browseMethodsContainingItInName ) |
2012 "/ ('Methods Contaníning It in Name' browseMethodsContainingItInName ) |
2013 "/ ('Methods ContanÃning It in Source' browseMethodsContainingItInSource ) |
2013 "/ ('Methods Contaníning It in Source' browseMethodsContainingItInSource ) |
2014 ('-' ) |
2014 ('-' ) |
2015 ('TimeIt' timeIt ) |
2015 ('TimeIt' timeIt ) |
2016 ('SpyOnIt' spyOnIt )) |
2016 ('SpyOnIt' spyOnIt )) |
2017 resources:resources |
2017 resources:resources |
2018 after:#gotoLine. |
2018 after:#gotoLine. |