1
0
Kaynağa Gözat

Browse selected method from debugger view

This change allows to browse to selected method in debugger call stack
using browse action (ctrl+space b).
Mariano Montone 3 yıl önce
ebeveyn
işleme
e189548e56
2 değiştirilmiş dosya ile 77 ekleme ve 0 silme
  1. 63 0
      src/Helios-Debugger.js
  2. 14 0
      src/Helios-Debugger.st

+ 63 - 0
src/Helios-Debugger.js

@@ -1367,6 +1367,24 @@ return self;
 }; }),
 $globals.HLDebuggerModel);
 
+$core.addMethod(
+$core.method({
+selector: "isReferencesModel",
+protocol: "testing",
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "isReferencesModel\x0a\x09^ true",
+referencedClasses: [],
+//>>excludeEnd("ide");
+pragmas: [],
+messageSends: []
+}, function ($methodClass){ return function (){
+var self=this,$self=this;
+return true;
+
+}; }),
+$globals.HLDebuggerModel);
+
 $core.addMethod(
 $core.method({
 selector: "nextNode",
@@ -1428,6 +1446,51 @@ return self;
 }; }),
 $globals.HLDebuggerModel);
 
+$core.addMethod(
+$core.method({
+selector: "openMethod",
+protocol: "testing",
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "openMethod\x0a\x09| browser |\x0a\x09\x0a\x09self selectedMethod ifNil: [ ^ self ].\x0a\x09\x0a\x09self withChangesDo: [\x0a\x09\x09browser := HLBrowser openAsTab.\x0a\x09\x09browser openMethod: self selectedMethod ]",
+referencedClasses: ["HLBrowser"],
+//>>excludeEnd("ide");
+pragmas: [],
+messageSends: ["ifNil:", "selectedMethod", "withChangesDo:", "openAsTab", "openMethod:"]
+}, function ($methodClass){ return function (){
+var self=this,$self=this;
+var browser;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+$1=[$self._selectedMethod()
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+,$ctx1.sendIdx["selectedMethod"]=1
+//>>excludeEnd("ctx");
+][0];
+if($1 == null || $1.a$nil){
+return self;
+} else {
+$1;
+}
+$self._withChangesDo_((function(){
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx2) {
+//>>excludeEnd("ctx");
+browser=$recv($globals.HLBrowser)._openAsTab();
+return $recv(browser)._openMethod_($self._selectedMethod());
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
+//>>excludeEnd("ctx");
+}));
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"openMethod",{browser:browser})});
+//>>excludeEnd("ctx");
+}; }),
+$globals.HLDebuggerModel);
+
 $core.addMethod(
 $core.method({
 selector: "proceed",

+ 14 - 0
src/Helios-Debugger.st

@@ -409,6 +409,20 @@ onStep
 
 atEnd
 	^ self debugger atEnd
+!
+
+isReferencesModel
+	^ true
+!
+
+openMethod
+	| browser |
+	
+	self selectedMethod ifNil: [ ^ self ].
+	
+	self withChangesDo: [
+		browser := HLBrowser openAsTab.
+		browser openMethod: self selectedMethod ]
 ! !
 
 !HLDebuggerModel class methodsFor: 'instance creation'!