AbstractLauncherApplication.st
changeset 18804 5e06abe51151
parent 18792 d370c81b327a
child 18819 af9f6140c93b
--- a/AbstractLauncherApplication.st	Wed Jun 05 11:33:00 2019 +0200
+++ b/AbstractLauncherApplication.st	Wed Jun 05 14:16:23 2019 +0200
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1997 by eXept Software AG
               All Rights Reserved
@@ -7631,7 +7629,7 @@
 addItemWithPackagePath:path target:target asApplication:isApplication toRoot:aRoot
     "add a package item to the tree"
 
-    |item isAlreadyLoaded defClass packageID|
+    |item isAlreadyLoaded defClass packageID targetPath isBroken|
 
     "/ see if already loaded
 
@@ -7641,7 +7639,7 @@
 
     item := self getItemByPath:path packageID:packageID under:aRoot.
 
-    isAlreadyLoaded := false.
+    isAlreadyLoaded := isBroken := false.
     Error handle:[:ex |
         item label:(item label , (' ERROR - please rebuild!!' withColor:Color red)).
     ] do:[    
@@ -7653,17 +7651,24 @@
 
     target notNil ifTrue:[
         ((target startsWith:'lib ') or:[(target startsWith:'app ')]) ifTrue:[
-            pathByItem at:item put:(target copyFrom:(target indexOfSeparator + 1)) withoutSeparators.
+            targetPath := (target copyFrom:(target indexOfSeparator + 1)) withoutSeparators.
+            pathByItem at:item put:targetPath.
+            isBroken := ('packages' asFilename / targetPath) directory exists not.
         ].
     ].
 
     "/ do not overwrite an app by a lib with the same name (happens in expecco/application)
     (isApplication or:[ item icon isNil or:[item icon == folderIcon or:[item icon == greyFolderIcon]]]) ifTrue:[
-        isAlreadyLoaded ifTrue:[
-            item icon:(isApplication ifTrue:[greyApplicationIcon] ifFalse:[greyPackageIcon]). 
-            item label:(item label , alreadyLoadedString)
-        ] ifFalse:[
-            item icon:(isApplication ifTrue:[applicationIcon] ifFalse:[packageIcon]). 
+        isBroken ifTrue:[
+            item icon:(ToolbarIconLibrary packageDefectOpen24x24Icon2).
+            item label:(item label , (' (broken: folder no longer present)' withColor:Color red))
+        ] ifFalse:[    
+            isAlreadyLoaded ifTrue:[
+                item icon:(isApplication ifTrue:[greyApplicationIcon] ifFalse:[greyPackageIcon]). 
+                item label:(item label , alreadyLoadedString)
+            ] ifFalse:[
+                item icon:(isApplication ifTrue:[applicationIcon] ifFalse:[packageIcon]). 
+            ].
         ].
     ].
 
@@ -7683,6 +7688,8 @@
             ].
         ]
     ].
+
+    "Modified: / 05-06-2019 / 14:15:02 / Claus Gittinger"
 !
 
 filterChangedAction
@@ -8129,6 +8136,9 @@
 !
 
 readPackageTree
+    "looks for the packages folder, which contains symbolic-link-like entries
+     for packages which were generated during the build process"
+     
     packageDirPath := Smalltalk getSystemFileName:'packages'.
     packageDirPath isNil ifTrue:[
         root label:root label,((resources string:' (no "packages" folder found)') withColor:Color red).
@@ -8218,6 +8228,8 @@
             ].
         ].
     ].
+
+    "Modified (comment): / 05-06-2019 / 13:52:27 / Claus Gittinger"
 !
 
 selectionChangeAction:selectionIndices