Browse Source

Show method trait in browser method pane.

Herbert Vojčík 7 years ago
parent
commit
4e140ccc63
2 changed files with 32 additions and 4 deletions
  1. 26 3
      src/Helios-Browser.js
  2. 6 1
      src/Helios-Browser.st

+ 26 - 3
src/Helios-Browser.js

@@ -4649,21 +4649,44 @@ selector: "renderItemLabel:on:",
 protocol: "rendering",
 fn: function (aSelector,html){
 var self=this;
+var methodClass;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
+var $1,$2;
+methodClass=$recv(self._methodForSelector_(aSelector))._methodClass();
+$1=$recv($recv(self._model())._selectedClass()).__eq(methodClass);
+if($core.assert($1)){
+$recv(html)._with_(aSelector);
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["with:"]=1;
+//>>excludeEnd("ctx");
+} else {
 $recv(html)._with_(aSelector);
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["with:"]=2;
+//>>excludeEnd("ctx");
+$recv(html)._with_(" ");
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["with:"]=3;
+//>>excludeEnd("ctx");
+$2=$recv("(".__comma($recv(methodClass)._name())).__comma(")");
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx[","]=1;
+//>>excludeEnd("ctx");
+$recv(html)._with_($2);
+}
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{aSelector:aSelector,html:html},$globals.HLMethodsListWidget)});
+}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{aSelector:aSelector,html:html,methodClass:methodClass},$globals.HLMethodsListWidget)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aSelector", "html"],
-source: "renderItemLabel: aSelector on: html\x0a\x09html with: aSelector",
+source: "renderItemLabel: aSelector on: html\x0a\x09| methodClass |\x0a    \x0a    methodClass := (self methodForSelector: aSelector) methodClass.\x0a\x09self model selectedClass = methodClass\x0a\x09\x09ifTrue: [ html with: aSelector ]\x0a\x09\x09ifFalse: [ html with: aSelector; with: ' '; with: '(', methodClass name, ')' ]",
 referencedClasses: [],
 //>>excludeEnd("ide");
-messageSends: ["with:"]
+messageSends: ["methodClass", "methodForSelector:", "ifTrue:ifFalse:", "=", "selectedClass", "model", "with:", ",", "name"]
 }),
 $globals.HLMethodsListWidget);
 

+ 6 - 1
src/Helios-Browser.st

@@ -1183,7 +1183,12 @@ renderContentOn: html
 !
 
 renderItemLabel: aSelector on: html
-	html with: aSelector
+	| methodClass |
+    
+    methodClass := (self methodForSelector: aSelector) methodClass.
+	self model selectedClass = methodClass
+		ifTrue: [ html with: aSelector ]
+		ifFalse: [ html with: aSelector; with: ' '; with: '(', methodClass name, ')' ]
 ! !
 
 !HLMethodsListWidget methodsFor: 'testing'!