#REFACTORING by cg
authorClaus Gittinger <cg@exept.de>
Sat, 07 Mar 2020 01:14:32 +0100
changeset 19560 f80a79b25de7
parent 19559 3ffdac9f212b
child 19561 cbeff6bda27e
#REFACTORING by cg class: AbstractFileBrowser added: #hasASN1 changed: #hasASN1AndSelection class: AbstractFileBrowser class added: #hasASN1
AbstractFileBrowser.st
--- a/AbstractFileBrowser.st	Sat Mar 07 01:14:24 2020 +0100
+++ b/AbstractFileBrowser.st	Sat Mar 07 01:14:32 2020 +0100
@@ -2875,6 +2875,15 @@
 
 !AbstractFileBrowser class methodsFor:'queries'!
 
+hasASN1
+    "true if the asn1 package is loaded"
+
+    |asn1ParserClass|
+
+    asn1ParserClass := Smalltalk at:#'OSI::ASN1Parser'.
+    ^ [ asn1ParserClass notNil and:[asn1ParserClass isLoaded]]
+!
+
 isAbstract
     ^ self == AbstractFileBrowser
 ! !
@@ -9466,16 +9475,13 @@
 !
 
 hasASN1
-    ^ [ OSI::ASN1Parser notNil 
-        and:[OSI::ASN1Parser isLoaded]]
-
+    ^ self class hasASN1
 !
 
 hasASN1AndSelection
     ^ [ self hasSelection value 
         and:[self currentSelectedFiles notEmptyOrNil
-        and:[OSI::ASN1Parser notNil 
-        and:[OSI::ASN1Parser isLoaded]]]]
+        and:[self class hasASN1]]]
 
     "Modified: / 17-02-2017 / 08:25:09 / cg"
 !