#REFACTORING by cg
class: AbstractFileBrowser
comment/format in: #canCreateNewProject
changed:
#canDropObjects:in:
#commonPrefixOfSelectedFiles
#currentSelectedFiles
#fileAddToJavaSourcePath
--- a/AbstractFileBrowser.st Sat Dec 30 23:39:26 2017 +0100
+++ b/AbstractFileBrowser.st Sat Dec 30 23:40:40 2017 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 2002 by eXept Software AG
All Rights Reserved
@@ -2972,7 +2974,7 @@
"/ are perfect here, but usually not available in the font
"/ and we have currently no way of knowing if they are...
"/ (could let the font draw into a bitmap and check if there is something...)
- "/ For now, write a dot.·
+ "/ For now, write a dot.·
"/ charPrinted := (Character value:(byte + 16r2400))
].
].
@@ -4835,7 +4837,7 @@
!
canDropObjects:aCollectionOfDropObjects in:aWidget
- ^ aCollectionOfDropObjects contains:[:dropObject | dropObject isFileObject]
+ ^ aCollectionOfDropObjects contains:#isFileObject
"Created: / 13-10-2006 / 15:52:49 / cg"
!
@@ -5822,8 +5824,10 @@
"add the current path to java's sourcePath
(only available with ST/J System"
- self currentSelectedObjects do:[:each |
- Java addToSourcePath:(each pathName)
+ Java notNil ifTrue:[
+ self currentSelectedObjects do:[:each |
+ Java addToSourcePath:(each pathName)
+ ].
].
"Created: / 9.11.1998 / 05:41:34 / cg"
@@ -8602,7 +8606,7 @@
] ifFalse:[sig == HaltInterrupt ifTrue:[ |sender|
label := msg := 'Breakpoint/Halt in fileIn'.
sender := ex suspendedContext.
- msg := msg , ('\\in %1 » %2' bindWith:(sender receiver class name) with:(sender sender selector))
+ msg := msg , ('\\in %1 » %2' bindWith:(sender receiver class name) with:(sender sender selector))
] ifFalse:[
label := 'Error in fileIn'.
msg := 'error in fileIn: %1'
@@ -8830,11 +8834,12 @@
canCreateNewProject
self currentFilesAreInSameDirectory ifFalse:[^ false].
- ^ self currentSelectedFiles contains:[:fileName|
- | suffix|
- suffix := fileName suffix asLowercase.
- (suffix = 'prj' or:[suffix = 'st'])
- ]
+ ^ self currentSelectedFiles
+ contains:[:fileName|
+ | suffix|
+ suffix := fileName suffix asLowercase.
+ (suffix = 'prj' or:[suffix = 'st'])
+ ]
!
canDoTerminal
@@ -9264,7 +9269,7 @@
selFiles := self currentSelectedObjects.
selFiles isEmpty ifTrue:[^ nil].
- stringCol := selFiles collect:[:file | file asString].
+ stringCol := selFiles collect:#asString.
firstPre := stringCol at:1.
stringCol from:2 do:[:el|
firstPre := firstPre commonPrefixWith:el.
@@ -9448,7 +9453,7 @@
!
currentSelectedFiles
- ^ self currentSelectedObjects reject:[:file | file isDirectory].
+ ^ self currentSelectedObjects reject:#isDirectory.
"Modified: / 04-12-2006 / 13:14:39 / cg"
!