#UI_ENHANCEMENT by cg
class: Tools::NewSystemBrowser
changed: #loadClasses:
better error message for non-autoloadable
classes with wrong filename.
--- a/Tools__NewSystemBrowser.st Mon May 02 17:12:09 2016 +0200
+++ b/Tools__NewSystemBrowser.st Mon May 02 17:37:02 2016 +0200
@@ -61762,11 +61762,33 @@
You can also try to load the class(es) from the repository,
via the ''import and load classes'' menu function of the
project list.'.
+ (cls packageDirectory exists
+ and:[ (cls packageDirectory
+ / ((Smalltalk fileNameForClass:cls),'.st')) exists not
+ and:[ (cls packageDirectory
+ / (cls nameWithoutNameSpacePrefix,'.st')) exists ]])
+ ifTrue:[
+ msg := 'Autoload of %1 failed.
+
+The expected file named "%2.st" was not found in the package ''%3''
+along your packagePath, or in the current directory.
+The packagePath is: { %4 }.
+
+ATTENTION:
+However, a file named "%5.st" (without namespace prefix) was found,
+but not listed in the abbrev.stc file, which lists different filenames.
+
+Please fix this either by renaming the file, or by fixing "abbrev.stc",
+or by regenerating the build support files via
+the browser''s project definition class menu.'.
+ ].
+
msg := (resources string:msg
with:nameShown
with:(Smalltalk fileNameForClass:cls)
with:cls package
- with:(Smalltalk packagePath asStringCollection asStringWith:' , ')).
+ with:((Smalltalk packagePath asStringCollection collect:[:s | '"',s,'"']) asStringWith:' , ')
+ with:(cls nameWithoutNameSpacePrefix allBold)).
numClasses > 1 ifTrue:[
(Dialog