Fix in #listOfClasses - must check whether all superclasses are actually in environment.
authorJan Vrany <jan.vrany@fit.cvut.cz>
Sun, 27 Apr 2014 21:51:12 +0200
changeset 14287 25e0e7fd7c49
parent 14286 badb3e840d06
child 14288 01c8bbd5b6dd
Fix in #listOfClasses - must check whether all superclasses are actually in environment.
Tools__InheritanceClassList.st
--- a/Tools__InheritanceClassList.st	Sun Apr 27 21:49:17 2014 +0200
+++ b/Tools__InheritanceClassList.st	Sun Apr 27 21:51:12 2014 +0200
@@ -1,27 +1,13 @@
 "
- Copyright (c) 2007-2010 Jan Vrany, SWING Research Group, Czech Technical University in Prague
- Copyright (c) 2009-2010 eXept Software AG
+ COPYRIGHT (c) 2004 by eXept Software AG
+              All Rights Reserved
 
- Permission is hereby granted, free of charge, to any person
- obtaining a copy of this software and associated documentation
- files (the 'Software'), to deal in the Software without
- restriction, including without limitation the rights to use,
- copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the
- Software is furnished to do so, subject to the following
- conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- OTHER DEALINGS IN THE SOFTWARE.
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
 "
 "{ Package: 'stx:libtool' }"
 
@@ -38,29 +24,15 @@
 
 copyright
 "
- Copyright (c) 2007-2010 Jan Vrany, SWING Research Group, Czech Technical University in Prague
- Copyright (c) 2009-2010 eXept Software AG
-
- Permission is hereby granted, free of charge, to any person
- obtaining a copy of this software and associated documentation
- files (the 'Software'), to deal in the Software without
- restriction, including without limitation the rights to use,
- copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the
- Software is furnished to do so, subject to the following
- conditions:
+ COPYRIGHT (c) 2004 by eXept Software AG
+              All Rights Reserved
 
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- OTHER DEALINGS IN THE SOFTWARE.
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
 "
 !
 
@@ -202,22 +174,27 @@
     |top classes|
 
     (top := self topClassHolder value) isNil ifTrue:[
-	^ super listOfClasses
+        ^ super listOfClasses
     ].
 
     classes := top withAllSuperclasses copy reverse.
+    "/ Must check whether environment contains the class and filter it out,
+    "/ if not. Think of limited environment to Java classes which should not
+    "/ show Object & JavaObject even if they are real superclasses of any Java
+    "/ class.
+    "/ Q: Should we rather ignore all superclasses after first class which is not
+    "/ in environment?
+    classes := classes select:[:class | (environment at: class name ifAbsent:[nil]) notNil ].             
 "/    classes addFirst:InheritedEntry.
     ^ classes
 
-    "Modified: / 26.2.2000 / 00:38:48 / cg"
+    "Modified: / 26-02-2000 / 00:38:48 / cg"
+    "Modified: / 27-04-2014 / 20:48:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !InheritanceClassList class methodsFor:'documentation'!
 
-version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__InheritanceClassList.st,v 1.3 2011-07-03 13:34:57 cg Exp $'
-!
+version
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__InheritanceClassList.st,v 1.7 2014-04-27 19:51:12 vrany Exp $'
+! !
 
-version_SVN
-    ^ '§Id: Tools__InheritanceClassList.st 7796 2011-06-23 16:01:32Z vranyj1 §'
-! !