Browse Source

in HLRefereces, doble clicking on a method referencing a class will open a new browser on that method

Sebastian Sastre 9 years ago
parent
commit
0e2d6418a7
2 changed files with 31 additions and 0 deletions
  1. 25 0
      src/Helios-References.js
  2. 6 0
      src/Helios-References.st

+ 25 - 0
src/Helios-References.js

@@ -897,6 +897,31 @@ messageSends: []
 }),
 $globals.HLClassReferencesListWidget);
 
+$core.addMethod(
+$core.method({
+selector: "onItemDoubleClicked:on:",
+protocol: 'reactions',
+fn: function (anEvent,anObject){
+var self=this;
+function $HLBrowser(){return $globals.HLBrowser||(typeof HLBrowser=="undefined"?nil:HLBrowser)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) { 
+//>>excludeEnd("ctx");
+$recv($recv($HLBrowser())._openAsTab())._openMethod_(anObject);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"onItemDoubleClicked:on:",{anEvent:anEvent,anObject:anObject},$globals.HLClassReferencesListWidget)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["anEvent", "anObject"],
+source: "onItemDoubleClicked: anEvent on: anObject \x0a\x09\x22The item that this widget has rendered for anObject has been double clicked.\x22\x0a\x0a\x09HLBrowser openAsTab openMethod: anObject",
+referencedClasses: ["HLBrowser"],
+//>>excludeEnd("ide");
+messageSends: ["openMethod:", "openAsTab"]
+}),
+$globals.HLClassReferencesListWidget);
+
 $core.addMethod(
 $core.method({
 selector: "onSearchReferences:",

+ 6 - 0
src/Helios-References.st

@@ -216,6 +216,12 @@ label
 
 !HLClassReferencesListWidget methodsFor: 'reactions'!
 
+onItemDoubleClicked: anEvent on: anObject 
+	"The item that this widget has rendered for anObject has been double clicked."
+
+	HLBrowser openAsTab openMethod: anObject
+!
+
 onSearchReferences: aString
 	self selectItem: nil.
 	self items: (self model classReferencesOf: aString).