'From Squeak3.7 of ''4 September 2004'' [latest update: #5988] on 27 December 2005 at 12:04:17 am'! "Change Set: AspectS Date: 27 December 2005 Author: Robert Hirschfeld (hirschfeld@acm.org) Version: 0.6.6 Prerequisite: Squeak 3.7 or later (due to KCP changes) License: Squeak License (http://www.squeak.org/download/license.html) *** Browser modifications and extensions (incl. tools aspect) need to be revisited!!!!!! *** AspectS is an extension of the Squeak metaobject protocol (MOP) to support aspect-oriented programming (AOP). http://www.prakinf.tu-ilmenau.de/~hirsch/Projects/Squeak/AspectS/ WARNING!!!! Incorrectly using AspectS may result in an inconsistent image that can't be trusted anymore!!!! Therefore, before experimenting with AspectS, please save and backup your image!!!! This version of AspectS is based on a port of John Brant's MethodWrappers. http://st-www.cs.uiuc.edu/~brant/Applications/MethodWrappers.html"! Object subclass: #AsA instanceVariableNames: 'x' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests General'! Object subclass: #AsAdvice instanceVariableNames: 'pointcut qualifier wrappers installed' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Aspects'! Object subclass: #AsAdviceQualifier instanceVariableNames: 'attributes' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Aspects'! AsAdvice subclass: #AsAroundAdvice instanceVariableNames: 'aroundBlock' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Aspects'! Object subclass: #AsAspect instanceVariableNames: 'receivers senders senderClasses projects processes clientAnnotations advice installed' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Aspects'! AsAspect subclass: #AsAbstractVisitorAlternative2Aspect instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Examples Visitor Alternative 2'! AsAspect subclass: #AsAbstractVisitorAspect instanceVariableNames: 'trace' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Examples Visitor'! AsAspect subclass: #AsAspectA instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests General'! AsAspect subclass: #AsAspectB instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests General'! AsAspectB subclass: #AsAspectBA instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests General'! AsAspectB subclass: #AsAspectBB instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests General'! AsA subclass: #AsB instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests General'! AsAdvice subclass: #AsBeforeAfterAdvice instanceVariableNames: 'beforeBlock afterBlock' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Aspects'! Object subclass: #AsCFlowPoint instanceVariableNames: 'object selector' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Aspects'! Object subclass: #AsCounter instanceVariableNames: 'n' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Examples Counter'! AsAspect subclass: #AsCounterAutoReset2Aspect instanceVariableNames: 'threshold' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Examples Counter'! AsAspect subclass: #AsCounterAutoResetAspect instanceVariableNames: 'threshold count' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Examples Counter'! AsAspect subclass: #AsCounterSetTraceAspect instanceVariableNames: 'trace' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Examples Counter'! AsAspect subclass: #AsCounterThresholdAspect instanceVariableNames: 'threshold lastPass' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Examples Counter'! Object subclass: #AsFactorial2 instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Examples Factorial'! AsAspect subclass: #AsFactorial2TraceAspect instanceVariableNames: 'trace traceFirst traceAllButFirst' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Examples Factorial'! AsAspect subclass: #AsFactorialTraceAspect instanceVariableNames: 'trace traceFirst traceAllButFirst' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Examples Factorial'! AsAspect subclass: #AsFormattedWorkspaceAspect instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Examples FormattedWorkspace'! AsAdvice subclass: #AsHandlerAdvice instanceVariableNames: 'exception handlerBlock' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Aspects'! AsAbstractVisitorAlternative2Aspect subclass: #AsInfixVisitorAlternative2Aspect instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Examples Visitor Alternative 2'! AsAspect subclass: #AsInfixVisitorAlternativeAspect instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Examples Visitor Alternative'! AsAbstractVisitorAspect subclass: #AsInfixVisitorAspect instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Examples Visitor'! AsAdvice subclass: #AsIntroductionAdvice instanceVariableNames: 'introBlock' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Aspects'! Object subclass: #AsJoinPointDescriptor instanceVariableNames: 'targetClass targetSelector' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Aspects'! Object subclass: #AsLeaf instanceVariableNames: 'value' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Examples Visitor'! Object subclass: #AsMethodWrapperInstVars instanceVariableNames: 'clientSelector clientMethod definingClass wrappedClass wrappingWrapper aspect advice activators' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Wrappers'! AsMethodWrapperInstVars subclass: #AsAroundWrapperInstVars instanceVariableNames: 'aroundBlock' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Wrappers'! AsMethodWrapperInstVars subclass: #AsBeforeAfterWrapperInstVars instanceVariableNames: 'beforeBlock afterBlock' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Wrappers'! AsMethodWrapperInstVars subclass: #AsHandlerWrapperInstVars instanceVariableNames: 'exception handlerBlock' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Wrappers'! AsMethodWrapperInstVars subclass: #AsIntroductionWrapperInstVars instanceVariableNames: 'introBlock' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Wrappers'! AsAspect subclass: #AsMorphicMousingAspect instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Examples MorphMousing'! AsAspect subclass: #AsMorphicMousingProjectAspect instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Examples MorphMousing'! Object subclass: #AsNode instanceVariableNames: 'first op second' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Examples Visitor'! PluggableListMorph subclass: #AsPluggableListMorph instanceVariableNames: 'itemConversionBlock' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tools'! PluggableListView subclass: #AsPluggableListView instanceVariableNames: 'itemConversionBlock' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tools'! AsPluggableListMorph subclass: #AsPluggableMessageCategoryListMorph instanceVariableNames: 'getRawListSelector priorRawList' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tools'! AsPluggableListView subclass: #AsPluggableMessageCategoryListView instanceVariableNames: 'getRawListSelector priorRawList' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tools'! AsAbstractVisitorAlternative2Aspect subclass: #AsPostfixVisitorAlternative2Aspect instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Examples Visitor Alternative 2'! AsAspect subclass: #AsPostfixVisitorAlternativeAspect instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Examples Visitor Alternative'! AsAbstractVisitorAspect subclass: #AsPostfixVisitorAspect instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Examples Visitor'! AsAbstractVisitorAlternative2Aspect subclass: #AsPrefixVisitorAlternative2Aspect instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Examples Visitor Alternative 2'! AsAspect subclass: #AsPrefixVisitorAlternativeAspect instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Examples Visitor Alternative'! AsAbstractVisitorAspect subclass: #AsPrefixVisitorAspect instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Examples Visitor'! Object subclass: #AsProcessExample instanceVariableNames: 'wordArray' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests ProcessSpecific'! AsAspect subclass: #AsProcessExampleIndifferentAspect instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests ProcessSpecific'! AsAspect subclass: #AsProcessExampleSpecificAspect instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests ProcessSpecific'! Object subclass: #AsSingleton instanceVariableNames: 'creationTime' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Examples Singleton'! AsAspect subclass: #AsSingletonAspect instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Examples Singleton'! TestCase subclass: #AsTestCase instanceVariableNames: 'aspekt result trace' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests General'! AsTestCase subclass: #AsAdviceQualifierTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests General'! AsTestCase subclass: #AsAroundWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests Around'! AsTestCase subclass: #AsAspectAnnotationsTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests General'! AsTestCase subclass: #AsBeforeAfterWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests BeforeAfter'! AsAroundWrapperTest subclass: #AsCFlowAllButFirstClassRGAWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests Around'! AsBeforeAfterWrapperTest subclass: #AsCFlowAllButFirstClassRGBAWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests BeforeAfter'! AsAroundWrapperTest subclass: #AsCFlowAllButFirstClassRSAWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests Around'! AsBeforeAfterWrapperTest subclass: #AsCFlowAllButFirstClassRSBAWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests BeforeAfter'! AsAroundWrapperTest subclass: #AsCFlowAllButFirstClassSGAWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests Around'! AsBeforeAfterWrapperTest subclass: #AsCFlowAllButFirstClassSGBAWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests BeforeAfter'! AsAroundWrapperTest subclass: #AsCFlowAllButFirstClassSSAWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests Around'! AsBeforeAfterWrapperTest subclass: #AsCFlowAllButFirstClassSSBAWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests BeforeAfter'! AsAroundWrapperTest subclass: #AsCFlowAllButFirstInstanceRGAWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests Around'! AsBeforeAfterWrapperTest subclass: #AsCFlowAllButFirstInstanceRGBAWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests BeforeAfter'! AsAroundWrapperTest subclass: #AsCFlowAllButFirstInstanceRSAWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests Around'! AsBeforeAfterWrapperTest subclass: #AsCFlowAllButFirstInstanceRSBAWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests BeforeAfter'! AsAroundWrapperTest subclass: #AsCFlowAllButFirstInstanceSGAWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests Around'! AsBeforeAfterWrapperTest subclass: #AsCFlowAllButFirstInstanceSGBAWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests BeforeAfter'! AsAroundWrapperTest subclass: #AsCFlowAllButFirstInstanceSSAWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests Around'! AsBeforeAfterWrapperTest subclass: #AsCFlowAllButFirstInstanceSSBAWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests BeforeAfter'! AsBeforeAfterWrapperTest subclass: #AsCFlowAllButFirstSuperRGBAWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests BeforeAfter Super'! AsBeforeAfterWrapperTest subclass: #AsCFlowAllButFirstSuperRSBAWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests BeforeAfter Super'! AsBeforeAfterWrapperTest subclass: #AsCFlowAllButFirstSuperSGBAWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests BeforeAfter Super'! AsBeforeAfterWrapperTest subclass: #AsCFlowAllButFirstSuperSSBAWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests BeforeAfter Super'! AsAroundWrapperTest subclass: #AsCFlowFirstClassRGAWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests Around'! AsBeforeAfterWrapperTest subclass: #AsCFlowFirstClassRGBAWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests BeforeAfter'! AsAroundWrapperTest subclass: #AsCFlowFirstClassRSAWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests Around'! AsBeforeAfterWrapperTest subclass: #AsCFlowFirstClassRSBAWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests BeforeAfter'! AsAroundWrapperTest subclass: #AsCFlowFirstClassSGAWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests Around'! AsBeforeAfterWrapperTest subclass: #AsCFlowFirstClassSGBAWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests BeforeAfter'! AsAroundWrapperTest subclass: #AsCFlowFirstClassSSAWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests Around'! AsBeforeAfterWrapperTest subclass: #AsCFlowFirstClassSSBAWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests BeforeAfter'! AsAroundWrapperTest subclass: #AsCFlowFirstInstanceRGAWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests Around'! AsBeforeAfterWrapperTest subclass: #AsCFlowFirstInstanceRGBAWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests BeforeAfter'! AsAroundWrapperTest subclass: #AsCFlowFirstInstanceRSAWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests Around'! AsBeforeAfterWrapperTest subclass: #AsCFlowFirstInstanceRSBAWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests BeforeAfter'! AsAroundWrapperTest subclass: #AsCFlowFirstInstanceSGAWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests Around'! AsBeforeAfterWrapperTest subclass: #AsCFlowFirstInstanceSGBAWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests BeforeAfter'! AsAroundWrapperTest subclass: #AsCFlowFirstInstanceSSAWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests Around'! AsBeforeAfterWrapperTest subclass: #AsCFlowFirstInstanceSSBAWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests BeforeAfter'! AsBeforeAfterWrapperTest subclass: #AsCFlowFirstSuperRGBAWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests BeforeAfter Super'! AsBeforeAfterWrapperTest subclass: #AsCFlowFirstSuperRSBAWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests BeforeAfter Super'! AsBeforeAfterWrapperTest subclass: #AsCFlowFirstSuperSGBAWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests BeforeAfter Super'! AsBeforeAfterWrapperTest subclass: #AsCFlowFirstSuperSSBAWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests BeforeAfter Super'! AsTestCase subclass: #AsCounterAspectTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Examples Counter'! AsCounterAspectTest subclass: #AsCounterAutoReset2AspectTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Examples Counter'! AsCounterAspectTest subclass: #AsCounterAutoResetAspectTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Examples Counter'! AsCounterAspectTest subclass: #AsCounterSetTraceAspectTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Examples Counter'! AsCounterAspectTest subclass: #AsCounterThresholdAspectTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Examples Counter'! AsTestCase subclass: #AsFactorialAspectTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Examples Factorial'! AsFactorialAspectTest subclass: #AsFactorial2TraceAspectTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Examples Factorial'! AsFactorialAspectTest subclass: #AsFactorialTraceAspectTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Examples Factorial'! AsTestCase subclass: #AsHandlerWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests Handler'! AsHandlerWrapperTest subclass: #AsCFlowAllButFirstClassRGHWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests Handler'! AsHandlerWrapperTest subclass: #AsCFlowAllButFirstClassRSHWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests Handler'! AsHandlerWrapperTest subclass: #AsCFlowAllButFirstClassSGHWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests Handler'! AsHandlerWrapperTest subclass: #AsCFlowAllButFirstClassSSHWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests Handler'! AsHandlerWrapperTest subclass: #AsCFlowAllButFirstInstanceRGHWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests Handler'! AsHandlerWrapperTest subclass: #AsCFlowAllButFirstInstanceRSHWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests Handler'! AsHandlerWrapperTest subclass: #AsCFlowAllButFirstInstanceSGHWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests Handler'! AsHandlerWrapperTest subclass: #AsCFlowAllButFirstInstanceSSHWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests Handler'! AsHandlerWrapperTest subclass: #AsCFlowFirstClassRGHWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests Handler'! AsHandlerWrapperTest subclass: #AsCFlowFirstClassRSHWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests Handler'! AsHandlerWrapperTest subclass: #AsCFlowFirstClassSGHWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests Handler'! AsHandlerWrapperTest subclass: #AsCFlowFirstClassSSHWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests Handler'! AsHandlerWrapperTest subclass: #AsCFlowFirstInstanceRGHWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests Handler'! AsHandlerWrapperTest subclass: #AsCFlowFirstInstanceRSHWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests Handler'! AsHandlerWrapperTest subclass: #AsCFlowFirstInstanceSGHWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests Handler'! AsHandlerWrapperTest subclass: #AsCFlowFirstInstanceSSHWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests Handler'! AsTestCase subclass: #AsIntroductionWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests Introduction'! AsTestCase subclass: #AsMethodWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests General'! AsAroundWrapperTest subclass: #AsReceiverGeneralAWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests Around'! AsBeforeAfterWrapperTest subclass: #AsReceiverGeneralBAWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests BeforeAfter'! AsHandlerWrapperTest subclass: #AsReceiverGeneralHWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests Handler'! AsIntroductionWrapperTest subclass: #AsReceiverGeneralIWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests Introduction'! AsAroundWrapperTest subclass: #AsReceiverSpecificAWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests Around'! AsBeforeAfterWrapperTest subclass: #AsReceiverSpecificBAWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests BeforeAfter'! AsHandlerWrapperTest subclass: #AsReceiverSpecificHWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests Handler'! AsIntroductionWrapperTest subclass: #AsReceiverSpecificIWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests Introduction'! AsAroundWrapperTest subclass: #AsSenderGeneralAWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests Around'! AsBeforeAfterWrapperTest subclass: #AsSenderGeneralBAWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests BeforeAfter'! AsHandlerWrapperTest subclass: #AsSenderGeneralHWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests Handler'! AsIntroductionWrapperTest subclass: #AsSenderGeneralIWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests Introduction'! AsAroundWrapperTest subclass: #AsSenderSpecificAWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests Around'! AsBeforeAfterWrapperTest subclass: #AsSenderSpecificBAWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests BeforeAfter'! AsHandlerWrapperTest subclass: #AsSenderSpecificHWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests Handler'! AsIntroductionWrapperTest subclass: #AsSenderSpecificIWrapperTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tests Introduction'! AsTestCase subclass: #AsSingletonAspectTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Examples Singleton'! AsTestCase subclass: #AsVisitorAlternative2AspectTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Examples Visitor Alternative 2'! AsVisitorAlternative2AspectTest subclass: #AsInfixVisitorAlternative2AspectTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Examples Visitor Alternative 2'! AsVisitorAlternative2AspectTest subclass: #AsPostfixVisitorAlternative2AspectTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Examples Visitor Alternative 2'! AsVisitorAlternative2AspectTest subclass: #AsPrefixVisitorAlternative2AspectTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Examples Visitor Alternative 2'! AsTestCase subclass: #AsVisitorAlternativeAspectTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Examples Visitor Alternative'! AsVisitorAlternativeAspectTest subclass: #AsInfixVisitorAlternativeAspectTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Examples Visitor Alternative'! AsVisitorAlternativeAspectTest subclass: #AsPostfixVisitorAlternativeAspectTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Examples Visitor Alternative'! AsVisitorAlternativeAspectTest subclass: #AsPrefixVisitorAlternativeAspectTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Examples Visitor Alternative'! AsTestCase subclass: #AsVisitorAspectTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Examples Visitor'! AsVisitorAspectTest subclass: #AsInfixVisitorAspectTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Examples Visitor'! AsVisitorAspectTest subclass: #AsPostfixVisitorAspectTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Examples Visitor'! AsVisitorAspectTest subclass: #AsPrefixVisitorAspectTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Examples Visitor'! AsAdviceQualifier class instanceVariableNames: 'constraints'! Browser subclass: #AsBrowser instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tools'! AsBrowser subclass: #AsHierarchyBrowser instanceVariableNames: 'classList centralClass' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tools'! MessageSet subclass: #AsMessageSet instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tools'! ProtocolBrowser subclass: #AsProtocolBrowser instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tools'! CompiledMethod variableByteSubclass: #AsMethodWrapper instanceVariableNames: '' classVariableNames: 'ProtoActivators' poolDictionaries: '' category: 'AspectS-Wrappers'! AsMethodWrapper variableByteSubclass: #AsAroundWrapper instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Wrappers'! AsMethodWrapper variableByteSubclass: #AsBeforeAfterWrapper instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Wrappers'! AsMethodWrapper variableByteSubclass: #AsHandlerWrapper instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Wrappers'! AsMethodWrapper variableByteSubclass: #AsIntroductionWrapper instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Wrappers'! AsMethodWrapper class instanceVariableNames: 'protoMethods wrapperInstVars'! LazyListMorph subclass: #AsLazyListMorph instanceVariableNames: 'selectedClass' classVariableNames: '' poolDictionaries: '' category: 'AspectS-Tools'! !Object methodsFor: 'message handling' stamp: 'rhi 5/17/2004 15:35'! withArgs: argArray executeMethod: compiledMethod "Execute compiledMethod against the receiver and args in argArray" | selector | selector _ Symbol new. self class simpleAddSelector: selector withMethod: compiledMethod. ^ [self perform: selector withArguments: argArray] ensure: [self class basicRemoveSelector: selector]! ! !Object methodsFor: 'testing' stamp: 'rhi 5/28/2001 08:26'! isAsAdviceQualifier ^ false! ! !Object methodsFor: 'testing' stamp: 'rhi 7/17/2001 15:44'! isAsAspectClass ^ false! ! !Object methodsFor: 'testing' stamp: 'rhi 5/28/2001 08:26'! isAsCFlowPoint ^ false! ! !Object methodsFor: 'testing' stamp: 'rhi 8/11/2003 01:47'! isAsIntroductionWrapper ^ false! ! !Object methodsFor: 'testing' stamp: 'rhi 11/28/2004 12:49'! isAsJoinPointDescriptor ^ false! ! !Object methodsFor: 'testing' stamp: 'rhi 4/29/2001 10:38'! isAsMethodWrapper ^ false! ! !Object methodsFor: 'testing' stamp: 'rhi 10/23/2001 11:50'! isBlockContext ^ false! ! !Object methodsFor: 'testing' stamp: 'rhi 7/3/2004 21:12'! isLazyListMorph ^ false! ! !Object methodsFor: 'aspects' stamp: 'rhi 9/16/2002 00:55'! aspectClasses ^ self class aspectClasses! ! !Object methodsFor: 'aspects' stamp: 'rhi 9/16/2002 00:55'! aspects ^ self class aspects! ! !Object methodsFor: 'aspects' stamp: 'rhi 9/16/2002 00:55'! wrapperClasses ^ self class wrapperClasses! ! !Object methodsFor: 'aspects' stamp: 'rhi 9/16/2002 00:56'! wrappers self flag: #rhi. "NAME CONFLICT with AsAdvice>>wrappers!!" ^ self class wrappers! ! !AsA methodsFor: 'accessing' stamp: 'rhi 4/29/2001 20:40'! x "^ " ^ x! ! !AsA methodsFor: 'accessing' stamp: 'rhi 6/9/2001 16:55'! x: anInteger x _ anInteger.! ! !AsA methodsFor: 'debugging' stamp: 'rhi 6/9/2001 16:54'! addToX: anInteger self x: self x + anInteger. ^ self x! ! !AsA methodsFor: 'debugging' stamp: 'rhi 6/9/2001 16:54'! callNTimes: anInteger ^ anInteger = 0 ifTrue: [0] ifFalse: [anInteger + (self callNTimes: anInteger - 1)]! ! !AsA methodsFor: 'debugging' stamp: 'rhi 6/9/2001 16:54'! createAndCallNTimes: anInteger ^ anInteger = 0 ifTrue: [0] ifFalse: [anInteger + (self class new createAndCallNTimes: anInteger - 1)]! ! !AsA methodsFor: 'debugging' stamp: 'rhi 6/9/2001 16:54'! createAndFailInNTimes: anInteger anInteger = 0 ifTrue: [^ Error signal] ifFalse: [ anInteger > 0 ifTrue: [self class new createAndFailInNTimes: anInteger - 1] ifFalse: [self error: 'Not valid for negative integers.']].! ! !AsA methodsFor: 'debugging' stamp: 'rhi 6/9/2001 16:54'! failInNTimes: anInteger anInteger = 0 ifTrue: [^ Error signal] ifFalse: [ anInteger > 0 ifTrue: [self failInNTimes: anInteger - 1] ifFalse: [self error: 'Not valid for negative integers.']].! ! !AsA methodsFor: 'debugging' stamp: 'rhi 11/11/2003 12:46'! mCompile ^ 'jin' copy! ! !AsA methodsFor: 'debugging' stamp: 'rhi 6/9/2001 16:54'! mOne! ! !AsA methodsFor: 'debugging' stamp: 'rhi 6/9/2001 16:54'! mTwo! ! !AsA methodsFor: 'debugging' stamp: 'rhi 1/7/2002 11:21'! recAndDefClass ^ 'rec:', self class name, '(def:AsA)'! ! !AsA methodsFor: 'debugging' stamp: 'rhi 2/28/2002 10:21'! setXNonLocalReturn: aBlockContext aBlockContext value.! ! !AsA methodsFor: 'debugging' stamp: 'rhi 2/28/2002 10:15'! setXNonLocalReturnInteger: anInteger self setXNonLocalReturn: [^ self x: anInteger].! ! !AsA methodsFor: 'debugging' stamp: 'rhi 6/9/2001 16:55'! signalFileDoesNotExistException FileDoesNotExistException new signal.! ! !AsA methodsFor: 'debugging' stamp: 'rhi 6/9/2001 16:55'! signalNoException ^ 69! ! !AsAdvice methodsFor: 'accessing' stamp: 'rhi 5/7/2001 14:37'! installed "^ " ^ installed! ! !AsAdvice methodsFor: 'accessing' stamp: 'rhi 5/7/2001 14:37'! installed: aBoolean installed _ aBoolean.! ! !AsAdvice methodsFor: 'accessing' stamp: 'rhi 4/23/2002 21:44'! pointcut "^ " self flag: #rhi. "#value returns a " ^ pointcut! ! !AsAdvice methodsFor: 'accessing' stamp: 'rhi 2/20/2002 13:13'! pointcut: aBlockContext pointcut _ aBlockContext.! ! !AsAdvice methodsFor: 'accessing' stamp: 'rhi 5/25/2001 22:58'! qualifier "^ " ^ qualifier! ! !AsAdvice methodsFor: 'accessing' stamp: 'rhi 5/25/2001 22:58'! qualifier: anAsAdviceQualifier qualifier _ anAsAdviceQualifier.! ! !AsAdvice methodsFor: 'accessing' stamp: 'rhi 5/7/2001 09:14'! wrappers "^ " ^ wrappers! ! !AsAdvice methodsFor: 'accessing' stamp: 'rhi 5/7/2001 09:14'! wrappers: aCollection wrappers _ aCollection.! ! !AsAdvice methodsFor: 'initialization' stamp: 'rhi 1/30/2002 12:55'! initialize self pointcut: nil; qualifier: nil; wrappers: nil; installed: false.! ! !AsAdvice methodsFor: 'installation' stamp: 'rhi 11/15/2004 12:30'! installWith: anAsAspect self installed ifTrue: [self error: 'Advice already installed.']. [ self wrappers: OrderedCollection new; buildWrappers; installWrappersWith: anAsAspect; installed: true. ] on: Error do: [:ex | self uninstall. self error: ex messageText "ex description"].! ! !AsAdvice methodsFor: 'installation' stamp: 'rhi 5/7/2001 09:31'! uninstall self uninstallWrappers; wrappers: nil; installed: false.! ! !AsAdvice methodsFor: 'weaving' stamp: 'rhi 2/7/2003 18:41'! buildWrappers | wrapper | self pointcut value do: [:join | wrapper _ self wrapperClass on: join targetSelector inClass: join targetClass. wrapper ifNil: [self error: 'Failed to create wrapper.']. self qualifier setActivatorsFor: wrapper. self setAdviceBlocks: wrapper. self wrappers add: wrapper].! ! !AsAdvice methodsFor: 'weaving' stamp: 'rhi 1/6/2002 14:16'! installWrappersWith: anAsAspect self wrappers do: [:wrapper | wrapper advice: self; aspect: anAsAspect; install].! ! !AsAdvice methodsFor: 'weaving' stamp: 'rhi 2/7/2003 18:36'! setAdviceBlocks: anAsMethodWrapper self subclassResponsibility.! ! !AsAdvice methodsFor: 'weaving' stamp: 'rhi 1/6/2002 14:16'! uninstallWrappers self wrappers do: [:wrapper | wrapper aspect: nil; advice: nil; uninstall].! ! !AsAdvice methodsFor: 'weaving' stamp: 'rhi 6/7/2001 22:19'! wrapperClass self subclassResponsibility.! ! !AsAdvice methodsFor: 'printing' stamp: 'rhi 8/6/2003 09:31'! printOn: aStream super printOn: aStream. aStream nextPutAll: ' ( poincut|value: '. self pointcut value printOn: aStream. aStream nextPutAll: ', installed: '. self installed printOn: aStream. aStream nextPutAll: ' )'.! ! !AsAdviceQualifier methodsFor: 'accessing' stamp: 'rhi 2/1/2002 09:09'! attributes "^ " ^ attributes! ! !AsAdviceQualifier methodsFor: 'accessing' stamp: 'rhi 2/1/2002 09:10'! attributes: aSet attributes _ aSet.! ! !AsAdviceQualifier methodsFor: 'comparing' stamp: 'rhi 11/28/2004 12:53'! = anObject self == anObject ifTrue: [^ true]. self isAsAdviceQualifier ifFalse: [^ false]. ^ self attributes = anObject attributes! ! !AsAdviceQualifier methodsFor: 'comparing' stamp: 'rhi 2/1/2002 09:13'! hash ^ self attributes hash! ! !AsAdviceQualifier methodsFor: 'derived accessing' stamp: 'rhi 2/4/2002 13:04'! constraints ^ self class constraints! ! !AsAdviceQualifier methodsFor: 'testing' stamp: 'rhi 5/28/2001 08:26'! isAsAdviceQualifier ^ true! ! !AsAdviceQualifier methodsFor: 'weaving' stamp: 'rhi 2/1/2002 09:24'! setActivatorsFor: anAsMethodWrapper self validate. self attributes do: [:attr | anAsMethodWrapper activators add: (AsMethodWrapper protoActivators at: attr) copy fixTemps].! ! !AsAdviceQualifier methodsFor: 'weaving' stamp: 'rhi 2/4/2002 14:08'! validate self constraints do: [:constraint | constraint value: self].! ! !AsAdviceQualifier methodsFor: 'printing' stamp: 'rhi 8/6/2003 09:31'! printOn: aStream super printOn: aStream. aStream nextPutAll: ' ( attributes: '. self attributes printOn: aStream. aStream nextPutAll: ' )'.! ! !AsAroundAdvice methodsFor: 'accessing' stamp: 'rhi 6/2/2001 16:29'! aroundBlock "^ " ^ aroundBlock! ! !AsAroundAdvice methodsFor: 'accessing' stamp: 'rhi 6/2/2001 16:23'! aroundBlock: aBlockContext aroundBlock _ aBlockContext.! ! !AsAroundAdvice methodsFor: 'weaving' stamp: 'rhi 10/12/2004 22:29'! setAdviceBlocks: anAsAroundWrapper self aroundBlock ifNotNil: [anAsAroundWrapper aroundBlock: self aroundBlock copy].! ! !AsAroundAdvice methodsFor: 'weaving' stamp: 'rhi 6/7/2001 22:20'! wrapperClass ^ AsAroundWrapper! ! !AsAspect methodsFor: 'accessing' stamp: 'rhi 5/7/2001 09:49'! advice "^ " ^ advice! ! !AsAspect methodsFor: 'accessing' stamp: 'rhi 5/7/2001 09:49'! advice: aCollection advice _ aCollection.! ! !AsAspect methodsFor: 'accessing' stamp: 'rhi 5/28/2001 09:03'! clientAnnotations "^ >" ^ clientAnnotations! ! !AsAspect methodsFor: 'accessing' stamp: 'rhi 5/28/2001 09:03'! clientAnnotations: anIdentityDictionary clientAnnotations _ anIdentityDictionary.! ! !AsAspect methodsFor: 'accessing' stamp: 'rhi 5/7/2001 09:19'! installed "^ " ^ installed! ! !AsAspect methodsFor: 'accessing' stamp: 'rhi 5/7/2001 09:19'! installed: aBoolean installed _ aBoolean.! ! !AsAspect methodsFor: 'accessing' stamp: 'rhi 11/15/2004 16:48'! processes "^ " ^ processes! ! !AsAspect methodsFor: 'accessing' stamp: 'rhi 11/15/2004 16:48'! processes: anIdentitySet processes _ anIdentitySet.! ! !AsAspect methodsFor: 'accessing' stamp: 'rhi 3/3/2002 12:22'! projects "^ " ^ projects! ! !AsAspect methodsFor: 'accessing' stamp: 'rhi 3/3/2002 12:22'! projects: anIdentitySet projects _ anIdentitySet.! ! !AsAspect methodsFor: 'accessing' stamp: 'rhi 5/6/2001 22:43'! receivers "^ " ^ receivers! ! !AsAspect methodsFor: 'accessing' stamp: 'rhi 5/6/2001 22:42'! receivers: anIdentitySet receivers _ anIdentitySet.! ! !AsAspect methodsFor: 'accessing' stamp: 'rhi 5/6/2001 22:43'! senderClasses "^ " ^ senderClasses! ! !AsAspect methodsFor: 'accessing' stamp: 'rhi 5/6/2001 22:43'! senderClasses: anIdentitySet senderClasses _ anIdentitySet.! ! !AsAspect methodsFor: 'accessing' stamp: 'rhi 5/6/2001 22:43'! senders "^ " ^ senders! ! !AsAspect methodsFor: 'accessing' stamp: 'rhi 5/6/2001 22:42'! senders: anIdentitySet senders _ anIdentitySet.! ! !AsAspect methodsFor: 'adding' stamp: 'rhi 11/15/2004 16:48'! addProcess: aProcess ^ self processes add: aProcess! ! !AsAspect methodsFor: 'adding' stamp: 'rhi 3/3/2002 12:24'! addProject: aProject ^ self projects add: aProject! ! !AsAspect methodsFor: 'adding' stamp: 'rhi 5/7/2001 10:02'! addReceiver: anObject ^ self receivers add: anObject! ! !AsAspect methodsFor: 'adding' stamp: 'rhi 5/7/2001 10:02'! addSender: anObject ^ self senders add: anObject! ! !AsAspect methodsFor: 'adding' stamp: 'rhi 5/7/2001 10:03'! addSenderClass: aClass ^ self senderClasses add: aClass! ! !AsAspect methodsFor: 'derived accessing' stamp: 'rhi 5/30/2001 15:40'! annotationsFor: aClientObject at: aSymbol self flag: #rhi. "Assert that aSymbol ~~ nil!!" ^ (self clientAnnotationsAt: aClientObject) at: aSymbol! ! !AsAspect methodsFor: 'derived accessing' stamp: 'rhi 5/13/2004 22:23'! annotationsFor: aClientObject at: aSymbol ifAbsentPut: anAnnotationObject self flag: #rhi. "Assert that aSymbol ~~ nil!!" ^ (self clientAnnotationsAt: aClientObject) at: aSymbol ifAbsentPut: anAnnotationObject! ! !AsAspect methodsFor: 'derived accessing' stamp: 'rhi 5/30/2001 15:40'! annotationsFor: aClientObject at: aSymbol put: anAnnotationObject self flag: #rhi. "Assert that aSymbol ~~ nil!!" ^ (self clientAnnotationsAt: aClientObject) at: aSymbol put: anAnnotationObject! ! !AsAspect methodsFor: 'derived accessing' stamp: 'rhi 5/30/2001 15:39'! clientAnnotationsAt: anObject ^ self clientAnnotations at: anObject ifAbsentPut: [IdentityDictionary new]! ! !AsAspect methodsFor: 'initialization' stamp: 'rhi 11/15/2004 17:25'! initialize self receivers: IdentitySet new; senders: IdentitySet new; senderClasses: IdentitySet new; projects: IdentitySet new; processes: IdentitySet new; clientAnnotations: IdentityDictionary new; advice: nil; installed: false.! ! !AsAspect methodsFor: 'installation' stamp: 'rhi 11/15/2004 12:31'! install self installed ifTrue: [self error: 'Aspect already installed.']. [ self collectAdvice; installAdvice; installed: true. ] on: Error do: [:ex | self uninstall. self error: ex messageText "ex description"].! ! !AsAspect methodsFor: 'installation' stamp: 'rhi 5/7/2001 09:59'! uninstall self uninstallAdvice; advice: nil; installed: false.! ! !AsAspect methodsFor: 'removing' stamp: 'rhi 11/15/2004 16:48'! removeProcess: aProcess ^ self processes remove: aProcess ifAbsent: []! ! !AsAspect methodsFor: 'removing' stamp: 'rhi 3/3/2002 12:24'! removeProject: aProject ^ self projects remove: aProject ifAbsent: []! ! !AsAspect methodsFor: 'removing' stamp: 'rhi 5/7/2001 10:02'! removeReceiver: anObject ^ self receivers remove: anObject ifAbsent: []! ! !AsAspect methodsFor: 'removing' stamp: 'rhi 5/7/2001 10:03'! removeSender: anObject ^ self senders remove: anObject ifAbsent: []! ! !AsAspect methodsFor: 'removing' stamp: 'rhi 5/7/2001 10:03'! removeSenderClass: aClass ^ self senderClasses remove: aClass ifAbsent: []! ! !AsAspect methodsFor: 'testing' stamp: 'rhi 11/15/2004 16:48'! hasProcess: aProcess ^ self processes includes: aProcess! ! !AsAspect methodsFor: 'testing' stamp: 'rhi 3/3/2002 12:25'! hasProject: aProject ^ self projects includes: aProject! ! !AsAspect methodsFor: 'testing' stamp: 'rhi 5/7/2001 10:04'! hasReceiver: anObject ^ self receivers includes: anObject! ! !AsAspect methodsFor: 'testing' stamp: 'rhi 5/7/2001 10:04'! hasSender: anObject ^ self senders includes: anObject! ! !AsAspect methodsFor: 'testing' stamp: 'rhi 5/7/2001 10:32'! hasSenderClass: aClass ^ self senderClasses anySatisfy: [:senderClass | aClass includesBehavior: senderClass]! ! !AsAspect methodsFor: 'weaving' stamp: 'rhi 7/17/2001 15:58'! collectAdvice self advice: (self class allSelectors select: [:sel | sel isAdviceSelector] thenCollect: [:adv | self perform: adv asSymbol]).! ! !AsAspect methodsFor: 'weaving' stamp: 'rhi 5/7/2001 21:22'! installAdvice self advice do: [:adv | adv installWith: self].! ! !AsAspect methodsFor: 'weaving' stamp: 'rhi 5/7/2001 09:56'! uninstallAdvice self advice do: [:adv | adv uninstall].! ! !AsAspect methodsFor: 'printing' stamp: 'rhi 8/6/2003 09:31'! printOn: aStream super printOn: aStream. aStream nextPutAll: ' ( advice: '. self advice printOn: aStream. aStream nextPutAll: ', installed: '. self installed printOn: aStream. aStream nextPutAll: ' )'.! ! !AsAbstractVisitorAlternative2Aspect methodsFor: 'advice' stamp: 'rhi 6/25/2002 23:56'! adviceVisitLeaf ^ AsIntroductionAdvice qualifier: self qualifier pointcut: self leafPointcut introBlock: [:receiver :arguments :aspect :client | self leafIntro: receiver]! ! !AsAbstractVisitorAlternative2Aspect methodsFor: 'advice' stamp: 'rhi 6/25/2002 23:57'! adviceVisitNode ^ AsIntroductionAdvice qualifier: self qualifier pointcut: self nodePointcut introBlock: [:receiver :arguments :aspect :client | self nodeIntro: receiver]! ! !AsAbstractVisitorAlternative2Aspect methodsFor: 'intros' stamp: 'rhi 6/25/2002 23:56'! leafIntro: anAsLeaf ^ anAsLeaf value printString! ! !AsAbstractVisitorAlternative2Aspect methodsFor: 'intros' stamp: 'rhi 10/12/2004 14:53'! nodeIntro: anAsNode self subclassResponsibility.! ! !AsAbstractVisitorAlternative2Aspect methodsFor: 'pointcut' stamp: 'rhi 10/12/2004 15:13'! leafPointcut ^ [{ AsJoinPointDescriptor targetClass: AsLeaf targetSelector: self printSelector. }]! ! !AsAbstractVisitorAlternative2Aspect methodsFor: 'pointcut' stamp: 'rhi 10/12/2004 15:13'! nodePointcut ^ [{ AsJoinPointDescriptor targetClass: AsNode targetSelector: self printSelector. }]! ! !AsAbstractVisitorAlternative2Aspect methodsFor: 'pointcut' stamp: 'rhi 6/26/2002 00:31'! printSelector self subclassResponsibility.! ! !AsAbstractVisitorAlternative2Aspect methodsFor: 'qualifier' stamp: 'rhi 6/25/2002 23:46'! qualifier ^ AsAdviceQualifier attributes: { #receiverClassSpecific. }! ! !AsAbstractVisitorAspect methodsFor: 'accessing' stamp: 'rhi 6/6/2001 15:25'! trace "^ " ^ trace! ! !AsAbstractVisitorAspect methodsFor: 'accessing' stamp: 'rhi 6/6/2001 15:25'! trace: aWriteStream trace _ aWriteStream.! ! !AsAbstractVisitorAspect methodsFor: 'advice' stamp: 'rhi 10/12/2004 15:13'! adviceVisitLeaf ^ AsIntroductionAdvice qualifier: (AsAdviceQualifier attributes: { #receiverClassSpecific. }) pointcut: [{ AsJoinPointDescriptor targetClass: AsLeaf targetSelector: #acceptVisitor:. }] introBlock: [:receiver :arguments :aspect :client | arguments first visitLeaf: receiver]! ! !AsAbstractVisitorAspect methodsFor: 'advice' stamp: 'rhi 10/12/2004 15:13'! adviceVisitNode ^ AsIntroductionAdvice qualifier: (AsAdviceQualifier attributes: { #receiverClassSpecific. }) pointcut: [{ AsJoinPointDescriptor targetClass: AsNode targetSelector: #acceptVisitor:. }] introBlock: [:receiver :arguments :aspect :client | arguments first visitNode: receiver]! ! !AsAbstractVisitorAspect methodsFor: 'initialization' stamp: 'rhi 6/6/2001 15:27'! initialize super initialize. self trace: (WriteStream on: String new).! ! !AsAbstractVisitorAspect methodsFor: 'visiting' stamp: 'rhi 6/6/2001 15:31'! visitLeaf: anAsLeaf self trace nextPutAll: anAsLeaf value printString.! ! !AsAbstractVisitorAspect methodsFor: 'visiting' stamp: 'rhi 6/6/2001 15:23'! visitNode: anAsNode self subclassResponsibility.! ! !AsB methodsFor: 'debugging' stamp: 'rhi 6/9/2001 16:55'! mThree! ! !AsB methodsFor: 'debugging' stamp: 'rhi 6/9/2001 16:55'! mTwo! ! !AsB methodsFor: 'debugging' stamp: 'rhi 1/7/2002 11:21'! recAndDefClass ^ 'rec:', self class name, '(def:AsB)--[super]-->', super recAndDefClass! ! !AsBeforeAfterAdvice methodsFor: 'accessing' stamp: 'rhi 6/2/2001 16:29'! afterBlock "^ " ^ afterBlock! ! !AsBeforeAfterAdvice methodsFor: 'accessing' stamp: 'rhi 4/17/2001 19:39'! afterBlock: aBlockContext afterBlock _ aBlockContext.! ! !AsBeforeAfterAdvice methodsFor: 'accessing' stamp: 'rhi 6/2/2001 16:30'! beforeBlock "^ " ^ beforeBlock! ! !AsBeforeAfterAdvice methodsFor: 'accessing' stamp: 'rhi 4/17/2001 19:39'! beforeBlock: aBlockContext beforeBlock _ aBlockContext.! ! !AsBeforeAfterAdvice methodsFor: 'weaving' stamp: 'rhi 10/12/2004 22:30'! setAdviceBlocks: anAsBeforeAfterWrapper self beforeBlock ifNotNil: [anAsBeforeAfterWrapper beforeBlock: self beforeBlock copy]. self afterBlock ifNotNil: [anAsBeforeAfterWrapper afterBlock: self afterBlock copy].! ! !AsBeforeAfterAdvice methodsFor: 'weaving' stamp: 'rhi 6/7/2001 22:20'! wrapperClass ^ AsBeforeAfterWrapper! ! !AsCFlowPoint methodsFor: 'accessing' stamp: 'rhi 5/17/2001 18:52'! object "^ " ^ object! ! !AsCFlowPoint methodsFor: 'accessing' stamp: 'rhi 5/17/2001 18:52'! object: anObject object _ anObject.! ! !AsCFlowPoint methodsFor: 'accessing' stamp: 'rhi 5/17/2001 18:53'! selector "^ " ^ selector! ! !AsCFlowPoint methodsFor: 'accessing' stamp: 'rhi 5/17/2001 18:53'! selector: aSymbol selector _ aSymbol.! ! !AsCFlowPoint methodsFor: 'comparing' stamp: 'rhi 11/28/2004 12:52'! = anObject self == anObject ifTrue: [^ true]. self isAsCFlowPoint ifFalse: [^ false]. ^ self object == anObject object and: [self selector == anObject selector]! ! !AsCFlowPoint methodsFor: 'comparing' stamp: 'rhi 5/25/2001 22:42'! hash ^ self object hash + self selector hash! ! !AsCFlowPoint methodsFor: 'testing' stamp: 'rhi 5/28/2001 08:27'! isAsCFlowPoint ^ true! ! !AsCounter methodsFor: 'accessing' stamp: 'rhi 4/17/2001 19:59'! n "^ " ^ n! ! !AsCounter methodsFor: 'accessing' stamp: 'rhi 6/9/2001 17:01'! n: anInteger n _ anInteger.! ! !AsCounter methodsFor: 'counting' stamp: 'rhi 6/9/2001 17:01'! dec self n: self n - 1.! ! !AsCounter methodsFor: 'counting' stamp: 'rhi 6/9/2001 17:01'! inc self n: self n + 1.! ! !AsCounter methodsFor: 'initialization' stamp: 'rhi 4/17/2001 19:59'! initialize self n: 0.! ! !AsCounterAutoReset2Aspect methodsFor: 'accessing' stamp: 'rhi 5/30/2001 15:33'! threshold "^ " ^ threshold! ! !AsCounterAutoReset2Aspect methodsFor: 'accessing' stamp: 'rhi 5/30/2001 15:34'! threshold: anInteger threshold _ anInteger.! ! !AsCounterAutoReset2Aspect methodsFor: 'adding' stamp: 'rhi 5/30/2001 15:47'! addReceiver: anObject super addReceiver: anObject. self annotationsFor: anObject at: #count put: 0. ^ anObject! ! !AsCounterAutoReset2Aspect methodsFor: 'advice' stamp: 'rhi 10/12/2004 15:13'! adviceAutoReset ^ AsBeforeAfterAdvice qualifier: (AsAdviceQualifier attributes: { #receiverInstanceSpecific. }) pointcut: [{ AsJoinPointDescriptor targetClass: AsCounter targetSelector: #inc. AsJoinPointDescriptor targetClass: AsCounter targetSelector: #dec. }] afterBlock: [:receiver :arguments :aspect :client :result | aspect annotationsFor: receiver at: #count put: (aspect annotationsFor: receiver at: #count) + 1. (self threshold = (aspect annotationsFor: receiver at: #count)) ifTrue: [ receiver n: 0. aspect annotationsFor: receiver at: #count put: 0]]! ! !AsCounterAutoReset2Aspect methodsFor: 'initialization' stamp: 'rhi 5/30/2001 15:34'! initialize super initialize. self threshold: 0.! ! !AsCounterAutoResetAspect methodsFor: 'accessing' stamp: 'rhi 4/17/2001 20:00'! count "^ " ^ count! ! !AsCounterAutoResetAspect methodsFor: 'accessing' stamp: 'rhi 4/17/2001 20:00'! count: anInteger count _ anInteger.! ! !AsCounterAutoResetAspect methodsFor: 'accessing' stamp: 'rhi 4/17/2001 20:00'! threshold "^ " ^ threshold! ! !AsCounterAutoResetAspect methodsFor: 'accessing' stamp: 'rhi 4/17/2001 20:00'! threshold: anInteger threshold _ anInteger.! ! !AsCounterAutoResetAspect methodsFor: 'advice' stamp: 'rhi 10/12/2004 15:14'! adviceAutoReset ^ AsBeforeAfterAdvice qualifier: (AsAdviceQualifier attributes: { #receiverInstanceSpecific. }) pointcut: [{ AsJoinPointDescriptor targetClass: AsCounter targetSelector: #inc. AsJoinPointDescriptor targetClass: AsCounter targetSelector: #dec. }] afterBlock: [:receiver :arguments :aspect :client :return | self count: self count + 1. (self threshold = self count) ifTrue: [ receiver n: 0. self count: 0]]! ! !AsCounterAutoResetAspect methodsFor: 'initialization' stamp: 'rhi 4/17/2001 20:00'! initialize super initialize. self threshold: 0; count: 0.! ! !AsCounterSetTraceAspect methodsFor: 'accessing' stamp: 'rhi 4/17/2001 22:06'! trace "^ " ^ trace! ! !AsCounterSetTraceAspect methodsFor: 'accessing' stamp: 'rhi 4/17/2001 22:06'! trace: aString trace _ aString.! ! !AsCounterSetTraceAspect methodsFor: 'advice' stamp: 'rhi 10/12/2004 15:14'! adviceAutoReset ^ AsBeforeAfterAdvice qualifier: (AsAdviceQualifier attributes: { #receiverInstanceSpecific. }) pointcut: [{ AsJoinPointDescriptor targetClass: AsCounter targetSelector: #n:. }] beforeBlock: [:receiver :arguments :aspect :client | | msg | msg _ String cr, receiver class name, '>>', 'n: before n = ', receiver n printString. self trace: self trace, msg. "Transcript show: msg"] afterBlock: [:receiver :arguments :aspect :client :return | | msg | msg _ String tab, 'after n = ', receiver n printString. self trace: self trace, msg. "Transcript show: msg"]! ! !AsCounterSetTraceAspect methodsFor: 'initialization' stamp: 'rhi 4/17/2001 22:07'! initialize super initialize. self trace: String new.! ! !AsCounterThresholdAspect methodsFor: 'accessing' stamp: 'rhi 4/17/2001 20:05'! lastPass "^ #(#NotYet #CountingUp #CountingDown)" ^ lastPass! ! !AsCounterThresholdAspect methodsFor: 'accessing' stamp: 'rhi 4/17/2001 20:01'! lastPass: aSymbol lastPass _ aSymbol.! ! !AsCounterThresholdAspect methodsFor: 'accessing' stamp: 'rhi 4/17/2001 20:01'! threshold "^ " ^ threshold! ! !AsCounterThresholdAspect methodsFor: 'accessing' stamp: 'rhi 4/17/2001 20:01'! threshold: anInteger threshold _ anInteger.! ! !AsCounterThresholdAspect methodsFor: 'advice' stamp: 'rhi 10/12/2004 14:59'! adviceThresholdPassedCountingDown ^ AsBeforeAfterAdvice qualifier: (AsAdviceQualifier attributes: { #receiverClassSpecific. }) pointcut: [{ AsJoinPointDescriptor targetClass: AsCounter targetSelector: #dec. }] afterBlock: [:receiver :arguments :aspect :client :return | (self threshold = receiver n) ifTrue: [self lastPass: #CountingDown]]! ! !AsCounterThresholdAspect methodsFor: 'advice' stamp: 'rhi 10/12/2004 14:59'! adviceThresholdPassedCountingUp ^ AsBeforeAfterAdvice qualifier: (AsAdviceQualifier attributes: { #receiverClassSpecific. }) pointcut: [{ AsJoinPointDescriptor targetClass: AsCounter targetSelector: #inc. }] afterBlock: [:receiver :arguments :aspect :client :return | (self threshold = receiver n) ifTrue: [self lastPass: #CountingUp]]! ! !AsCounterThresholdAspect methodsFor: 'initialization' stamp: 'rhi 4/17/2001 20:03'! initialize super initialize. self threshold: 0; lastPass: #NotYet.! ! !AsFactorial2 methodsFor: 'spunk' stamp: 'rhi 6/3/2001 21:43'! factorial: anInteger anInteger = 0 ifTrue: [^ 1]. anInteger > 0 ifTrue: [^ anInteger * (self factorial: anInteger - 1)]. self error: 'Not valid for negative integers.'.! ! !AsFactorial2TraceAspect methodsFor: 'accessing' stamp: 'rhi 5/18/2001 10:59'! trace "^ " ^ trace! ! !AsFactorial2TraceAspect methodsFor: 'accessing' stamp: 'rhi 5/18/2001 10:59'! trace: aString trace _ aString.! ! !AsFactorial2TraceAspect methodsFor: 'accessing' stamp: 'rhi 5/18/2001 10:59'! traceAllButFirst "^ " ^ traceAllButFirst! ! !AsFactorial2TraceAspect methodsFor: 'accessing' stamp: 'rhi 5/18/2001 10:59'! traceAllButFirst: aString traceAllButFirst _ aString.! ! !AsFactorial2TraceAspect methodsFor: 'accessing' stamp: 'rhi 5/18/2001 10:59'! traceFirst "^ " ^ traceFirst! ! !AsFactorial2TraceAspect methodsFor: 'accessing' stamp: 'rhi 5/18/2001 11:00'! traceFirst: aString traceFirst _ aString.! ! !AsFactorial2TraceAspect methodsFor: 'advice' stamp: 'rhi 10/12/2004 14:59'! adviceFactorialInOut ^ AsBeforeAfterAdvice qualifier: (AsAdviceQualifier attributes: { #receiverClassSpecific. }) pointcut: [{ AsJoinPointDescriptor targetClass: AsFactorial2 targetSelector: #factorial:. }] beforeBlock: [:receiver :arguments :aspect :client | | msg | msg _ String cr, 'factorial2-in: ', arguments first printString. self trace: self trace, msg. "Transcript show: msg"] afterBlock: [:receiver :arguments :aspect :client :return | | msg | msg _ String cr, 'factorial2-out(', arguments first printString, '): ', return printString. self trace: self trace, msg. "Transcript show: msg"]! ! !AsFactorial2TraceAspect methodsFor: 'advice' stamp: 'rhi 10/12/2004 15:00'! adviceFactorialInOutAllButFirst ^ AsBeforeAfterAdvice qualifier: (AsAdviceQualifier attributes: { #receiverClassSpecific. #cfAllButFirstInstance. }) pointcut: [{ AsJoinPointDescriptor targetClass: AsFactorial2 targetSelector: #factorial:. }] beforeBlock: [:receiver :arguments :aspect :client | | msg | msg _ String cr, '*factorial2-in: ', arguments first printString. self traceAllButFirst: self traceAllButFirst, msg. "Transcript show: msg"] afterBlock: [:receiver :arguments :aspect :client :return | | msg | msg _ String cr, '*factorial2-out(', arguments first printString, '): ', return printString. self traceAllButFirst: self traceAllButFirst, msg. "Transcript show: msg"]! ! !AsFactorial2TraceAspect methodsFor: 'advice' stamp: 'rhi 10/12/2004 15:00'! adviceFactorialInOutFirst ^ AsBeforeAfterAdvice qualifier: (AsAdviceQualifier attributes: { #receiverClassSpecific. #cfFirstInstance. }) pointcut: [{ AsJoinPointDescriptor targetClass: AsFactorial2 targetSelector: #factorial:. }] beforeBlock: [:receiver :arguments :aspect :client | | msg | msg _ String cr, '#factorial2-in: ', arguments first printString. self traceFirst: self traceFirst, msg. "Transcript show: msg"] afterBlock: [:receiver :arguments :aspect :client :return | | msg | msg _ String cr, '#factorial2-out(', arguments first printString, '): ', return printString. self traceFirst: self traceFirst, msg. "Transcript show: msg"]! ! !AsFactorial2TraceAspect methodsFor: 'initialization' stamp: 'rhi 5/18/2001 11:00'! initialize super initialize. self trace: String new; traceFirst: String new; traceAllButFirst: String new.! ! !AsFactorialTraceAspect methodsFor: 'accessing' stamp: 'rhi 5/16/2001 23:27'! trace "^ " ^ trace! ! !AsFactorialTraceAspect methodsFor: 'accessing' stamp: 'rhi 5/16/2001 23:27'! trace: aString trace _ aString.! ! !AsFactorialTraceAspect methodsFor: 'accessing' stamp: 'rhi 5/17/2001 23:32'! traceAllButFirst "^ " ^ traceAllButFirst! ! !AsFactorialTraceAspect methodsFor: 'accessing' stamp: 'rhi 5/17/2001 23:31'! traceAllButFirst: aString traceAllButFirst _ aString.! ! !AsFactorialTraceAspect methodsFor: 'accessing' stamp: 'rhi 5/17/2001 23:31'! traceFirst "^ " ^ traceFirst! ! !AsFactorialTraceAspect methodsFor: 'accessing' stamp: 'rhi 5/17/2001 23:31'! traceFirst: aString traceFirst _ aString.! ! !AsFactorialTraceAspect methodsFor: 'advice' stamp: 'rhi 10/12/2004 15:00'! adviceFactorialInOut ^ AsBeforeAfterAdvice qualifier: (AsAdviceQualifier attributes: { #receiverClassSpecific. }) pointcut: [{ AsJoinPointDescriptor targetClass: Integer targetSelector: #factorial. }] beforeBlock: [:receiver :arguments :aspect :client | | msg | msg _ String cr, 'factorial-in: ', receiver printString. self trace: self trace, msg. "Transcript show: msg"] afterBlock: [:receiver :arguments :aspect :client :return | | msg | msg _ String cr, 'factorial-out(', receiver printString, '): ', return printString. self trace: self trace, msg. "Transcript show: msg"]! ! !AsFactorialTraceAspect methodsFor: 'advice' stamp: 'rhi 10/12/2004 15:00'! adviceFactorialInOutAllButFirst ^ AsBeforeAfterAdvice qualifier: (AsAdviceQualifier attributes: { #receiverClassSpecific. #cfAllButFirstClass. }) pointcut: [{ AsJoinPointDescriptor targetClass: Integer targetSelector: #factorial. }] beforeBlock: [:receiver :arguments :aspect :client | | msg | msg _ String cr, '*factorial-in: ', receiver printString. self traceAllButFirst: self traceAllButFirst, msg. "Transcript show: msg"] afterBlock: [:receiver :arguments :aspect :client :return | | msg | msg _ String cr, '*factorial-out(', receiver printString, '): ', return printString. self traceAllButFirst: self traceAllButFirst, msg. "Transcript show: msg"]! ! !AsFactorialTraceAspect methodsFor: 'advice' stamp: 'rhi 10/12/2004 15:00'! adviceFactorialInOutFirst ^ AsBeforeAfterAdvice qualifier: (AsAdviceQualifier attributes: { #receiverClassSpecific. #cfFirstClass. }) pointcut: [{ AsJoinPointDescriptor targetClass: Integer targetSelector: #factorial. }] beforeBlock: [:receiver :arguments :aspect :client | | msg | msg _ String cr, '#factorial-in: ', receiver printString. self traceFirst: self traceFirst, msg. "Transcript show: msg"] afterBlock: [:receiver :arguments :aspect :client :return | | msg | msg _ String cr, '#factorial-out(', receiver printString, '): ', return printString. self traceFirst: self traceFirst, msg. "Transcript show: msg"]! ! !AsFactorialTraceAspect methodsFor: 'initialization' stamp: 'rhi 5/17/2001 23:33'! initialize super initialize. self trace: String new; traceFirst: String new; traceAllButFirst: String new.! ! !AsFormattedWorkspaceAspect methodsFor: 'advice ParagraphEditor accessing' stamp: 'rhi 10/12/2004 15:17'! adviceParagraphEditorParagraph ^ AsIntroductionAdvice qualifier: (AsAdviceQualifier attributes: { #receiverClassSpecific. }) pointcut: [{ AsJoinPointDescriptor targetClass: ParagraphEditor targetSelector: #paragraph. }] introBlock: [:receiver :arguments :aspect :client | receiver instVarNamed: 'paragraph']! ! !AsFormattedWorkspaceAspect methodsFor: 'advice ParagraphEditor menu messages' stamp: 'rhi 10/12/2004 15:17'! adviceParagraphEditorSaveFormattedContentsInFile ^ AsIntroductionAdvice qualifier: (AsAdviceQualifier attributes: { #receiverClassSpecific. }) pointcut: [{ AsJoinPointDescriptor targetClass: ParagraphEditor targetSelector: #saveFormattedContentsInFile. }] introBlock: [:receiver :arguments :aspect :client | | fileName textToSave parentWindow labelToUse fileStream | textToSave _ receiver paragraph text. textToSave size == 0 ifTrue: [receiver inform: 'nothing to save.'] ifFalse: [ parentWindow _ receiver model dependents detect: [:dep | dep isKindOf: SystemWindow] ifNone: [nil]. parentWindow ifNil: [labelToUse _ 'Untitled'] ifNotNil: [labelToUse _ parentWindow label]. fileName _ FillInTheBlank request: 'File name? (".text" will be added to end)' initialAnswer: labelToUse. fileName size == 0 ifTrue: [receiver beep] ifFalse: [ (fileName asLowercase endsWith: '.text') ifFalse: [fileName _ fileName,'.text']. fileStream _ FileStream newFileNamed: fileName. textToSave storeOn: fileStream. fileStream close]]]! ! !AsFormattedWorkspaceAspect methodsFor: 'advice ParagraphEditor(class) class initialization' stamp: 'rhi 10/12/2004 15:17'! adviceParagraphEditorShiftedYellowButtonMenu ^ AsAroundAdvice qualifier: (AsAdviceQualifier attributes: { #receiverClassSpecific. }) pointcut: [{ AsJoinPointDescriptor targetClass: ParagraphEditor class targetSelector: #shiftedYellowButtonMenu. }] aroundBlock: [:receiver :arguments :aspect :client :clientMethod | SelectionMenu fromArray: #( ('set font... (k)' offerFontMenu) ('set style... (K)' changeStyle) ('set alignment...' chooseAlignment) - ('explain' explain) ('pretty print' prettyPrint) ('pretty print with color' prettyPrintWithColor) ('file it in (G)' fileItIn) ('tiles from it' selectionAsTiles) ('recognizer (r)' recognizeCharacters) ('spawn (o)' spawn) - ('definition of word' wordDefinition) ('verify spelling of word' verifyWordSpelling) "('spell check it' spellCheckIt)" ('translate it' translateIt) ('choose language' languagePrefs) - ('browse it (b)' browseIt) ('senders of it (n)' sendersOfIt) ('implementors of it (m)' implementorsOfIt) ('references to it (N)' referencesToIt) - ('selectors containing it (W)' methodNamesContainingIt) ('method strings with it (E)' methodStringsContainingit) ('method source with it' methodSourceContainingIt) ('class comments with it' classCommentsContainingIt) ('change sets with it' browseChangeSetsWithSelector) - ('save contents to file...' saveContentsInFile) ('save formatted contents to file...' saveFormattedContentsInFile) ('send contents to printer' sendContentsToPrinter) ('printer setup' printerSetup) - ('special menu...' presentSpecialMenu) ('more...' yellowButtonActivity))]! ! !AsFormattedWorkspaceAspect methodsFor: 'advice PluggableTextMorph accessing' stamp: 'rhi 10/12/2004 15:17'! advicePluggableTextMorphTextMorph ^ AsIntroductionAdvice qualifier: (AsAdviceQualifier attributes: { #receiverClassSpecific. }) pointcut: [{ AsJoinPointDescriptor targetClass: PluggableTextMorph targetSelector: #textMorph. }] introBlock: [:receiver :arguments :aspect :client | receiver instVarNamed: 'textMorph']! ! !AsFormattedWorkspaceAspect methodsFor: 'advice PluggableTextMorph menu commands' stamp: 'rhi 10/12/2004 15:17'! advicePluggableTextMorphSaveFormattedContentsInFile ^ AsIntroductionAdvice qualifier: (AsAdviceQualifier attributes: { #receiverClassSpecific. }) pointcut: [{ AsJoinPointDescriptor targetClass: PluggableTextMorph targetSelector: #saveFormattedContentsInFile. }] introBlock: [:receiver :arguments :aspect :client | | fileName textToSave parentWindow labelToUse fileStream | receiver handleEdit: [receiver textMorph editor saveFormattedContentsInFile]]! ! !AsFormattedWorkspaceAspect methodsFor: 'advice Workspace as yet unclassified' stamp: 'rhi 10/12/2004 15:17'! adviceWorkspaceAddModelItemsToWindowMenu ^ AsAroundAdvice qualifier: (AsAdviceQualifier attributes: { #receiverClassSpecific. }) pointcut: [{ AsJoinPointDescriptor targetClass: Workspace targetSelector: #addModelItemsToWindowMenu:. }] aroundBlock: [:receiver :arguments :aspect :client :clientMethod | | aMenu | aMenu _ arguments first. aMenu addLine; add: 'save contents to file...' target: receiver action: #saveContentsInFile; add: 'save formatted contents to file...' target: receiver action: #saveFormattedContentsInFile; addUpdating: #acceptDroppedMorphsWording target: receiver action: #toggleDroppingMorphForReference]! ! !AsFormattedWorkspaceAspect methodsFor: 'advice Workspace as yet unclassified' stamp: 'rhi 10/12/2004 15:19'! adviceWorkspaceSaveFormattedContentsInFile ^ AsIntroductionAdvice qualifier: (AsAdviceQualifier attributes: { #receiverClassSpecific. }) pointcut: [{ AsJoinPointDescriptor targetClass: Workspace targetSelector: #saveFormattedContentsInFile. }] introBlock: [:receiver :arguments :aspect :client | | textMorph textView | textMorph _ receiver dependents detect: [:dep | dep isKindOf: PluggableTextMorph] ifNone: [nil]. textMorph ifNotNil: [textMorph saveFormattedContentsInFile] ifNil: [ textView _ receiver dependents detect: [:dep | dep isKindOf: PluggableTextView] ifNone: [nil]. textView ifNotNil: [textView controller saveFormattedContentsInFile]]]! ! !AsFormattedWorkspaceAspect methodsFor: 'advice Workspace(class) instance creation' stamp: 'rhi 10/12/2004 15:18'! adviceWorkspaceFromString ^ AsIntroductionAdvice qualifier: (AsAdviceQualifier attributes: { #receiverClassSpecific. }) pointcut: [{ AsJoinPointDescriptor targetClass: Workspace class targetSelector: #fromString:. }] introBlock: [:receiver :arguments :aspect :client | | aString | aString _ arguments first. receiver new contents: aString]! ! !AsFormattedWorkspaceAspect methodsFor: 'advice Workspace(class) instance creation' stamp: 'rhi 10/12/2004 15:17'! adviceWorkspaceFromTextString ^ AsIntroductionAdvice qualifier: (AsAdviceQualifier attributes: { #receiverClassSpecific. }) pointcut: [{ AsJoinPointDescriptor targetClass: Workspace class targetSelector: #fromTextString:. }] introBlock: [:receiver :arguments :aspect :client | | aString | aString _ arguments first. receiver new contents: (Compiler evaluate: aString)]! ! !AsFormattedWorkspaceAspect methodsFor: 'advice Workspace(class) instance creation' stamp: 'rhi 10/12/2004 15:18'! adviceWorkspaceOpenFromFile ^ AsIntroductionAdvice qualifier: (AsAdviceQualifier attributes: { #receiverClassSpecific. }) pointcut: [{ AsJoinPointDescriptor targetClass: Workspace class targetSelector: #openFromFile:. }] introBlock: [:receiver :arguments :aspect :client | | aFileStream | aFileStream _ arguments first. receiver openFromString: aFileStream contents labeled: (aFileStream localName copyUpToLast: $.)]! ! !AsFormattedWorkspaceAspect methodsFor: 'advice Workspace(class) instance creation' stamp: 'rhi 10/12/2004 15:18'! adviceWorkspaceOpenFromFormattedFile ^ AsIntroductionAdvice qualifier: (AsAdviceQualifier attributes: { #receiverClassSpecific. }) pointcut: [{ AsJoinPointDescriptor targetClass: Workspace class targetSelector: #openFromFormattedFile:. }] introBlock: [:receiver :arguments :aspect :client | | aFileStream | aFileStream _ arguments first. receiver openFromTextString: aFileStream contents labeled: (aFileStream localName copyUpToLast: $.)]! ! !AsFormattedWorkspaceAspect methodsFor: 'advice Workspace(class) instance creation' stamp: 'rhi 10/12/2004 15:18'! adviceWorkspaceOpenFromStringLabeled ^ AsIntroductionAdvice qualifier: (AsAdviceQualifier attributes: { #receiverClassSpecific. }) pointcut: [{ AsJoinPointDescriptor targetClass: Workspace class targetSelector: #openFromString:labeled:. }] introBlock: [:receiver :arguments :aspect :client | | aContentString aLabelString | aContentString _ arguments first. aLabelString _ arguments second. (receiver fromString: aContentString) openLabel: aLabelString]! ! !AsFormattedWorkspaceAspect methodsFor: 'advice Workspace(class) instance creation' stamp: 'rhi 10/12/2004 15:18'! adviceWorkspaceOpenFromTextStringLabeled ^ AsIntroductionAdvice qualifier: (AsAdviceQualifier attributes: { #receiverClassSpecific. }) pointcut: [{ AsJoinPointDescriptor targetClass: Workspace class targetSelector: #openFromTextString:labeled:. }] introBlock: [:receiver :arguments :aspect :client | | aContentString aLabelString | aContentString _ arguments first. aLabelString _ arguments second. (receiver fromTextString: aContentString) openLabel: aLabelString]! ! !AsFormattedWorkspaceAspect methodsFor: 'file list services' stamp: 'rhi 9/3/2004 22:14'! fileReaderServicesForFile: fullNameString suffix: suffixString ^ (suffixString = 'text') | (suffixString = '*') ifTrue: [self services] ifFalse: [#()]! ! !AsFormattedWorkspaceAspect methodsFor: 'file list services' stamp: 'rhi 9/3/2004 22:33'! openFormattedWorkspaceFromFile: fullNameString Workspace openFromFormattedFile: (FileStream readOnlyFileNamed: fullNameString).! ! !AsFormattedWorkspaceAspect methodsFor: 'file list services' stamp: 'rhi 9/3/2004 22:33'! openWorkspaceFromFile: fullNameString Workspace openFromFile: (FileStream readOnlyFileNamed: fullNameString).! ! !AsFormattedWorkspaceAspect methodsFor: 'file list services' stamp: 'rhi 9/3/2004 22:34'! serviceOpenFormattedWorkspace ^ SimpleServiceEntry provider: self label: 'open formatted workspace' selector: #openFormattedWorkspaceFromFile: description: 'open formatted workspace' buttonLabel: 'open formatted workspace'! ! !AsFormattedWorkspaceAspect methodsFor: 'file list services' stamp: 'rhi 9/3/2004 22:34'! serviceOpenWorkspace ^ SimpleServiceEntry provider: self label: 'open workspace' selector: #openWorkspaceFromFile: description: 'open plain workspace' buttonLabel: 'open workspace'! ! !AsFormattedWorkspaceAspect methodsFor: 'file list services' stamp: 'rhi 9/3/2004 22:18'! services ^ { self serviceOpenWorkspace. self serviceOpenFormattedWorkspace. }! ! !AsFormattedWorkspaceAspect methodsFor: 'installation' stamp: 'rhi 9/3/2004 22:25'! install super install. FileList registerFileReader: self.! ! !AsFormattedWorkspaceAspect methodsFor: 'installation' stamp: 'rhi 9/3/2004 22:40'! uninstall FileList unregisterFileReader: self. super uninstall.! ! !AsHandlerAdvice methodsFor: 'accessing' stamp: 'rhi 5/6/2001 23:28'! exception "^ " ^ exception! ! !AsHandlerAdvice methodsFor: 'accessing' stamp: 'rhi 5/6/2001 23:28'! exception: anExceptionClass exception _ anExceptionClass.! ! !AsHandlerAdvice methodsFor: 'accessing' stamp: 'rhi 5/6/2001 23:28'! handlerBlock "^ " ^ handlerBlock! ! !AsHandlerAdvice methodsFor: 'accessing' stamp: 'rhi 5/6/2001 23:29'! handlerBlock: aBlockContext handlerBlock _ aBlockContext.! ! !AsHandlerAdvice methodsFor: 'weaving' stamp: 'rhi 10/12/2004 22:30'! setAdviceBlocks: anAsHandlerWrapper self exception ifNotNil: [anAsHandlerWrapper exception: self exception]. self handlerBlock ifNotNil: [anAsHandlerWrapper handlerBlock: self handlerBlock copy].! ! !AsHandlerAdvice methodsFor: 'weaving' stamp: 'rhi 6/7/2001 22:21'! wrapperClass ^ AsHandlerWrapper! ! !AsInfixVisitorAlternative2Aspect methodsFor: 'intros' stamp: 'rhi 6/25/2002 23:57'! nodeIntro: anAsNode ^ '(', anAsNode first printInfix, ' ', anAsNode op asString, ' ', anAsNode second printInfix, ')'! ! !AsInfixVisitorAlternative2Aspect methodsFor: 'pointcut' stamp: 'rhi 6/26/2002 00:32'! printSelector ^ #printInfix! ! !AsInfixVisitorAlternativeAspect methodsFor: 'advice' stamp: 'rhi 10/12/2004 15:19'! adviceVisitLeaf ^ AsIntroductionAdvice qualifier: (AsAdviceQualifier attributes: { #receiverClassSpecific. }) pointcut: [{ AsJoinPointDescriptor targetClass: AsLeaf targetSelector: #printInfix. }] introBlock: [:receiver :arguments :aspect :client | receiver value printString]! ! !AsInfixVisitorAlternativeAspect methodsFor: 'advice' stamp: 'rhi 10/12/2004 15:19'! adviceVisitNode ^ AsIntroductionAdvice qualifier: (AsAdviceQualifier attributes: { #receiverClassSpecific. }) pointcut: [{ AsJoinPointDescriptor targetClass: AsNode targetSelector: #printInfix. }] introBlock: [:receiver :arguments :aspect :client | '(', receiver first printInfix, ' ', receiver op asString, ' ', receiver second printInfix, ')']! ! !AsInfixVisitorAspect methodsFor: 'visiting' stamp: 'rhi 6/6/2001 21:20'! visitNode: anAsNode self trace nextPutAll: '('. anAsNode first acceptVisitor: self. self trace nextPutAll: ' ', anAsNode op asString, ' '. anAsNode second acceptVisitor: self. self trace nextPutAll: ')'.! ! !AsIntroductionAdvice methodsFor: 'accessing' stamp: 'rhi 6/5/2001 00:54'! introBlock "^ " ^ introBlock! ! !AsIntroductionAdvice methodsFor: 'accessing' stamp: 'rhi 6/5/2001 00:54'! introBlock: aBlockContext introBlock _ aBlockContext.! ! !AsIntroductionAdvice methodsFor: 'weaving' stamp: 'rhi 10/12/2004 22:30'! setAdviceBlocks: anAsIntroductionWrapper self introBlock ifNotNil: [anAsIntroductionWrapper introBlock: self introBlock copy].! ! !AsIntroductionAdvice methodsFor: 'weaving' stamp: 'rhi 6/7/2001 22:21'! wrapperClass ^ AsIntroductionWrapper! ! !AsJoinPointDescriptor methodsFor: 'accessing' stamp: 'rhi 4/17/2001 19:41'! targetClass "^ " ^ targetClass! ! !AsJoinPointDescriptor methodsFor: 'accessing' stamp: 'rhi 4/17/2001 19:41'! targetClass: aClass targetClass _ aClass.! ! !AsJoinPointDescriptor methodsFor: 'accessing' stamp: 'rhi 4/17/2001 19:41'! targetSelector "^ " ^ targetSelector! ! !AsJoinPointDescriptor methodsFor: 'accessing' stamp: 'rhi 4/17/2001 19:41'! targetSelector: aSymbol targetSelector _ aSymbol.! ! !AsJoinPointDescriptor methodsFor: 'comparing' stamp: 'rhi 10/25/2004 01:23'! = anObject self == anObject ifTrue: [^ true]. anObject isAsJoinPointDescriptor ifFalse: [^ false]. ^ self targetClass == anObject targetClass and: [self targetSelector == anObject targetSelector]! ! !AsJoinPointDescriptor methodsFor: 'comparing' stamp: 'rhi 11/28/2004 12:50'! hash ^ self targetClass hash + self targetSelector hash! ! !AsJoinPointDescriptor methodsFor: 'printing' stamp: 'rhi 8/6/2003 09:32'! printOn: aStream super printOn: aStream. aStream nextPutAll: ' ( targetClass: '. self targetClass printOn: aStream. aStream nextPutAll: ', targetSelector: '. self targetSelector printOn: aStream. aStream nextPutAll: ' )'.! ! !AsJoinPointDescriptor methodsFor: 'testing' stamp: 'rhi 11/28/2004 13:45'! isAsJoinPointDescriptor ^ true! ! !AsLeaf methodsFor: 'accessing' stamp: 'rhi 6/6/2001 13:47'! value "^ " ^ value! ! !AsLeaf methodsFor: 'accessing' stamp: 'rhi 6/6/2001 13:47'! value: anInteger value _ anInteger.! ! !AsMethodWrapperInstVars methodsFor: 'accessing' stamp: 'rhi 6/7/2001 22:05'! activators "^ " ^ activators! ! !AsMethodWrapperInstVars methodsFor: 'accessing' stamp: 'rhi 6/7/2001 22:05'! activators: aSet activators _ aSet.! ! !AsMethodWrapperInstVars methodsFor: 'accessing' stamp: 'rhi 1/6/2002 14:10'! advice "^ " ^ advice! ! !AsMethodWrapperInstVars methodsFor: 'accessing' stamp: 'rhi 1/6/2002 14:10'! advice: anAsAdvice advice _ anAsAdvice.! ! !AsMethodWrapperInstVars methodsFor: 'accessing' stamp: 'rhi 4/29/2001 10:46'! aspect "^ " ^ aspect! ! !AsMethodWrapperInstVars methodsFor: 'accessing' stamp: 'rhi 4/29/2001 10:47'! aspect: anAsAspect aspect _ anAsAspect.! ! !AsMethodWrapperInstVars methodsFor: 'accessing' stamp: 'rhi 4/29/2001 09:28'! clientMethod "^ " ^ clientMethod! ! !AsMethodWrapperInstVars methodsFor: 'accessing' stamp: 'rhi 4/29/2001 09:28'! clientMethod: aCompiledMethod clientMethod _ aCompiledMethod.! ! !AsMethodWrapperInstVars methodsFor: 'accessing' stamp: 'rhi 4/29/2001 09:28'! clientSelector "^ " ^ clientSelector! ! !AsMethodWrapperInstVars methodsFor: 'accessing' stamp: 'rhi 4/29/2001 09:28'! clientSelector: aSymbol clientSelector _ aSymbol.! ! !AsMethodWrapperInstVars methodsFor: 'accessing' stamp: 'rhi 4/29/2001 09:28'! definingClass "^ " ^ definingClass! ! !AsMethodWrapperInstVars methodsFor: 'accessing' stamp: 'rhi 4/29/2001 09:28'! definingClass: aClass definingClass _ aClass.! ! !AsMethodWrapperInstVars methodsFor: 'accessing' stamp: 'rhi 4/29/2001 09:28'! wrappedClass "^ " ^ wrappedClass! ! !AsMethodWrapperInstVars methodsFor: 'accessing' stamp: 'rhi 4/29/2001 09:28'! wrappedClass: aClass wrappedClass _ aClass.! ! !AsMethodWrapperInstVars methodsFor: 'accessing' stamp: 'rhi 4/29/2001 10:47'! wrappingWrapper "^ " ^ wrappingWrapper! ! !AsMethodWrapperInstVars methodsFor: 'accessing' stamp: 'rhi 4/29/2001 10:47'! wrappingWrapper: anAsMethodWrapper wrappingWrapper _ anAsMethodWrapper.! ! !AsMethodWrapperInstVars methodsFor: 'printing' stamp: 'rhi 8/6/2003 09:29'! printOn: aStream super printOn: aStream. aStream nextPutAll: ' ( clientSelector: '. self clientSelector printOn: aStream. aStream nextPutAll: ', clientMethod: '. self clientMethod printOn: aStream. aStream nextPutAll: ', definingClass: '. self definingClass printOn: aStream. aStream nextPutAll: ', wrappedClass: '. self wrappedClass printOn: aStream. aStream nextPutAll: ' )'.! ! !AsAroundWrapperInstVars methodsFor: 'accessing' stamp: 'rhi 6/2/2001 09:15'! aroundBlock "^ " ^ aroundBlock! ! !AsAroundWrapperInstVars methodsFor: 'accessing' stamp: 'rhi 6/2/2001 09:15'! aroundBlock: aBlockContext aroundBlock _ aBlockContext.! ! !AsBeforeAfterWrapperInstVars methodsFor: 'accessing' stamp: 'rhi 4/29/2001 09:29'! afterBlock "^ " ^ afterBlock! ! !AsBeforeAfterWrapperInstVars methodsFor: 'accessing' stamp: 'rhi 5/9/2001 23:57'! afterBlock: aBlockContext afterBlock _ aBlockContext.! ! !AsBeforeAfterWrapperInstVars methodsFor: 'accessing' stamp: 'rhi 4/29/2001 09:29'! beforeBlock "^ " ^ beforeBlock! ! !AsBeforeAfterWrapperInstVars methodsFor: 'accessing' stamp: 'rhi 5/9/2001 23:57'! beforeBlock: aBlockContext beforeBlock _ aBlockContext.! ! !AsHandlerWrapperInstVars methodsFor: 'accessing' stamp: 'rhi 4/29/2001 09:31'! exception "^ " ^ exception! ! !AsHandlerWrapperInstVars methodsFor: 'accessing' stamp: 'rhi 4/29/2001 09:31'! exception: anExceptionClass exception _ anExceptionClass.! ! !AsHandlerWrapperInstVars methodsFor: 'accessing' stamp: 'rhi 4/29/2001 09:31'! handlerBlock "^ " ^ handlerBlock! ! !AsHandlerWrapperInstVars methodsFor: 'accessing' stamp: 'rhi 5/9/2001 23:58'! handlerBlock: aBlockContext handlerBlock _ aBlockContext.! ! !AsIntroductionWrapperInstVars methodsFor: 'accessing' stamp: 'rhi 6/3/2001 18:01'! introBlock "^ " ^ introBlock! ! !AsIntroductionWrapperInstVars methodsFor: 'accessing' stamp: 'rhi 6/3/2001 18:01'! introBlock: aBlockContext introBlock _ aBlockContext.! ! !AsMorphicMousingAspect methodsFor: 'advice' stamp: 'rhi 2/26/2002 17:02'! adviceMouseEnter ^ AsBeforeAfterAdvice qualifier: (AsAdviceQualifier attributes: { #receiverClassSpecific. }) pointcut: [ Morph withAllSubclasses select: [:each | each includesSelector: #mouseEnter:] thenCollect: [:each | AsJoinPointDescriptor targetClass: each targetSelector: #mouseEnter:]] beforeBlock: [:receiver :arguments :aspect :client | self showHeader: '>>> MouseENTER >>>' receiver: receiver event: arguments first]! ! !AsMorphicMousingAspect methodsFor: 'advice' stamp: 'rhi 2/26/2002 17:02'! adviceMouseLeave ^ AsBeforeAfterAdvice qualifier: (AsAdviceQualifier attributes: { #receiverClassSpecific. }) pointcut: [ Morph withAllSubclasses select: [:each | each includesSelector: #mouseLeave:] thenCollect: [:each | AsJoinPointDescriptor targetClass: each targetSelector: #mouseLeave:]] beforeBlock: [:receiver :arguments :aspect :client | self showHeader: '<<< MouseLEAVE <<<' receiver: receiver event: arguments first]! ! !AsMorphicMousingAspect methodsFor: 'private' stamp: 'rhi 4/22/2001 13:39'! showHeader: aString receiver: aMorph event: aMorphicEvent Transcript cr; show: aString; cr; tab; show: aMorph printString; cr; tab; show: aMorphicEvent printString.! ! !AsMorphicMousingProjectAspect methodsFor: 'advice' stamp: 'rhi 3/3/2002 12:47'! adviceMouseEnter ^ AsBeforeAfterAdvice qualifier: (AsAdviceQualifier attributes: { #receiverClassSpecific. #projectSpecific. }) pointcut: [ Morph withAllSubclasses select: [:each | each includesSelector: #mouseEnter:] thenCollect: [:each | AsJoinPointDescriptor targetClass: each targetSelector: #mouseEnter:]] beforeBlock: [:receiver :arguments :aspect :client | self showHeader: '>>> MouseENTER >>>' receiver: receiver event: arguments first]! ! !AsMorphicMousingProjectAspect methodsFor: 'advice' stamp: 'rhi 3/3/2002 12:47'! adviceMouseLeave ^ AsBeforeAfterAdvice qualifier: (AsAdviceQualifier attributes: { #receiverClassSpecific. #projectSpecific. }) pointcut: [ Morph withAllSubclasses select: [:each | each includesSelector: #mouseLeave:] thenCollect: [:each | AsJoinPointDescriptor targetClass: each targetSelector: #mouseLeave:]] beforeBlock: [:receiver :arguments :aspect :client | self showHeader: '<<< MouseLEAVE <<<' receiver: receiver event: arguments first]! ! !AsMorphicMousingProjectAspect methodsFor: 'private' stamp: 'rhi 3/3/2002 12:47'! showHeader: aString receiver: aMorph event: aMorphicEvent Transcript cr; show: aString; cr; tab; show: aMorph printString; cr; tab; show: aMorphicEvent printString.! ! !AsNode methodsFor: 'accessing' stamp: 'rhi 6/6/2001 13:49'! first "^ " ^ first! ! !AsNode methodsFor: 'accessing' stamp: 'rhi 6/6/2001 13:49'! first: anAsNodeOrAsLeaf first _ anAsNodeOrAsLeaf.! ! !AsNode methodsFor: 'accessing' stamp: 'rhi 6/6/2001 13:50'! op "^ " ^ op! ! !AsNode methodsFor: 'accessing' stamp: 'rhi 6/6/2001 13:50'! op: aSymbol op _ aSymbol.! ! !AsNode methodsFor: 'accessing' stamp: 'rhi 6/6/2001 13:50'! second "^ " ^ second! ! !AsNode methodsFor: 'accessing' stamp: 'rhi 6/6/2001 13:50'! second: anAsNodeOrAsLeaf second _ anAsNodeOrAsLeaf.! ! !AsPluggableListMorph methodsFor: 'accessing' stamp: 'rhi 7/13/2001 19:40'! itemConversionBlock "^ " ^ itemConversionBlock! ! !AsPluggableListMorph methodsFor: 'accessing' stamp: 'rhi 5/22/2004 23:29'! itemConversionBlock: aBlockContext itemConversionBlock _ aBlockContext.! ! !AsPluggableListMorph methodsFor: 'model access' stamp: 'rhi 5/22/2004 22:48'! getList getListSelector == nil ifTrue: [^ #()]. list _ model perform: getListSelector. (list isNil or: [list isEmpty]) ifTrue: [^ #()]. list _ list select: [:each | each isBehavior not] thenCollect: [:item | (item isMemberOf: MethodReference) ifTrue: [item] ifFalse: [item asStringOrText]]. ^ list! ! !AsPluggableListMorph methodsFor: 'model access' stamp: 'rhi 5/22/2004 19:16'! getListItem: index getListElementSelector ifNotNil: [^ (model perform: getListElementSelector with: index) asStringOrText]. (list notNil and: [list notEmpty]) ifTrue: [^ list at: index]. ^ self getList at: index! ! !AsPluggableListMorph methodsFor: 'updating' stamp: 'rhi 5/22/2004 18:50'! verifyContents | oldList newList newListTail existingSelection anIndex listOfStrings | oldList _ list ifNil: [#()]. newList _ self getList. newListTail _ (newList notEmpty and: [newList first isBehavior]) ifTrue: [newList halt copyWithoutFirst] ifFalse: [newList]. ((list == newListTail) or: [list = newListTail]) ifTrue: [^ self]. self flash. existingSelection _ self selectionIndex > 0 ifTrue: [oldList at: self selectionIndex]. self updateList. listOfStrings _ newListTail collect: [:el | el asStringOrText]. (existingSelection notNil and: [(anIndex _ listOfStrings indexOf: existingSelection asStringOrText ifAbsent: [nil]) notNil]) ifTrue: [ model noteSelectionIndex: anIndex for: getListSelector. self selectionIndex: anIndex] ifFalse: [self changeModelSelection: 0].! ! !AsPluggableListMorph methodsFor: 'private' stamp: 'rhi 5/21/2004 00:04'! listMorphClass ^ AsLazyListMorph! ! !AsPluggableListView methodsFor: 'accessing' stamp: 'rhi 8/12/2001 18:54'! itemConversionBlock "^ " ^ itemConversionBlock! ! !AsPluggableListView methodsFor: 'accessing' stamp: 'rhi 8/12/2001 18:54'! itemConversionBlock: aBlockContext itemConversionBlock _ aBlockContext.! ! !AsPluggableListView methodsFor: 'initialization' stamp: 'rhi 5/22/2004 12:27'! list: arrayOfStrings | tmpList class | tmpList _ arrayOfStrings ifNil: [Array new]. (tmpList notEmpty and: [tmpList first isBehavior]) ifTrue: [class _ tmpList first. tmpList _ tmpList copyWithoutFirst]. (items == tmpList or: [items = tmpList]) ifTrue: [^ self]. items _ tmpList. isEmpty _ items isEmpty. list _ ListParagraph withArray: (Array streamContents: [:s | s nextPut: topDelimiter. items do: [:item | item ifNotNil: [s nextPut: (self itemConversionBlock value: item value: class value: nil)]]. "items do: [:item | item ifNotNil: [(item isMemberOf: MethodReference) ifTrue: [s nextPut: (self itemConversionBlock value: item asStringOrText value: class value: nil)] ifFalse: [s nextPut: (self itemConversionBlock value: item value: class value: nil)]]]." s nextPut: bottomDelimiter]) style: self assuredTextStyle. selection _ self getCurrentSelectionIndex. self positionList.! ! !AsPluggableListView methodsFor: 'updating' stamp: 'rhi 5/21/2004 19:39'! verifyContents | newItems newItemsTail existingSelection anIndex | newItems _ self getList. newItemsTail _ (newItems notEmpty and: [newItems first isBehavior]) ifTrue: [newItems copyWithoutFirst] ifFalse: [newItems]. ((items == newItemsTail) or: [items = newItemsTail]) ifTrue: [^ self]. self flash. existingSelection _ list stringAtLineNumber: selection + (topDelimiter ifNil: [0] ifNotNil: [1]). self list: newItems. (newItemsTail size > 0 and: [newItemsTail first isKindOf: Symbol]) ifTrue: [existingSelection _ existingSelection asSymbol]. (anIndex _ newItemsTail indexOf: existingSelection ifAbsent: [nil]) ifNotNil: [model noteSelectionIndex: anIndex for: getListSelector] ifNil: [self changeModelSelection: 0]. selection _ 0. self displayView; update: getSelectionSelector.! ! !AsPluggableMessageCategoryListMorph methodsFor: 'initialization' stamp: 'rhi 5/21/2004 09:40'! on: anObject list: getListSel selected: getSelectionSel changeSelected: setSelectionSel menu: getMenuSel keystroke: keyActionSel getRawListSelector: getRawSel self model: anObject. getListSelector _ getListSel. getIndexSelector _ getSelectionSel. setIndexSelector _ setSelectionSel. getMenuSelector _ getMenuSel. keystrokeActionSelector _ keyActionSel. autoDeselect _ true. self borderWidth: 1. getRawListSelector _ getRawSel. self updateList. self selectionIndex: self getCurrentSelectionIndex. self initForKeystrokes.! ! !AsPluggableMessageCategoryListMorph methodsFor: 'model access' stamp: 'rhi 5/22/2004 19:08'! getList getRawListSelector ifNil: [priorRawList _ nil. ^ #()]. model classListIndex = 0 ifTrue: [^ priorRawList _ list _ Array new]. priorRawList _ model perform: getRawListSelector. ^ (Array with: ClassOrganizer allCategory), priorRawList! ! !AsPluggableMessageCategoryListMorph methodsFor: 'updating' stamp: 'rhi 5/21/2004 19:47'! verifyContents | newList existingSelection anIndex newRawList | (model editSelection == #editComment) ifTrue: [^ self]. model classListIndex = 0 ifTrue: [^ self]. newRawList _ model perform: getRawListSelector. (newRawList == priorRawList or: [newRawList = priorRawList]) ifTrue: [^ self]. priorRawList _ newRawList. newList _ (Array with: ClassOrganizer allCategory), priorRawList. list = newList ifTrue: [^ self]. self flash. existingSelection _ self selection. self updateList. (anIndex _ newList indexOf: existingSelection ifAbsent: [nil]) ifNotNil: [ model noteSelectionIndex: anIndex for: getListSelector. self selectionIndex: anIndex] ifNil: [self changeModelSelection: 0].! ! !AsPluggableMessageCategoryListView methodsFor: 'initialization' stamp: 'rhi 8/13/2001 10:57'! on: anObject list: getListSel selected: getSelectionSel changeSelected: setSelectionSel menu: getMenuSel keystroke: keyActionSel getRawListSelector: getRawSel self model: anObject. getListSelector _ getListSel. getSelectionSelector _ getSelectionSel. setSelectionSelector _ setSelectionSel. getMenuSelector _ getMenuSel. keystrokeActionSelector _ keyActionSel. getRawListSelector _ getRawSel. autoDeselect _ true. self borderWidth: 1. self list: self getList.! ! !AsPluggableMessageCategoryListView methodsFor: 'model access' stamp: 'rhi 9/18/2002 12:09'! getList getRawListSelector ifNil: [priorRawList _ nil. ^ #()]. model classListIndex = 0 ifTrue: [^ priorRawList _ Array new]. priorRawList _ model perform: getRawListSelector. ^ (Array with: model selectedClassOrMetaClass with: ClassOrganizer allCategory), priorRawList! ! !AsPluggableMessageCategoryListView methodsFor: 'updating' stamp: 'rhi 5/21/2004 19:57'! verifyContents | newList existingSelection anIndex newRawList | (model editSelection == #editComment) ifTrue: [^ self]. model classListIndex = 0 ifTrue: [^ self]. newRawList _ model perform: getRawListSelector. (newRawList == priorRawList or: [newRawList = priorRawList]) ifTrue: [^ self]. priorRawList _ newRawList. newList _ (Array with: ClassOrganizer allCategory), priorRawList. list = newList ifTrue: [^ self]. self flash. existingSelection _ selection. self list: newList. (anIndex _ newList indexOf: existingSelection ifAbsent: [nil]) ifNotNil: [model noteSelectionIndex: anIndex for: getListSelector] ifNil: [self changeModelSelection: 0]. selection _ 0. self displayView; update: getSelectionSelector.! ! !AsPostfixVisitorAlternative2Aspect methodsFor: 'intros' stamp: 'rhi 6/26/2002 00:27'! nodeIntro: anAsNode ^ '(', anAsNode first printPostfix, ' ', anAsNode second printPostfix, ' ', anAsNode op asString, ')'! ! !AsPostfixVisitorAlternative2Aspect methodsFor: 'pointcut' stamp: 'rhi 6/26/2002 00:33'! printSelector ^ #printPostfix! ! !AsPostfixVisitorAlternativeAspect methodsFor: 'advice' stamp: 'rhi 10/12/2004 15:19'! adviceVisitLeaf ^ AsIntroductionAdvice qualifier: (AsAdviceQualifier attributes: { #receiverClassSpecific. }) pointcut: [{ AsJoinPointDescriptor targetClass: AsLeaf targetSelector: #printPostfix. }] introBlock: [:receiver :arguments :aspect :client | receiver value printString]! ! !AsPostfixVisitorAlternativeAspect methodsFor: 'advice' stamp: 'rhi 10/12/2004 15:20'! adviceVisitNode ^ AsIntroductionAdvice qualifier: (AsAdviceQualifier attributes: { #receiverClassSpecific. }) pointcut: [{ AsJoinPointDescriptor targetClass: AsNode targetSelector: #printPostfix. }] introBlock: [:receiver :arguments :aspect :client | '(', receiver first printPostfix, ' ', receiver second printPostfix, ' ', receiver op asString, ')']! ! !AsPostfixVisitorAspect methodsFor: 'visiting' stamp: 'rhi 6/6/2001 21:20'! visitNode: anAsNode self trace nextPutAll: '('. anAsNode first acceptVisitor: self. self trace nextPutAll: ' '. anAsNode second acceptVisitor: self. self trace nextPutAll: ' ', anAsNode op asString. self trace nextPutAll: ')'.! ! !AsPrefixVisitorAlternative2Aspect methodsFor: 'intros' stamp: 'rhi 6/26/2002 00:28'! nodeIntro: anAsNode ^ '(', anAsNode op asString, ' ', anAsNode first printPrefix, ' ', anAsNode second printPrefix, ')'! ! !AsPrefixVisitorAlternative2Aspect methodsFor: 'pointcut' stamp: 'rhi 6/26/2002 00:33'! printSelector ^ #printPrefix! ! !AsPrefixVisitorAlternativeAspect methodsFor: 'advice' stamp: 'rhi 10/12/2004 15:20'! adviceVisitLeaf ^ AsIntroductionAdvice qualifier: (AsAdviceQualifier attributes: { #receiverClassSpecific. }) pointcut: [{ AsJoinPointDescriptor targetClass: AsLeaf targetSelector: #printPrefix. }] introBlock: [:receiver :arguments :aspect :client | receiver value printString]! ! !AsPrefixVisitorAlternativeAspect methodsFor: 'advice' stamp: 'rhi 10/12/2004 15:20'! adviceVisitNode ^ AsIntroductionAdvice qualifier: (AsAdviceQualifier attributes: { #receiverClassSpecific. }) pointcut: [{ AsJoinPointDescriptor targetClass: AsNode targetSelector: #printPrefix. }] introBlock: [:receiver :arguments :aspect :client | '(', receiver op asString, ' ', receiver first printPrefix, ' ', receiver second printPrefix, ')']! ! !AsPrefixVisitorAspect methodsFor: 'visiting' stamp: 'rhi 6/6/2001 21:20'! visitNode: anAsNode self trace nextPutAll: '('. self trace nextPutAll: anAsNode op asString, ' '. anAsNode first acceptVisitor: self. self trace nextPutAll: ' '. anAsNode second acceptVisitor: self. self trace nextPutAll: ')'.! ! !AsProcessExample methodsFor: 'accessing' stamp: 'rhi 11/15/2004 16:46'! wordArray "^ " ^ wordArray! ! !AsProcessExample methodsFor: 'accessing' stamp: 'rhi 11/15/2004 16:46'! wordArray: anArray wordArray _ anArray.! ! !AsProcessExample methodsFor: 'accessing' stamp: 'rhi 11/15/2004 16:46'! wordArrayAt: anInteger put: aString self wordArray at: anInteger put: aString.! ! !AsProcessExample methodsFor: 'running' stamp: 'rhi 11/15/2004 16:46'! wordProcessExample "doIt: [self new wordProcessExample]" "#('---' '---' '---' 'time' '---') #('---' '---' 'the' 'time' '---') #('now' '---' 'the' 'time' '---') #('now' 'is' 'the' 'time' '---') #('now' 'is' 'the' 'time' 'for')" | wordProcess | self wordArray: (Array new: 5 withAll: '---'). wordProcess _ [ [self wordArrayAt: 1 put: 'now'. self showWordArray] forkAt: Processor lowIOPriority "=> 60". [self wordArrayAt: 2 put: 'is'. self showWordArray] forkAt: Processor userInterruptPriority "=> 50". self wordArrayAt: 3 put: 'the'. self showWordArray] newProcess "activePriority => userSchedulingPriority => 40". wordProcess priority: Processor highIOPriority "=> 70". self wordArrayAt: 4 put: 'time'. self showWordArray. wordProcess resume. self wordArrayAt: 5 put: 'for'. self showWordArray.! ! !AsProcessExample methodsFor: 'running' stamp: 'rhi 11/15/2004 16:46'! wordProcessExample2 "doIt: [self new wordProcessExample2]" "#('---' '---' '---' '*** time ***' '---') #('---' '---' '*** the ***' '*** time ***' '---') #('*** now ***' '---' '*** the ***' '*** time ***' '---') #('*** now ***' '*** is ***' '*** the ***' '*** time ***' '---') #('*** now ***' '*** is ***' '*** the ***' '*** time ***' '*** for ***')" | wordProcess processIndifferentAspect | processIndifferentAspect _ AsProcessExampleIndifferentAspect new. processIndifferentAspect install. self wordArray: (Array new: 5 withAll: '---'). wordProcess _ [ [self wordArrayAt: 1 put: 'now'. self showWordArray] forkAt: Processor lowIOPriority "=> 60". [self wordArrayAt: 2 put: 'is'. self showWordArray] forkAt: Processor userInterruptPriority "=> 50". self wordArrayAt: 3 put: 'the'. self showWordArray] newProcess "activePriority => userSchedulingPriority => 40". wordProcess priority: Processor highIOPriority "=> 70". self wordArrayAt: 4 put: 'time'. self showWordArray. wordProcess resume. self wordArrayAt: 5 put: 'for'. self showWordArray. processIndifferentAspect uninstall.! ! !AsProcessExample methodsFor: 'running' stamp: 'rhi 11/15/2004 16:46'! wordProcessExample3 "doIt: [self new wordProcessExample3]" "#('---' '---' '---' 'time' '---') #('---' '---' 'the' 'time' '---') #('now' '---' 'the' 'time' '---') #('now' 'is' 'the' 'time' '---') #('now' 'is' 'the' 'time' 'for')" | wordProcess processSpecificAspect | processSpecificAspect _ AsProcessExampleSpecificAspect new. processSpecificAspect install. self wordArray: (Array new: 5 withAll: '---'). wordProcess _ [ [self wordArrayAt: 1 put: 'now'. self showWordArray] forkAt: Processor lowIOPriority "=> 60". [self wordArrayAt: 2 put: 'is'. self showWordArray] forkAt: Processor userInterruptPriority "=> 50". self wordArrayAt: 3 put: 'the'. self showWordArray] newProcess "activePriority => userSchedulingPriority => 40". wordProcess priority: Processor highIOPriority "=> 70". self wordArrayAt: 4 put: 'time'. self showWordArray. wordProcess resume. self wordArrayAt: 5 put: 'for'. self showWordArray. processSpecificAspect uninstall.! ! !AsProcessExample methodsFor: 'running' stamp: 'rhi 11/15/2004 16:46'! wordProcessExample4 "doIt: [self new wordProcessExample4]" "#('---' '---' '---' 'time' '---') #('---' '---' 'the' 'time' '---') #('### now ###' '---' 'the' 'time' '---') #('### now ###' 'is' 'the' 'time' '---') #('### now ###' 'is' 'the' 'time' 'for')" | wordProcess processSpecificAspect | processSpecificAspect _ AsProcessExampleSpecificAspect new. processSpecificAspect install. self wordArray: (Array new: 5 withAll: '---'). wordProcess _ [ [processSpecificAspect addProcess: Processor activeProcess. self wordArrayAt: 1 put: 'now'. self showWordArray] forkAt: Processor lowIOPriority "=> 60". [self wordArrayAt: 2 put: 'is'. self showWordArray] forkAt: Processor userInterruptPriority "=> 50". self wordArrayAt: 3 put: 'the'. self showWordArray] newProcess "activePriority => userSchedulingPriority => 40". wordProcess priority: Processor highIOPriority "=> 70". self wordArrayAt: 4 put: 'time'. self showWordArray. wordProcess resume. self wordArrayAt: 5 put: 'for'. self showWordArray. processSpecificAspect uninstall.! ! !AsProcessExample methodsFor: 'running' stamp: 'rhi 11/15/2004 16:46'! wordProcessExample5 "doIt: [self new wordProcessExample5]" "#('---' '---' '---' '### time ###' '---') #('---' '---' 'the' '### time ###' '---') #('### now ###' '---' 'the' '### time ###' '---') #('### now ###' 'is' 'the' '### time ###' '---') #('### now ###' 'is' 'the' '### time ###' '### for ###')" | wordProcess processSpecificAspect | processSpecificAspect _ AsProcessExampleSpecificAspect new. processSpecificAspect addProcess: Processor activeProcess. processSpecificAspect install. self wordArray: (Array new: 5 withAll: '---'). wordProcess _ [ [processSpecificAspect addProcess: Processor activeProcess. self wordArrayAt: 1 put: 'now'. self showWordArray] forkAt: Processor lowIOPriority "=> 60". [self wordArrayAt: 2 put: 'is'. self showWordArray] forkAt: Processor userInterruptPriority "=> 50". self wordArrayAt: 3 put: 'the'. self showWordArray] newProcess "activePriority => userSchedulingPriority => 40". wordProcess priority: Processor highIOPriority "=> 70". self wordArrayAt: 4 put: 'time'. self showWordArray. wordProcess resume. self wordArrayAt: 5 put: 'for'. self showWordArray. processSpecificAspect uninstall.! ! !AsProcessExample methodsFor: 'running' stamp: 'rhi 11/15/2004 16:46'! wordProcessExampleOrig "doIt: [self new wordProcessExampleOrig]" | wordProcess | wordProcess _ [ ['now' displayAt: 50 @ 100] forkAt: 60. ['is' displayAt: 100 @ 100] forkAt: 50. 'the' displayAt: 150 @ 100] newProcess. wordProcess priority: 70. 'time' displayAt: 200 @ 100. wordProcess resume. 'for' displayAt: 250 @ 100.! ! !AsProcessExample methodsFor: 'private' stamp: 'rhi 11/15/2004 16:46'! showWordArray Transcript cr; show: self wordArray.! ! !AsProcessExampleIndifferentAspect methodsFor: 'advice' stamp: 'rhi 11/15/2004 16:47'! adviceWordArrayAtPut ^ AsAroundAdvice qualifier: (AsAdviceQualifier attributes: { #receiverClassSpecific. }) pointcut: [{ AsJoinPointDescriptor targetClass: AsProcessExample targetSelector: #wordArrayAt:put:. }] aroundBlock: [:receiver :arguments :aspect :client :clientMethod | clientMethod valueWithReceiver: receiver arguments: { arguments first. '*** ', arguments second, ' ***'. }]! ! !AsProcessExampleSpecificAspect methodsFor: 'advice' stamp: 'rhi 11/15/2004 16:47'! adviceWordArrayAtPut ^ AsAroundAdvice qualifier: (AsAdviceQualifier attributes: { #receiverClassSpecific. #processSpecific. }) pointcut: [{ AsJoinPointDescriptor targetClass: AsProcessExample targetSelector: #wordArrayAt:put:. }] aroundBlock: [:receiver :arguments :aspect :client :clientMethod | clientMethod valueWithReceiver: receiver arguments: { arguments first. '### ', arguments second, ' ###'. }]! ! !AsSingleton methodsFor: 'accessing' stamp: 'rhi 5/13/2004 22:02'! creationTime "^