Behavior.st
changeset 18146 a11fe5735af8
parent 17675 c69e56c45cb0
child 18147 a32fa9214805
--- a/Behavior.st	Wed Mar 25 23:28:27 2015 +0100
+++ b/Behavior.st	Thu Mar 26 01:38:11 2015 +0100
@@ -1557,11 +1557,6 @@
 
 !Behavior methodsFor:'cleanup'!
 
-flushSubclasses
-    "I dont keep my subclasses - but if anyone inherits from me,
-     it better knows how to ignore this"
-!
-
 lowSpaceCleanup
     "ignored here - redefined in some classes to
      cleanup in low-memory situations"
@@ -1578,23 +1573,10 @@
     ^ self class browserClass.
 !
 
-compiler
-    "return the compiler to use for this class.
-     OBSOLETE: This is the old ST/X interface, kept for migration.
-               Don't use it - it will vanish."
-
-    <resource:#obsolete>
-
-    self obsoleteMethodWarning:'use #compilerClass'.
-    ^ self compilerClass
-
-    "Modified: 31.7.1997 / 23:04:33 / cg"
-!
-
 compilerClass
     "return the compiler to use for this class -
      this can be redefined in special classes, to compile classes with
-     JavaScript, Ruby, Lisp, Prolog, ASN1, Basic :-) or whatever syntax."
+     Lisp, Prolog, ASN1, Basic :-) or whatever syntax."
 
     ^ self class compilerClass.
 !
@@ -1613,7 +1595,7 @@
 evaluatorClass
     "return the compiler to use for expression evaluation for this class -
      this can be redefined in special classes, to evaluate expressions with
-     JavaScript, Ruby, Lisp, Prolog, ASN1, Basic :-) or whatever syntax."
+     Lisp, Prolog, ASN1, Basic :-) or whatever syntax."
 
     ^ self class evaluatorClass.
 !
@@ -1621,17 +1603,13 @@
 formatterClass
     "return the parser to use for formatting (prettyPrinting) this class -
      this can be redefined in special classes, to format classes with
-     JavaScript, Ruby, Lisp, Prolog, ASN1, Basic :-) or whatever syntax."
+     Lisp, Prolog, ASN1, Basic :-) or whatever syntax."
 
     ^ self class formatterClass.
 !
 
 language
-    "return the programming language to use for this class.
-     OBSOLETE: This is an old interface which will vanish (easily confused with UI-national language)."
-
     <resource: #obsolete>
-
     self obsoleteMethodWarning:'use #programmingLanguage or Smalltalk language'.
     ^ self class programmingLanguage
 
@@ -1641,7 +1619,7 @@
 parserClass
     "return the parser to use for parsing this class -
      this can be redefined in special classes, to parse classes with
-     JavaScript, Ruby, Lisp, Prolog, ASN1, Basic :-) or whatever syntax."
+     Lisp, Prolog, ASN1, Basic :-) or whatever syntax."
 
     ^ self class parserClass.
 !
@@ -1663,7 +1641,7 @@
 syntaxHighlighterClass
     "return the class to use for syntaxHighlighting (prettyPrinting) this class -
      this can be redefined in special classes, to highlight classes with
-     JavaScript, Ruby, Lisp, Prolog, ASN1, Basic :-) or whatever syntax."
+     Lisp, Prolog, ASN1, Basic :-) or whatever syntax."
 
     ^ self class syntaxHighlighterClass.
 ! !
@@ -2967,7 +2945,7 @@
     ^ self basicNew:anInteger
 ! !
 
-!Behavior methodsFor:'misc ui support'!
+!Behavior methodsFor:'misc'!
 
 browse
     "open a browser showing the receiver"
@@ -2998,6 +2976,33 @@
     "Modified: / 31-01-2011 / 11:05:49 / cg"
 !
 
+flushSubclasses
+    "I dont keep my subclasses - but if anyone inherits from me,
+     it better knows how to ignore this"
+!
+
+iconInBrowserSymbol
+    "can be redefined for a private icon in the browser (for me and my subclasses).
+     The returned symbol must be a selector of the ToolbarIconLibrary."
+
+    <resource: #programImage>
+
+    self isLoaded ifFalse:[
+        ^ #autoloadedClassBrowserIcon
+    ].
+    (self isBrowserStartable) ifTrue:[
+        self isVisualStartable ifTrue:[
+            ^ #visualStartableClassBrowserIcon
+        ].
+        ^ #startableClassBrowserIcon
+    ].
+
+    "/ give ruby and other special metaclasses a chance to provide their own icon...
+    ^ self class iconInBrowserSymbol
+
+    "Created: / 20-07-2007 / 08:52:17 / cg"
+!
+
 sourceCodeTemplate
     ^ 'messageSelector and arguments
     "method comment - purpose of message"
@@ -3017,11 +3022,11 @@
 toolListIcon
     "VisualWorks icon retrieval for the browser list.
      Only redefined in VW classes.
-     Notice, that ST/X uses a better scheme, where the class only
+     Notice, that ST/X uses a better scheme, where class only
      returns a symbol, which is used to map into the icon library.
      Thus allowing different icons as per view style"
 
-    ^ nil
+   ^ nil
 ! !
 
 !Behavior methodsFor:'printing & storing'!
@@ -5111,10 +5116,10 @@
 !Behavior class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Behavior.st,v 1.371 2015-03-26 10:04:19 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Behavior.st,v 1.370 2015-03-26 00:38:11 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/Behavior.st,v 1.371 2015-03-26 10:04:19 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Behavior.st,v 1.370 2015-03-26 00:38:11 cg Exp $'
 ! !