--- a/NewLauncher.st Tue Feb 10 14:19:30 2015 +0100
+++ b/NewLauncher.st Tue Feb 10 18:12:14 2015 +0100
@@ -3513,7 +3513,7 @@
root label:root label,((resources string:' (no "packages" folder found)') colorizeAllWith:Color red).
] ifFalse:[
packageDirPath asFilename directoryContentsAsFilenamesDo:[:fn |
- |item base nm path parentPath parent isLibrary isApplication isAlreadyLoaded|
+ |item base nm path parentPath parent isLibrary isApplication isAlreadyLoaded defClass|
(fn baseName startsWith:'.') ifFalse:[
base := fn withoutSuffix baseName.
@@ -3535,7 +3535,10 @@
path := nm asCollectionOfSubstringsSeparatedBy:$_.
"/ see if already loaded
packageID := path first , ':' , ((path copyFrom:2) asStringWith:$/).
- isAlreadyLoaded := (ProjectDefinition definitionClassForPackage:packageID) notNil.
+ isAlreadyLoaded :=
+ (defClass := ProjectDefinition definitionClassForPackage:packageID) notNil
+ and:[ defClass isLoaded
+ and:[ defClass isFullyLoaded ]].
item := getItemByPath value:path.
@@ -3652,7 +3655,7 @@
loadAction :=
[:doBrowse |
(v scrolledView selectionValue) do:[:eachSelectedItem |
- |package repos|
+ |package repos defClass|
eachSelectedItem type == #monticelloRepository ifTrue:[
repos := eachSelectedItem info.
@@ -3672,16 +3675,23 @@
Smalltalk retractInterestsFor:updateAction.
]
].
- doBrowse ifTrue:[
- Tools::NewSystemBrowser openOnPackage:package
- ].
- eachSelectedItem icon == packageIcon ifTrue:[
- eachSelectedItem icon:greyPackageIcon.
- eachSelectedItem label:(eachSelectedItem label , ' (already loaded)' asText allItalic).
- ] ifFalse:[
- eachSelectedItem icon == applicationIcon ifTrue:[
- eachSelectedItem icon:greyApplicationIcon.
- eachSelectedItem label:(eachSelectedItem label , (resources string:' (already loaded)') asText allItalic).
+ ((defClass := package asPackageId projectDefinitionClass) notNil
+ and:[ defClass isLoaded
+ and:[ defClass isFullyLoaded ]])
+ ifFalse:[
+ Dialog warn:'Load failed.'
+ ] ifTrue:[
+ doBrowse ifTrue:[
+ Tools::NewSystemBrowser openOnPackage:package
+ ].
+ eachSelectedItem icon == packageIcon ifTrue:[
+ eachSelectedItem icon:greyPackageIcon.
+ eachSelectedItem label:(eachSelectedItem label , ' (already loaded)' asText allItalic).
+ ] ifFalse:[
+ eachSelectedItem icon == applicationIcon ifTrue:[
+ eachSelectedItem icon:greyApplicationIcon.
+ eachSelectedItem label:(eachSelectedItem label , (resources string:' (already loaded)') asText allItalic).
+ ].
].
].
].
@@ -5659,14 +5669,14 @@
!NewLauncher class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/NewLauncher.st,v 1.527 2015-02-09 14:23:18 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/NewLauncher.st,v 1.528 2015-02-10 17:12:14 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libtool/NewLauncher.st,v 1.527 2015-02-09 14:23:18 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/NewLauncher.st,v 1.528 2015-02-10 17:12:14 cg Exp $'
!
version_SVN
- ^ '$Id: NewLauncher.st,v 1.527 2015-02-09 14:23:18 cg Exp $'
+ ^ '$Id: NewLauncher.st,v 1.528 2015-02-10 17:12:14 cg Exp $'
! !