SystemBrowser.st
changeset 18411 f247ae2dd036
parent 18317 436c9d4c5603
child 18614 260f4b5b37ac
equal deleted inserted replaced
18410:dd06b3f7684f 18411:f247ae2dd036
       
     1 "{ Encoding: utf8 }"
       
     2 
     1 "
     3 "
     2  COPYRIGHT (c) 1989 by Claus Gittinger
     4  COPYRIGHT (c) 1989 by Claus Gittinger
     3               All Rights Reserved
     5               All Rights Reserved
     4 
     6 
     5  This software is furnished under a license and may be used
     7  This software is furnished under a license and may be used
   118     "Created: 30.4.1996 / 14:43:45 / cg"
   120     "Created: 30.4.1996 / 14:43:45 / cg"
   119 !
   121 !
   120 
   122 
   121 openInClass:aClass selector:aSelector
   123 openInClass:aClass selector:aSelector
   122     "launch a standard browser which immediately switches
   124     "launch a standard browser which immediately switches
   123      to aClass » aSelector. Returns the browser"
   125      to aClass » aSelector. Returns the browser"
   124 
   126 
   125     |brwsr classesName|
   127     |brwsr classesName|
   126 
   128 
   127     brwsr := self openOnDevice:(Screen current).
   129     brwsr := self openOnDevice:(Screen current).
   128     brwsr waitUntilVisible.
   130     brwsr waitUntilVisible.
   532 
   534 
   533     (resources includesKey:#todo) ifTrue:[
   535     (resources includesKey:#todo) ifTrue:[
   534         ^ ToolbarIconLibrary underConstructionIcon11x11
   536         ^ ToolbarIconLibrary underConstructionIcon11x11
   535     ].
   537     ].
   536     (resources includesKey:#obsolete) ifTrue:[
   538     (resources includesKey:#obsolete) ifTrue:[
       
   539         ^ self obsoleteMethodIcon
       
   540     ].
       
   541     (resources includesKey:#deprecated) ifTrue:[
   537         ^ self deprecatedMethodIcon
   542         ^ self deprecatedMethodIcon
   538     ].
   543     ].
   539     (resources includesKey:#canvas) ifTrue:[
   544     (resources includesKey:#canvas) ifTrue:[
   540         ^ self canvasIcon
   545         ^ self canvasIcon
   541     ].
   546     ].
   570         ^ self programImageIcon 
   575         ^ self programImageIcon 
   571     ].
   576     ].
   572     ^ nil
   577     ^ nil
   573 
   578 
   574     "Created: / 17-08-2006 / 09:08:11 / cg"
   579     "Created: / 17-08-2006 / 09:08:11 / cg"
   575     "Modified: / 28-07-2018 / 11:10:25 / Claus Gittinger"
   580     "Modified: / 21-09-2018 / 15:34:34 / Claus Gittinger"
   576 ! !
   581 ! !
   577 
   582 
   578 !SystemBrowser class methodsFor:'dialogs'!
   583 !SystemBrowser class methodsFor:'dialogs'!
   579 
   584 
   580 askForClassNameMatching:matchStringArg inEnvironment:anEnvironmentOrClassOrNil for:aBrowserOrNil
   585 askForClassNameMatching:matchStringArg inEnvironment:anEnvironmentOrClassOrNil for:aBrowserOrNil
   975 !
   980 !
   976 
   981 
   977 deprecatedMethodIcon
   982 deprecatedMethodIcon
   978     <resource: #programImage>
   983     <resource: #programImage>
   979 
   984 
   980     ^ self doNotEnterIcon
   985     ^ ToolbarIconLibrary deprecatedMethodIcon
   981 
   986 
   982     "Modified: / 28-07-2018 / 09:36:00 / Claus Gittinger"
   987     "Modified: / 21-09-2018 / 15:30:48 / Claus Gittinger"
   983 !
   988 !
   984 
   989 
   985 disabledBreakpointIcon
   990 disabledBreakpointIcon
   986     <resource: #programImage>
   991     <resource: #programImage>
   987 
   992 
   988     ^ ToolbarIconLibrary breakpointDisabled9x9
   993     ^ ToolbarIconLibrary breakpointDisabled9x9
   989 !
   994 !
   990 
   995 
   991 doNotEnterIcon
   996 doNotEnterIcon
   992     <resource: #image>
   997     <resource: #programImage>
   993     "This resource specification was automatically generated
   998 
   994      by the ImageEditor of ST/X."
   999     ^ ToolbarIconLibrary doNotEnterIcon
   995     "Do not manually edit this!! If it is corrupted,
  1000 
   996      the ImageEditor may not be able to read the specification."
  1001     "Modified: / 21-09-2018 / 15:29:09 / Claus Gittinger"
   997     "
       
   998      self doNotEnterIcon inspect
       
   999      ImageEditor openOnClass:self andSelector:#doNotEnterIcon
       
  1000      Icon flushCachedIcons"
       
  1001     
       
  1002     ^ Icon constantNamed:'SystemBrowser class doNotEnterIcon'
       
  1003         ifAbsentPut:[
       
  1004             (Depth1Image new)
       
  1005                 width:13;
       
  1006                 height:11;
       
  1007                 photometric:(#palette);
       
  1008                 bitsPerSample:(#( 1 ));
       
  1009                 samplesPerPixel:(1);
       
  1010                 bits:(ByteArray fromPackedString:'??C0<NA00CB@EY>P''9B@DL@08GC0<@@a');
       
  1011                 colorMapFromArray:#[ 255 0 0 255 255 255 ];
       
  1012                 mask:((ImageMask new)
       
  1013                             width:13;
       
  1014                             height:11;
       
  1015                             bits:(ByteArray fromPackedString:'@@@O@A>@O<A?8G? _>A?8C?@G8@O@@@a');
       
  1016                             yourself);
       
  1017                 yourself
       
  1018         ]
       
  1019 !
  1002 !
  1020 
  1003 
  1021 emptyIcon
  1004 emptyIcon
  1022     <resource: #image>
  1005     <resource: #image>
  1023     "This resource specification was automatically generated
  1006     "This resource specification was automatically generated
  1743     <resource: #programImage>
  1726     <resource: #programImage>
  1744 
  1727 
  1745     ^ ToolbarIconLibrary notificationClassBrowserIcon
  1728     ^ ToolbarIconLibrary notificationClassBrowserIcon
  1746 
  1729 
  1747     "Modified: / 20-07-2007 / 09:11:21 / cg"
  1730     "Modified: / 20-07-2007 / 09:11:21 / cg"
       
  1731 !
       
  1732 
       
  1733 obsoleteMethodIcon
       
  1734     <resource: #programImage>
       
  1735 
       
  1736     ^ ToolbarIconLibrary obsoleteMethodIcon
       
  1737 
       
  1738     "Created: / 21-09-2018 / 15:29:51 / Claus Gittinger"
  1748 !
  1739 !
  1749 
  1740 
  1750 packageIcon
  1741 packageIcon
  1751     <resource: #programImage>
  1742     <resource: #programImage>
  1752 
  1743 
  7186     sel notNil ifTrue:[
  7177     sel notNil ifTrue:[
  7187         sel := sel asString withoutSeparators.
  7178         sel := sel asString withoutSeparators.
  7188         ('*>>*' match:sel) ifTrue:[
  7179         ('*>>*' match:sel) ifTrue:[
  7189             sep := $>
  7180             sep := $>
  7190         ] ifFalse:[
  7181         ] ifFalse:[
  7191             ('*»*' match:sel) ifTrue:[
  7182             ('*»*' match:sel) ifTrue:[
  7192                 sep := $»
  7183                 sep := $»
  7193             ] ifFalse:[
  7184             ] ifFalse:[
  7194                 ('* *' match:sel) ifTrue:[
  7185                 ('* *' match:sel) ifTrue:[
  7195                     sep := Character space
  7186                     sep := Character space
  7196                 ]
  7187                 ]
  7197             ].
  7188             ].
  7226 
  7217 
  7227     |s sel sel2 t idx|
  7218     |s sel sel2 t idx|
  7228 
  7219 
  7229     aString isEmptyOrNil ifTrue:[^ nil].
  7220     aString isEmptyOrNil ifTrue:[^ nil].
  7230 
  7221 
  7231     (idx := aString indexOf:$») ~~ 0 ifTrue:[
  7222     (idx := aString indexOf:$») ~~ 0 ifTrue:[
  7232         s := (aString copyFrom:idx+1) withoutSeparators.
  7223         s := (aString copyFrom:idx+1) withoutSeparators.
  7233         s isEmpty ifTrue:[^ nil]. 
  7224         s isEmpty ifTrue:[^ nil]. 
  7234     ] ifFalse:[    
  7225     ] ifFalse:[    
  7235         s := aString asString string withoutSeparators.
  7226         s := aString asString string withoutSeparators.
  7236     ].
  7227     ].
  7276      self extractSelectorFrom:'#''at:put:'''                       
  7267      self extractSelectorFrom:'#''at:put:'''                       
  7277      self extractSelectorFrom:'at:something put:someValue'     
  7268      self extractSelectorFrom:'at:something put:someValue'     
  7278      self extractSelectorFrom:'self at:something put:someValue'
  7269      self extractSelectorFrom:'self at:something put:someValue'
  7279      self extractSelectorFrom:'(self at:something put:someValue)' 
  7270      self extractSelectorFrom:'(self at:something put:someValue)' 
  7280      self extractSelectorFrom:'[self at:something put:someValue] value' 
  7271      self extractSelectorFrom:'[self at:something put:someValue] value' 
  7281      self extractSelectorFrom:'Array » at:put:' 
  7272      self extractSelectorFrom:'Array » at:put:' 
  7282      self extractSelectorFrom:'Array>>at:put:' 
  7273      self extractSelectorFrom:'Array>>at:put:' 
  7283      self extractSelectorFrom:'Array>>#at:put:' 
  7274      self extractSelectorFrom:'Array>>#at:put:' 
  7284      self extractSelectorFrom:'Array>>#''at:put:''' 
  7275      self extractSelectorFrom:'Array>>#''at:put:''' 
  7285     "
  7276     "
  7286 
  7277 
  7449         aGCOrStream nextPutAll:' class'.
  7440         aGCOrStream nextPutAll:' class'.
  7450         "/ aGCOrStream emphasis:nil.
  7441         "/ aGCOrStream emphasis:nil.
  7451     ].
  7442     ].
  7452     selector notNil ifTrue:[ 
  7443     selector notNil ifTrue:[ 
  7453         aGCOrStream
  7444         aGCOrStream
  7454             nextPutAll:' » ';
  7445             nextPutAll:' » ';
  7455             bold;
  7446             bold;
  7456             nextPutAll:selector;
  7447             nextPutAll:selector;
  7457             normal.
  7448             normal.
  7458     ].
  7449     ].
  7459 
  7450