[Pharo-dev] Nautilus unload...

Pavel Krivanek pavel.krivanek at gmail.com
Thu Nov 28 02:13:55 EST 2013


2013/11/28 Hernán Morales Durand <hernan.morales at gmail.com>

> Hi Pavel,
>
> El 27/11/2013 16:57, Pavel Krivanek escribió:
>
>  Do you do that on an image where Nautilus was not opened? I remove
>> Nautilus using this script without errors.
>>
>>
>> deletePackages := [:packageNames |
>>    SystemNavigation default removeAllButPackages: ((MCWorkingCopy
>> allManagers collect: #packageName) asSortedCollection copyWithoutAll:
>> packageNames).
>>    packageNames do: [:pn |
>>    (ScriptLoader new workingCopyFromPackageName: pn) unregister.
>>    (RPackage named: pn) unregister]].
>>
>> Nautilus cleanUp.
>> NautilusUI allInstances do: [ :inst |
>>       SystemAnnouncer uniqueInstance unsubscribe: inst].
>> Smalltalk garbageCollect.
>>
>> deletePackages value: #('NautilusRefactoring' 'NautilusCommon' 'Nautilus'
>>     'Refactoring-Critics'  'Refactoring-Changes' 'Refactoring-Core'
>>     'Refactoring-Environment' 'GroupManager' 'Manifest-Core'
>> 'Manifest-CriticBrowser').
>> listUnimplemented value: #Nautilus.
>>
>>
> Do you mean?
>
> (Undeclared at: #listUnimplemented put: #Nautilus).
>
> instead of
>
> listUnimplemented value: #Nautilus.
>

No, sorry, it's a part of a bigger script for this Jenkins job:
https://ci.inria.fr/pharo-contribution/view/Pharo-Kernel-3.0/job/PharoKernel3.0-FromTopShrink/

-- Pavel


>
>
>  KMRepository reset.
>> KMPragmaKeymapBuilder release.
>> Smalltalk resetTools.
>> 5 timesRepeat:[Smalltalk garbageCollect.].
>> Smalltalk fixObsoleteReferences.
>>
>> SystemNavigation default obsoleteClasses.
>> Undeclared.
>>
>>
>> -- Pavel
>>
>>
>>
>> 2013/11/27 Stéphane Ducasse <stephane.ducasse at inria.fr
>> <mailto:stephane.ducasse at inria.fr>>
>>
>>
>>     Hi esteban
>>
>>     I'm looking for a change due to the TreePackage introduction.
>>     Before I could simply do something like the following to unload
>> Nautilus
>>
>>
>>              Smalltalk tools remove: #browser.
>>              Smalltalk tools register: Browser as: #browser.
>>              (MCWorkingCopy forPackage: (MCPackage named:
>>     'NautilusRefactoring')) unload. "OK"
>>
>>              #Nautilus asClass cleanUp.
>>              KMRepository reset.
>>              KMPragmaKeymapBuilder release.
>>              #NautilusUI asClass allSubInstances do: [ :inst |
>>                      SystemAnnouncer uniqueInstance unsubscribe: inst].
>>              Smalltalk garbageCollect.
>>              (MCWorkingCopy forPackage: (MCPackage named:
>>     'NautilusCommon')) unload.
>>              (MCWorkingCopy forPackage: (MCPackage named: 'Nautilus'))
>>     unload.
>>
>>     And now if does not work anymore. I get some TreePackage around.
>>
>>     Apparently I get a weakMessageSend on classRemoved: and this message
>>     refers to an obsoletePackageTreeNautilus class.
>>
>>     buildGroupManagerFor: anInstance
>>
>>              | holder |
>>              holder := GroupHolder new.
>>              (holder
>>                      addADynamicClassGroupSilentlyNamed: 'Most Viewed
>>     Classes'
>>                      block: [ anInstance recentClassesElements ])
>>     removable: false.
>>              (holder
>>                      addADynamicClassGroupSilentlyNamed: 'Last Modified
>>     Classes'
>>                      block: [ self lastModifiedClasses ]) removable:
>> false.
>>
>>              (holder
>>                      addADynamicGroupSilentlyNamed: 'Work'
>>                      block: [ {} ]) removable: true; isFillable: true.
>>
>>              ^ holder
>>
>>
>>     Do you have any idea? A registration mechanism? from which I forgot
>>     to unregister.
>>
>>     Stef
>>
>>
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20131128/c5a90fac/attachment-0002.html>


More information about the Pharo-dev mailing list