*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Thu, 11 Mar 2004 16:39:26 +0100
changeset 5693 6193522a042b
parent 5692 5db7964d2b43
child 5694 23de3a41e575
*** empty log message ***
FileApplicationNoteBook.st
FileBrowser.st
WorkspaceApplication.st
--- a/FileApplicationNoteBook.st	Thu Mar 11 16:35:00 2004 +0100
+++ b/FileApplicationNoteBook.st	Thu Mar 11 16:39:26 2004 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 2002 by eXept Software AG
               All Rights Reserved
@@ -4292,7 +4290,7 @@
 
     |text guessedEncoding s|
 
-    guessedEncoding := FileBrowser guessEncodingOfFile:item fileName asFilename.
+    guessedEncoding := SourceCodeManagerUtilities guessEncodingOfFile:item fileName asFilename.
     guessedEncoding := guessedEncoding ? (self fileEncoding).
     self fileEncoding:(guessedEncoding asSymbol).
 
@@ -5457,5 +5455,5 @@
 !FileApplicationNoteBook class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/FileApplicationNoteBook.st,v 1.160 2004-03-05 09:41:04 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/FileApplicationNoteBook.st,v 1.161 2004-03-11 15:39:26 cg Exp $'
 ! !
--- a/FileBrowser.st	Thu Mar 11 16:35:00 2004 +0100
+++ b/FileBrowser.st	Thu Mar 11 16:39:26 2004 +0100
@@ -1455,69 +1455,6 @@
     ^ true
 ! !
 
-!FileBrowser class methodsFor:'utilities'!
-
-guessEncodingOfFile:aFilename
-    "look for a string
-        encoding #name
-     or:
-        encoding: name
-     within the given buffer 
-     (which is usually the first few bytes of a textFile).
-     If thats not found, use heuristics (in CharacterArray) to guess."
-
-    |s buffer n "{Class: SmallInteger }"
-     binary enc|
-
-    s := aFilename readStreamOrNil.
-    s isNil ifTrue:[^ nil].
-
-    buffer := String new:2048.
-    n := buffer size.
-    n := s nextBytes:n into:buffer.
-    s close.
-
-    enc := SourceCodeManagerUtilities guessEncodingOfBuffer:buffer.
-    enc notNil ifTrue:[^ enc].
-
-    binary := false.
-    1 to:n do:[:i |
-        (buffer at:i) isPrintable ifFalse:[binary := true].
-    ].
-
-    "/ look for JIS7 / EUC encoding
-    (buffer findString:(CharacterEncoder jisISO2022EscapeSequence)) ~~ 0 ifTrue:[
-        ^ #'iso2020-jp'
-    ].
-    (buffer findString:(CharacterEncoder jis7KanjiEscapeSequence)) ~~ 0 ifTrue:[
-        ^ #jis7
-    ].
-    (buffer findString:(CharacterEncoder jis7KanjiOldEscapeSequence)) ~~ 0 ifTrue:[
-        ^ #jis7
-    ].
-
-    "/ TODO:
-
-"/    "/ look for EUC
-"/    idx := aString findFirst:[:char | |ascii|
-"/                                        ((ascii := char asciiValue) >= 16rA1)     
-"/                                        and:[ascii <= 16rFE]].
-"/    idx ~~ 0 ifTrue:[
-"/        ascii := (aString at:(idx + 1)) asciiValue.
-"/        (ascii >= 16rA1 and:[ascii <= 16rFE]) ifTrue:[
-"/            ^ #euc
-"/        ]
-"/    ].
-    "/ look for SJIS ...
-
-    ^ nil
-
-    "
-     FileBrowser guessEncodingOfFile:'../../libview2/resources/ApplicationModel_de.rs' asFilename
-     FileBrowser guessEncodingOfFile:'../../libview2/resources/ApplicationModel_ru.rs' asFilename
-    "
-! !
-
 !FileBrowser methodsFor:'aspects'!
 
 anyFilesPresentWithSuffix:suffix
@@ -6123,7 +6060,7 @@
 
     enc := encoding.
     ok := true.
-    guess := FileBrowser guessEncodingOfFile:path asFilename.
+    guess := SourceCodeManagerUtilities guessEncodingOfFile:path asFilename.
     guess := guess ? fileEncoding ? #binary.
 
     guess == #binary ifTrue:[
@@ -7487,5 +7424,5 @@
 !FileBrowser class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/FileBrowser.st,v 1.588 2004-03-09 21:42:04 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/FileBrowser.st,v 1.589 2004-03-11 15:39:17 cg Exp $'
 ! !
--- a/WorkspaceApplication.st	Thu Mar 11 16:35:00 2004 +0100
+++ b/WorkspaceApplication.st	Thu Mar 11 16:39:26 2004 +0100
@@ -645,11 +645,11 @@
     ].
 
     #(
-        ('GettingStarted.wsp'   'Getting Started' nil )
-        ('Keyboard.wsp'         'Keyboard'        nil )
+        ('Hello_utf8.wsp'       'Hello'           #'utf8' )
+        ('Welcome.wsp'          'Welcome'         nil )
         ('Setup.wsp'            'Setup'           nil )
-        ('Welcome.wsp'          'Welcome'         nil )
-        ('Hello_utf8.wsp'       'Hello'           #'utf8' )
+        ('Keyboard.wsp'         'Keyboard'        nil )
+        ('GettingStarted.wsp'   'Getting Started' nil )
     ) triplesDo:[:file :title :forcedEncoding|
         |pane encoding|
 
@@ -671,8 +671,9 @@
             needRemove := false.
         ].
     ].
-
-    wsApp openWindow
+    wsApp openWindow.
+    wsApp window waitUntilVisible.
+    wsApp selectedWorkspaceIndexHolder value:2.
 
     "
      self openSystemWorkspace
@@ -1332,5 +1333,5 @@
 !WorkspaceApplication class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/WorkspaceApplication.st,v 1.78 2004-03-11 15:35:00 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/WorkspaceApplication.st,v 1.79 2004-03-11 15:39:00 cg Exp $'
 ! !