Initial port form Pharo
authorJan Vrany <jan.vrany@fit.cvut.cz>
Fri, 28 Aug 2015 12:21:13 +0100
changeset 0 43cb9f3e345e
child 1 24b88532f6ef
Initial port form Pharo Name: Ring-Core-Kernel-TheIntegrator.226 Author: TheIntegrator Time: 19-08-2015, 10:24:43.216 AM UUID: 0dec7303-cce5-4cc2-828c-cf63568dd722 Name: Ring-Core-Containers-TheIntegrator.41 Author: TheIntegrator Time: 01-11-2014, 09:50:54.189 AM UUID: d7f1ab48-e2ff-49d4-8475-65b800f8049a Name: Ring-Core-Containers-TheIntegrator.41 Author: TheIntegrator Time: 01-11-2014, 09:50:54.189 AM UUID: d7f1ab48-e2ff-49d4-8475-65b800f8049a Name: Ring-Tests-Containers-MarcusDenker.18 Author: MarcusDenker Time: 07-08-2014, 10:23:21.609 AM UUID: 78a00bf6-d1e6-4b6c-907c-88f6eae02968
.hgignore
Make.proto
Make.spec
Makefile.init
RGAbstractContainer.st
RGBehaviorDefinition.st
RGClassDefinition.st
RGClassDescriptionDefinition.st
RGClassInstanceVariableDefinition.st
RGClassVariableDefinition.st
RGCommentDefinition.st
RGContainer.st
RGDefinition.st
RGElementDefinition.st
RGGlobalDefinition.st
RGGlobalVariableDefinition.st
RGInstanceVariableDefinition.st
RGMetaclassDefinition.st
RGMetatraitDefinition.st
RGMethodDefinition.st
RGNamespace.st
RGOrganization.st
RGPackage.st
RGPoolVariableDefinition.st
RGSlice.st
RGTraitDefinition.st
RGTraitDescriptionDefinition.st
RGVariableDefinition.st
abbrev.stc
bc.mak
bmake.bat
extensions.st
libInit.cc
mingwmake.bat
ring.rc
stx_goodies_ring.st
tests/Make.proto
tests/Make.spec
tests/Makefile.init
tests/RGClassDefinitionTest.st
tests/RGCommentDefinitionTest.st
tests/RGContainerTest.st
tests/RGGlobalDefinitionTest.st
tests/RGMetaclassDefinitionTest.st
tests/RGMetatraitDefinitionTest.st
tests/RGMethodDefinitionTest.st
tests/RGNamespaceTest.st
tests/RGPackageTest.st
tests/RGSliceTest.st
tests/RGTraitDefinitionTest.st
tests/RGVariableDefinitionTest.st
tests/abbrev.stc
tests/bc.mak
tests/bmake.bat
tests/libInit.cc
tests/mingwmake.bat
tests/stx_goodies_ring_tests.st
tests/tests.rc
tests/vcmake.bat
vcmake.bat
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgignore	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,16 @@
+
+syntax: glob
+*Init.c   
+makefile
+*.so
+*.H
+*.o
+*.STH
+*.sc
+objbc
+objvc
+*.class
+java/libs/*.jar
+java/libs-src/*.jar
+*-Test.xml
+st.chg
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Make.proto	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,159 @@
+# $Header$
+#
+# DO NOT EDIT
+# automagically generated from the projectDefinition: stx_goodies_ring.
+#
+# Warning: once you modify this file, do not rerun
+# stmkmp or projectDefinition-build again - otherwise, your changes are lost.
+#
+# The Makefile as generated by this Make.proto supports the following targets:
+#    make         - compile all st-files to a classLib
+#    make clean   - clean all temp files
+#    make clobber - clean all
+#
+# This file contains definitions for Unix based platforms.
+# It shares common definitions with the win32-make in Make.spec.
+
+#
+# position (of this package) in directory hierarchy:
+# (must point to ST/X top directory, for tools and includes)
+TOP=../..
+INCLUDE_TOP=$(TOP)/..
+
+# subdirectories where targets are to be made:
+SUBDIRS=
+
+
+# subdirectories where Makefiles are to be made:
+# (only define if different from SUBDIRS)
+# ALLSUBDIRS=
+
+REQUIRED_SUPPORT_DIRS=
+
+# if your embedded C code requires any system includes,
+# add the path(es) here:,
+# ********** OPTIONAL: MODIFY the next lines ***
+# LOCALINCLUDES=-Ifoo -Ibar
+LOCALINCLUDES= -I$(INCLUDE_TOP)/jv/tea/compiler -I$(INCLUDE_TOP)/stx/goodies/refactoryBrowser/helpers -I$(INCLUDE_TOP)/stx/libbasic -I$(INCLUDE_TOP)/stx/libcompat
+
+
+# if you need any additional defines for embedded C code,
+# add them here:,
+# ********** OPTIONAL: MODIFY the next lines ***
+# LOCALDEFINES=-Dfoo -Dbar -DDEBUG
+LOCALDEFINES=
+
+LIBNAME=libstx_goodies_ring
+STCLOCALOPT='-package=$(PACKAGE)' -I. $(LOCALINCLUDES) $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES) -headerDir=.  -varPrefix=$(LIBNAME)
+
+
+# ********** OPTIONAL: MODIFY the next line ***
+# additional C-libraries that should be pre-linked with the class-objects
+LD_OBJ_LIBS=
+LOCAL_SHARED_LIBS=
+
+
+# ********** OPTIONAL: MODIFY the next line ***
+# additional C targets or libraries should be added below
+LOCAL_EXTRA_TARGETS=
+
+OBJS= $(COMMON_OBJS) $(UNIX_OBJS)
+
+
+
+all:: preMake classLibRule postMake
+
+pre_objs::  
+
+
+
+
+
+
+# Enforce recompilation of package definition class if Mercurial working
+# copy state changes. Together with --guessVersion it ensures that package
+# definition class always contains correct binary revision string.
+ifneq (**NOHG**, $(shell hg root 2> /dev/null || echo -n '**NOHG**'))
+stx_goodies_ring.$(O): $(shell hg root)/.hg/dirstate
+endif
+
+
+
+
+# run default testsuite for this package
+test: $(TOP)/goodies/builder/reports
+	$(MAKE) -C $(TOP)/goodies/builder/reports -f Makefile.init
+	$(TOP)/goodies/builder/reports/report-runner.sh -D . -r Builder::TestReport -p $(PACKAGE)
+
+
+
+# add more install actions here
+install::
+
+# add more install actions for aux-files (resources) here
+installAux::
+
+# add more preMake actions here
+preMake::
+
+# add more postMake actions here
+postMake:: cleanjunk
+
+# build all mandatory prerequisite packages (containing superclasses) for this package
+prereq:
+	cd ../../libbasic && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
+	cd ../refactoryBrowser/helpers && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
+	cd ../refactoryBrowser/parser && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
+	cd ../../libbasic2 && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
+	cd ../../libview && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
+	cd ../../libview2 && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
+	cd ../sunit && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
+	cd $(TOP)/../jv/tea/compiler && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
+
+
+
+# build all packages containing referenced classes for this package
+# they are not needed to compile the package (but later, to load it)
+references:
+
+
+cleanjunk::
+	-rm -f *.s *.s2
+
+clean::
+	-rm -f *.o *.H
+
+clobber:: clean
+	-rm -f *.so *.dll
+
+
+# BEGINMAKEDEPEND --- do not remove this line; make depend needs it
+$(OUTDIR)RGDefinition.$(O) RGDefinition.$(H): RGDefinition.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)stx_goodies_ring.$(O) stx_goodies_ring.$(H): stx_goodies_ring.st $(INCLUDE_TOP)/stx/libbasic/LibraryDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/ProjectDefinition.$(H) $(STCHDR)
+$(OUTDIR)RGAbstractContainer.$(O) RGAbstractContainer.$(H): RGAbstractContainer.st $(INCLUDE_TOP)/stx/goodies/ring/RGDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)RGElementDefinition.$(O) RGElementDefinition.$(H): RGElementDefinition.st $(INCLUDE_TOP)/stx/goodies/ring/RGDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)RGGlobalDefinition.$(O) RGGlobalDefinition.$(H): RGGlobalDefinition.st $(INCLUDE_TOP)/stx/goodies/ring/RGDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)RGBehaviorDefinition.$(O) RGBehaviorDefinition.$(H): RGBehaviorDefinition.st $(INCLUDE_TOP)/stx/goodies/ring/RGDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGGlobalDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)RGCommentDefinition.$(O) RGCommentDefinition.$(H): RGCommentDefinition.st $(INCLUDE_TOP)/stx/goodies/ring/RGDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGElementDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)RGContainer.$(O) RGContainer.$(H): RGContainer.st $(INCLUDE_TOP)/stx/goodies/ring/RGAbstractContainer.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)RGGlobalVariableDefinition.$(O) RGGlobalVariableDefinition.$(H): RGGlobalVariableDefinition.st $(INCLUDE_TOP)/stx/goodies/ring/RGDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGGlobalDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)RGMethodDefinition.$(O) RGMethodDefinition.$(H): RGMethodDefinition.st $(INCLUDE_TOP)/stx/goodies/ring/RGDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGElementDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)RGOrganization.$(O) RGOrganization.$(H): RGOrganization.st $(INCLUDE_TOP)/stx/goodies/ring/RGAbstractContainer.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)RGVariableDefinition.$(O) RGVariableDefinition.$(H): RGVariableDefinition.st $(INCLUDE_TOP)/stx/goodies/ring/RGDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGElementDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)RGClassDescriptionDefinition.$(O) RGClassDescriptionDefinition.$(H): RGClassDescriptionDefinition.st $(INCLUDE_TOP)/stx/goodies/ring/RGBehaviorDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGGlobalDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)RGClassInstanceVariableDefinition.$(O) RGClassInstanceVariableDefinition.$(H): RGClassInstanceVariableDefinition.st $(INCLUDE_TOP)/stx/goodies/ring/RGDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGElementDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGVariableDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)RGClassVariableDefinition.$(O) RGClassVariableDefinition.$(H): RGClassVariableDefinition.st $(INCLUDE_TOP)/stx/goodies/ring/RGDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGElementDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGVariableDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)RGInstanceVariableDefinition.$(O) RGInstanceVariableDefinition.$(H): RGInstanceVariableDefinition.st $(INCLUDE_TOP)/stx/goodies/ring/RGDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGElementDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGVariableDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)RGNamespace.$(O) RGNamespace.$(H): RGNamespace.st $(INCLUDE_TOP)/stx/goodies/ring/RGAbstractContainer.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGContainer.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)RGPackage.$(O) RGPackage.$(H): RGPackage.st $(INCLUDE_TOP)/stx/goodies/ring/RGAbstractContainer.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGContainer.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)RGPoolVariableDefinition.$(O) RGPoolVariableDefinition.$(H): RGPoolVariableDefinition.st $(INCLUDE_TOP)/stx/goodies/ring/RGDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGElementDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGVariableDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)RGSlice.$(O) RGSlice.$(H): RGSlice.st $(INCLUDE_TOP)/stx/goodies/ring/RGAbstractContainer.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGContainer.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)RGTraitDescriptionDefinition.$(O) RGTraitDescriptionDefinition.$(H): RGTraitDescriptionDefinition.st $(INCLUDE_TOP)/stx/goodies/ring/RGBehaviorDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGGlobalDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)RGClassDefinition.$(O) RGClassDefinition.$(H): RGClassDefinition.st $(INCLUDE_TOP)/stx/goodies/ring/RGBehaviorDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGClassDescriptionDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGGlobalDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)RGMetaclassDefinition.$(O) RGMetaclassDefinition.$(H): RGMetaclassDefinition.st $(INCLUDE_TOP)/stx/goodies/ring/RGBehaviorDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGClassDescriptionDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGGlobalDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)RGMetatraitDefinition.$(O) RGMetatraitDefinition.$(H): RGMetatraitDefinition.st $(INCLUDE_TOP)/stx/goodies/ring/RGBehaviorDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGGlobalDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGTraitDescriptionDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)RGTraitDefinition.$(O) RGTraitDefinition.$(H): RGTraitDefinition.st $(INCLUDE_TOP)/stx/goodies/ring/RGBehaviorDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGGlobalDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGTraitDescriptionDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)extensions.$(O): extensions.st $(INCLUDE_TOP)/jv/tea/compiler/TClass.$(H) $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/helpers/RBAbstractClass.$(H) $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/helpers/RBClass.$(H) $(INCLUDE_TOP)/stx/libbasic/Behavior.$(H) $(INCLUDE_TOP)/stx/libbasic/Class.$(H) $(INCLUDE_TOP)/stx/libbasic/ClassDescription.$(H) $(INCLUDE_TOP)/stx/libbasic/CompiledCode.$(H) $(INCLUDE_TOP)/stx/libbasic/ExecutableFunction.$(H) $(INCLUDE_TOP)/stx/libbasic/Method.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+
+# ENDMAKEDEPEND --- do not remove this line
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Make.spec	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,112 @@
+# $Header$
+#
+# DO NOT EDIT
+# automagically generated from the projectDefinition: stx_goodies_ring.
+#
+# Warning: once you modify this file, do not rerun
+# stmkmp or projectDefinition-build again - otherwise, your changes are lost.
+#
+# This file contains specifications which are common to all platforms.
+#
+
+# Do NOT CHANGE THESE DEFINITIONS
+# (otherwise, ST/X will have a hard time to find out the packages location from its packageID,
+#  to find the source code of a class and to find the library for a package)
+MODULE=stx
+MODULE_DIR=goodies/ring
+PACKAGE=$(MODULE):$(MODULE_DIR)
+
+
+# Argument(s) to the stc compiler (stc --usage).
+#  -headerDir=. : create header files locally
+#                (if removed, they will be created as common
+#  -Pxxx       : defines the package
+#  -Zxxx       : a prefix for variables within the classLib
+#  -Dxxx       : defines passed to to CC for inline C-code
+#  -Ixxx       : include path passed to CC for inline C-code
+#  +optspace   : optimized for space
+#  +optspace2  : optimized more for space
+#  +optspace3  : optimized even more for space
+#  +optinline  : generate inline code for some ST constructs
+#  +inlineNew  : additionally inline new
+#  +inlineMath : additionally inline some floatPnt math stuff
+#
+# ********** OPTIONAL: MODIFY the next line(s) ***
+# STCLOCALOPTIMIZATIONS=+optinline +inlineNew
+# STCLOCALOPTIMIZATIONS=+optspace3
+STCLOCALOPTIMIZATIONS=+optspace3
+
+
+# Argument(s) to the stc compiler (stc --usage).
+#  -warn            : no warnings
+#  -warnNonStandard : no warnings about ST/X extensions
+#  -warnEOLComments : no warnings about EOL comment extension
+#  -warnPrivacy     : no warnings about privateClass extension
+#  -warnUnused      : no warnings about unused variables
+#
+# ********** OPTIONAL: MODIFY the next line(s) ***
+# STCWARNINGS=-warn
+# STCWARNINGS=-warnNonStandard
+# STCWARNINGS=-warnEOLComments
+STCWARNINGS=-warnNonStandard
+
+COMMON_CLASSES= \
+	RGDefinition \
+	stx_goodies_ring \
+	RGAbstractContainer \
+	RGElementDefinition \
+	RGGlobalDefinition \
+	RGBehaviorDefinition \
+	RGCommentDefinition \
+	RGContainer \
+	RGGlobalVariableDefinition \
+	RGMethodDefinition \
+	RGOrganization \
+	RGVariableDefinition \
+	RGClassDescriptionDefinition \
+	RGClassInstanceVariableDefinition \
+	RGClassVariableDefinition \
+	RGInstanceVariableDefinition \
+	RGNamespace \
+	RGPackage \
+	RGPoolVariableDefinition \
+	RGSlice \
+	RGTraitDescriptionDefinition \
+	RGClassDefinition \
+	RGMetaclassDefinition \
+	RGMetatraitDefinition \
+	RGTraitDefinition \
+
+
+
+
+COMMON_OBJS= \
+    $(OUTDIR_SLASH)RGDefinition.$(O) \
+    $(OUTDIR_SLASH)stx_goodies_ring.$(O) \
+    $(OUTDIR_SLASH)RGAbstractContainer.$(O) \
+    $(OUTDIR_SLASH)RGElementDefinition.$(O) \
+    $(OUTDIR_SLASH)RGGlobalDefinition.$(O) \
+    $(OUTDIR_SLASH)RGBehaviorDefinition.$(O) \
+    $(OUTDIR_SLASH)RGCommentDefinition.$(O) \
+    $(OUTDIR_SLASH)RGContainer.$(O) \
+    $(OUTDIR_SLASH)RGGlobalVariableDefinition.$(O) \
+    $(OUTDIR_SLASH)RGMethodDefinition.$(O) \
+    $(OUTDIR_SLASH)RGOrganization.$(O) \
+    $(OUTDIR_SLASH)RGVariableDefinition.$(O) \
+    $(OUTDIR_SLASH)RGClassDescriptionDefinition.$(O) \
+    $(OUTDIR_SLASH)RGClassInstanceVariableDefinition.$(O) \
+    $(OUTDIR_SLASH)RGClassVariableDefinition.$(O) \
+    $(OUTDIR_SLASH)RGInstanceVariableDefinition.$(O) \
+    $(OUTDIR_SLASH)RGNamespace.$(O) \
+    $(OUTDIR_SLASH)RGPackage.$(O) \
+    $(OUTDIR_SLASH)RGPoolVariableDefinition.$(O) \
+    $(OUTDIR_SLASH)RGSlice.$(O) \
+    $(OUTDIR_SLASH)RGTraitDescriptionDefinition.$(O) \
+    $(OUTDIR_SLASH)RGClassDefinition.$(O) \
+    $(OUTDIR_SLASH)RGMetaclassDefinition.$(O) \
+    $(OUTDIR_SLASH)RGMetatraitDefinition.$(O) \
+    $(OUTDIR_SLASH)RGTraitDefinition.$(O) \
+    $(OUTDIR_SLASH)extensions.$(O) \
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Makefile.init	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,27 @@
+#
+# DO NOT EDIT
+#
+# make uses this file (Makefile) only, if there is no
+# file named "makefile" (lower-case m) in the same directory.
+# My only task is to generate the real makefile and call make again.
+# Thereafter, I am no longer used and needed.
+#
+# MACOSX caveat:
+#   as filenames are not case sensitive (in a default setup),
+#   we cannot use the above trick. Therefore, this file is now named
+#   "Makefile.init", and you have to execute "make -f Makefile.init" to
+#   get the initial makefile.  This is now also done by the toplevel CONFIG
+#   script.
+
+.PHONY: run
+
+run: makefile
+	$(MAKE) -f makefile
+
+#only needed for the definition of $(TOP)
+include Make.proto
+
+makefile: mf
+
+mf:
+	$(TOP)/rules/stmkmf
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/RGAbstractContainer.st	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,129 @@
+"{ Package: 'stx:goodies/ring' }"
+
+"{ NameSpace: Smalltalk }"
+
+RGDefinition subclass:#RGAbstractContainer
+	instanceVariableNames:'elements'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Ring-Core-Containers'
+!
+
+RGAbstractContainer comment:'This is the abstract class for container-based elements.
Elements are separated in groups by kind (e.g classes, methods, pools, etc.)
Subclasses have to define the kind of collection for a particular group of entities.
For a container the use of a dictionary or another collection (e.g. SortedCollection) to store group of elements is independent.

'
+!
+
+!RGAbstractContainer methodsFor:'accessing'!
+
+elements
+    "Retrieves the elements"
+    
+    ^elements
+! !
+
+!RGAbstractContainer methodsFor:'adding/removing'!
+
+addElement: anObject
+
+    anObject addInContainer: self
+!
+
+addElement: anObject in: aCollection
+
+    aCollection isDictionary
+        ifTrue: [ aCollection at: anObject fullName put: anObject ]
+        ifFalse:[ aCollection add: anObject ]
+!
+
+removeElement: anObject
+
+    anObject removeFromContainer: self
+!
+
+removeElement: anObject from: aCollection
+
+    aCollection isDictionary
+        ifTrue: [ aCollection removeKey: anObject fullName ifAbsent:[ ] ]
+        ifFalse:[ aCollection remove: anObject ifAbsent:[ ] ]
+! !
+
+!RGAbstractContainer methodsFor:'initialization'!
+
+initialize
+
+    super initialize.
+    elements:= IdentityDictionary new.
+! !
+
+!RGAbstractContainer methodsFor:'initialize-release'!
+
+flushElements
+
+    elements:= IdentityDictionary new
+! !
+
+!RGAbstractContainer methodsFor:'iterating elements'!
+
+elementsDo: aBlock
+    elements valuesDo: [ :collection | collection do: [ :each | aBlock value: each ] ]
+! !
+
+!RGAbstractContainer methodsFor:'lookup elements'!
+
+elementNamed: elementName
+    | aSymbol found |
+    
+    aSymbol:= elementName asSymbol.
+    elements do:[ :collection| 		
+        (found:= self elementNamed: aSymbol in: collection) notNil ifTrue:[ ^found ] ].
+    ^nil
+!
+
+elementNamed: elementName in: aCollection
+    | aSymbol |
+    
+    aSymbol:= elementName asSymbol.
+    ^aCollection isDictionary
+        ifTrue: [ aCollection at: aSymbol ifAbsent: [ nil ] ]
+        ifFalse:[ aCollection detect:[ :each| each fullName = aSymbol ] ifNone:[ nil ] ]
+! !
+
+!RGAbstractContainer methodsFor:'managing elements groups'!
+
+elementsCategorized: aSymbol
+    "Retrieves a group of elements.
+    If does not exist set an Set"
+    
+    ^elements at: aSymbol ifAbsentPut:[ Set ]
+!
+
+elementsCategorized: aSymbol with: aCollection
+    "Allows to define other groups of elements with a particular kind of collection"
+    
+    elements at: aSymbol put: aCollection
+!
+
+removeElementsCategorized: aSymbol
+    "Deletes a group of elements"
+    
+    elements removeKey: aSymbol ifAbsent:[ ]
+! !
+
+!RGAbstractContainer methodsFor:'testing'!
+
+includesElement: anRGDefinition
+
+    ^anRGDefinition isIncludedInContainer: self
+!
+
+includesElementNamed: elementName
+
+    ^ elements anySatisfy: [ :collection | self includesElementNamed: elementName asSymbol in: collection ]
+!
+
+includesElementNamed: elementName in: aCollection
+
+    ^aCollection isDictionary
+        ifTrue: [ aCollection includesKey:  elementName asSymbol ]
+        ifFalse:[ aCollection anySatisfy: [ :each| each name = elementName asSymbol ] ]
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/RGBehaviorDefinition.st	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,512 @@
+"{ Package: 'stx:goodies/ring' }"
+
+"{ NameSpace: Smalltalk }"
+
+RGGlobalDefinition subclass:#RGBehaviorDefinition
+	instanceVariableNames:'superclass methods protocols'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Ring-Core-Kernel'
+!
+
+RGBehaviorDefinition comment:'An RGBehaviorDefinition is an abstract definition for class-alike entities (e.g. classes, traits)

Instance Variables
	methods:		<Collection>
	protocols:		<Collection>
	superclass:		<Object>'
+!
+
+!RGBehaviorDefinition class methodsFor:'class-annotations'!
+
+allSubclassesKey
+
+    ^#allSubclasses
+!
+
+allSuperclassesKey
+
+    ^#allSuperclasses
+!
+
+definitionSourceKey
+
+    ^#definitionSource
+!
+
+isPoolKey
+
+    ^#isPool
+!
+
+subclassesKey
+
+    ^#subclasses
+!
+
+superclassNameKey
+    
+    ^#superclassName
+!
+
+superclassesKey
+
+    ^#superclasses
+!
+
+traitCompositionSourceKey
+
+    ^#traitCompositionSource
+!
+
+usersKey
+
+    ^#users
+! !
+
+!RGBehaviorDefinition methodsFor:'accessing'!
+
+methods
+
+    ^methods
+!
+
+methods: aDictionary
+
+    methods:= aDictionary
+!
+
+package
+    
+    self subclassResponsibility
+!
+
+protocols
+    "retrieves the protocols of the class"
+
+    ^protocols
+!
+
+protocols: aCollection
+    "set the protocols of the class"
+
+    protocols:= aCollection
+!
+
+realClass
+    "Retrieves the current class existing in the runtime environment"
+
+    ^self rootEnvironment classNamed: self name 
+!
+
+superclass
+
+    ^superclass
+!
+
+superclass: aRGBehaviorDefinition
+    "The superclass is assigned.
+    If aRGBehaviorDefinition is not nil the receiver is added as a subclass and the superclass assignment also happens for theMetaClass"
+
+    superclass := aRGBehaviorDefinition.
+    superclass notNil
+        ifFalse: [ ^ self ].
+    self superclassName: aRGBehaviorDefinition name.
+    aRGBehaviorDefinition addSubclass: self.
+    self hasMetaclass
+        ifTrue: [ self theMetaClass superclass: aRGBehaviorDefinition theMetaClass ]
+!
+
+theMetaClass
+
+    self subclassResponsibility
+!
+
+theNonMetaClass
+
+    self subclassResponsibility
+!
+
+traitNames
+    "Assuming that traits in a composition can be identified by
+    testing for the first character being an uppercase character
+    (and thus not a special character such as {, # etc.)"
+    | tokens |
+    
+    tokens := self traitCompositionSource parseLiterals flattened.
+    ^tokens select: [:each | each first isUppercase].
+!
+
+traits
+    "Retrieves ring traits based on the names in the traitComposition and from the environment if it is a ring object"
+    
+    ^ self environment isRingObject 	
+        ifTrue: [ self traitNames collect:[ :each| self environment traitNamed: each ] ]
+        ifFalse:[ #() ]
+! !
+
+!RGBehaviorDefinition methodsFor:'accessing class hierarchy'!
+
+allSubclasses
+    "Retrieves all the subclasses of the receiver in the chan hiearchy - value is kept as an annotation"
+    "is a good idea storing this?"
+    
+    ^self annotationNamed: self class allSubclassesKey
+        ifAbsentPut:[ | collection index |
+            index := 1.
+            collection := OrderedCollection withAll: self subclasses.
+            [index <= collection size] whileTrue: 
+                [collection addAll: (collection at: index) subclasses.
+                index := index + 1].
+            collection ]
+!
+
+allSubclasses: aCollection
+    "Stores all the subclasses (direct and indirect) as an annotation"
+    
+    self annotationNamed: self class allSubclassesKey
+        ifAbsentPut:[ aCollection ]
+!
+
+allSuperclasses
+    "Answer an OrderedCollection of the receiver's and the receiver's  
+    ancestor's superclasses"
+    "Is implementation of Behavior more efficient?"
+    
+    ^self annotationNamed: self class allSuperclassesKey
+        ifAbsentPut:[ | supers sprClass |
+            supers := OrderedCollection new.
+            sprClass := self superclass.
+            [sprClass notNil] whileTrue: 
+                [supers add: sprClass.
+                sprClass := sprClass superclass].
+            supers ]
+!
+
+allSuperclasses: aCollection
+    "Stores all the superclasses (direct and indirect) as an annotation"
+    
+    self annotationNamed: self class allSuperclassesKey
+        ifAbsentPut:[ aCollection ]
+!
+
+allSuperclassesDo: aBlock
+    "Evaluate the argument, aBlock, for each of the receiver's superclasses."
+
+    self superclass isNil
+        ifTrue: [ ^ self ].
+    aBlock value: superclass.
+    superclass allSuperclassesDo: aBlock
+!
+
+methodDict
+    ^ methods
+!
+
+withAllSubclasses
+    "if allSubclasses is stored should not affect the collection"
+
+    ^self allSubclasses, {self}
+!
+
+withAllSuperclasses
+    "if allSuperclasses is stored should not affect the collection"
+
+    ^self allSuperclasses, {self}
+! !
+
+!RGBehaviorDefinition methodsFor:'accessing methods'!
+
+allSelectors
+    "Retrieves all the selectos of the receiver in the chain hierarchy"
+    | class selectors |
+    
+    class:= self.
+    selectors := Set new.
+    [class notNil] whileTrue: 
+            [selectors addAll: class selectors.
+            class := class superclass ].
+    ^selectors
+!
+
+compiledMethodNamed: selector
+    "Retrieves the compiled method from aRGMethodDefinition"
+    | method |
+
+    ^(method:= self methodNamed: selector) notNil
+    ifTrue: [ method compiledMethod ]
+    ifFalse:[ nil ]
+!
+
+extensionMethods
+
+    ^self methods select:[ :each | each isExtension ]
+!
+
+includesSelector: selector
+    "Looks if selector is a key in the methods dictionary"
+    
+    ^methods includesKey: selector asSymbol
+!
+
+methodNamed: selector
+    "Retrieves aRGMethodDefinition that matches the selector given as argument"
+    "RB defines methodFor:"
+
+    ^methods at: selector asSymbol ifAbsent:[ nil ]
+!
+
+methodsInProtocol: aString
+    "Retrieves the methods classified in protocol named aString"
+
+    ^methods select: [ :each | each protocol = aString ]
+!
+
+selectors
+    "Retrieves the method selectors"
+
+    ^methods keys
+! !
+
+!RGBehaviorDefinition methodsFor:'adding/removing methods'!
+
+addMethod: aRGMethodDefinition
+    "Adds aRGMethodDefinition in the methods dictionary.
+     Adds the protocol of such method too"
+
+    self addMethod: aRGMethodDefinition in: methods.
+    self addProtocol: aRGMethodDefinition protocol
+!
+
+addSelector: selectorName classified: protocolName sourced: source
+
+    self addMethod: ((RGMethodDefinition named: selectorName) 
+                            parent: self;
+                            protocol: protocolName;
+                            sourceCode: source;
+                            yourself)
+!
+
+removeMethod: aRGMethodDefinition
+    "Removes aRGMethodDefinition from the methods dictionary"
+
+    self removeMethod: aRGMethodDefinition from: methods
+!
+
+removeSelector: selector
+    "Removes a method named as selector"
+
+    methods removeKey: selector ifAbsent:[]
+! !
+
+!RGBehaviorDefinition methodsFor:'adding/removing protocols'!
+
+addProtocol: anObject
+    "Adds a protocol named anObject.
+    Protocols are not repeated"
+    
+    anObject ifNil:[ ^self ].
+    protocols add: anObject
+!
+
+removeProtocol: aString
+    "Removes a protocol named aString (if exists)"
+
+    protocols remove: aString ifAbsent:[]
+! !
+
+!RGBehaviorDefinition methodsFor:'annotations'!
+
+definitionSource
+    "Retrieves the definition template of the receiver -> aString.
+    This value is kept as an annotation"
+    
+    ^self annotationNamed: self class definitionSourceKey
+!
+
+definitionSource: aString
+    "Sets the definition template of the receiver -> aString.
+    It's stored as an annotation"
+    
+    self annotationNamed: self class definitionSourceKey
+        put: aString
+!
+
+hasDefinitionSource
+    "Tests whether the receiver has a source definition."
+    
+    ^ self definitionSource notNil
+!
+
+subclasses
+    "Retrieves the direct subclasses of the receiver.
+    This value is kept as an annotation"
+
+    ^self annotationNamed: self class subclassesKey
+        ifAbsentPut:[ OrderedCollection new ]
+!
+
+subclasses: aCollection
+    "Stores direct subclasses of the receiver as an annotation"
+
+    self annotationNamed: self class subclassesKey
+        ifAbsentPut:[ aCollection ]
+!
+
+superclassName
+    "Retrieves the name of the superclass if exists"
+
+    ^self annotationNamed: self class superclassNameKey
+!
+
+superclassName: aSymbol
+
+    self annotationNamed: self class superclassNameKey 
+        put: aSymbol
+!
+
+traitCompositionSource
+    "Retrieves aString representing the used traits"
+
+    ^self annotationNamed: self class traitCompositionSourceKey
+        ifAbsentPut:[  '{}'  ]
+!
+
+traitCompositionSource: anString
+    "Stores aString representing the traits used by the receiver "
+
+    self annotationNamed: self class traitCompositionSourceKey
+        put: anString 
+! !
+
+!RGBehaviorDefinition methodsFor:'compatibility'!
+
+soleInstance
+    "to be depracated in the future"
+    
+    ^self theNonMetaClass
+! !
+
+!RGBehaviorDefinition methodsFor:'initialization'!
+
+initialize
+
+    super initialize.
+    methods:= IdentityDictionary new.
+    protocols:= Set new.
+! !
+
+!RGBehaviorDefinition methodsFor:'managing container'!
+
+addInContainer: aRGContainer
+
+    aRGContainer addClass: self
+!
+
+isIncludedInContainer: aRGContainer
+
+    ^aRGContainer includesClass: self
+!
+
+removeFromContainer: aRGContainer
+
+    aRGContainer removeClass: self
+! !
+
+!RGBehaviorDefinition methodsFor:'printing'!
+
+printOn: aStream 
+    aStream nextPutAll: self name
+!
+
+storeOn: aStream 
+    self name storeOn: aStream
+! !
+
+!RGBehaviorDefinition methodsFor:'private'!
+
+addMethod: aRGMethodDefinition in: aCollection
+    "Adds aRGMethodDefinition in the collection received"
+
+    aRGMethodDefinition parent ifNil:[ aRGMethodDefinition parent: self ].
+    aCollection at: aRGMethodDefinition selector
+        put: aRGMethodDefinition
+!
+
+removeMethod: aRGMethodDefinition from: aCollection
+    "Removes aRGMethodDefinition from the collection received"
+
+    aCollection removeKey: aRGMethodDefinition selector ifAbsent:[]
+! !
+
+!RGBehaviorDefinition methodsFor:'subclassing'!
+
+addSubclass: aRGBehaviorDefinition
+    "Adds a direct subclass of the receiver"
+
+    (self subclasses includes: aRGBehaviorDefinition)
+        ifFalse:[ self subclasses add: aRGBehaviorDefinition ]
+!
+
+removeSubclass: aRGBehaviorDefinition 
+    "Removes aRGAbstractClassDefinition from the direct subclasses - without failing if does not exist"
+    
+    self subclasses remove: aRGBehaviorDefinition ifAbsent: []
+! !
+
+!RGBehaviorDefinition methodsFor:'testing'!
+
+hasMetaclass
+
+    ^ false
+!
+
+hasMethods
+    "validates the existance of methods"
+
+    ^methods notEmpty
+!
+
+hasProtocols
+    "Validates the existance of protocols"
+
+    ^protocols notEmpty
+!
+
+hasSuperclass
+
+    ^superclass notNil
+!
+
+hasTraitComposition
+
+    ^self traitCompositionSource ~= '{}'
+!
+
+includesProtocol: aString
+        "Looks for a protocols named = aString"
+    
+        ^protocols includes: aString
+!
+
+isDefined
+    "If the class exists in the environment"
+    
+    ^self realClass notNil
+    
+!
+
+isMeta
+    "By default is considered a non-meta class"
+
+    ^false
+!
+
+isSameRevisionAs: aRGBehaviorDefinition
+    "This method look for equality of the properties of the receiver"
+
+    ^self class = aRGBehaviorDefinition class
+        and:[ self name == aRGBehaviorDefinition name ]
+! !
+
+!RGBehaviorDefinition methodsFor:'testing class hierarchy'!
+
+includesBehavior: aClass
+    ^self == aClass or: [self inheritsFrom: aClass]
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/RGClassDefinition.st	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,320 @@
+"{ Package: 'stx:goodies/ring' }"
+
+"{ NameSpace: Smalltalk }"
+
+RGClassDescriptionDefinition subclass:#RGClassDefinition
+	instanceVariableNames:'metaClass comment classVariables category package sharedPools'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Ring-Core-Kernel'
+!
+
+RGClassDefinition comment:'RGClassDefinition is the concrete representation of a class (no trait)'
+!
+
+!RGClassDefinition class methodsFor:'instance creation'!
+
+createSharedPoolNamed: aSymbol
+    "A shared pool is a class inheriting from #SharedPool"
+
+    ^(RGClassDefinition named: aSymbol)
+            superclassName: #SharedPool;
+            isPool: true;
+            yourself
+! !
+
+!RGClassDefinition methodsFor:'accessing'!
+
+category
+    "retrieves a tag for its package"
+    
+    ^category
+!
+
+category: aSymbol
+    "stores a tag for its package"
+
+    category := aSymbol
+!
+
+classVariables
+
+    ^classVariables
+!
+
+classVariables: aCollection
+
+    classVariables:= aCollection
+!
+
+comment
+    "Retrieves the comment definition object"
+
+    ^comment
+!
+
+comment: anObject
+    "Sets a RGCommentDefinition object based on the argument"
+    
+    comment := anObject isRingObject 
+        ifFalse: [ 
+            RGCommentDefinition new
+                parent: self;
+                content: anObject; 
+                yourself ]
+        ifTrue: [anObject ]
+    
+     
+!
+
+package
+    "Retrieves the package in which this class is contained, if exists"
+    
+    ^package
+!
+
+package: aRGPackage
+    "Sets the package in which this class is contained"
+    
+    package:= aRGPackage
+!
+
+sharedPools
+    "Keeps the pool variable relationship of the receiver"
+
+    ^ sharedPools
+!
+
+sharedPools: aCollection
+    sharedPools := aCollection
+!
+
+stamp
+
+    ^self hasComment ifTrue:[ self comment stamp ] ifFalse:[ nil ]
+!
+
+stamp: aString
+
+    self hasComment
+    ifTrue: [ self comment stamp: aString ]
+    ifFalse:[ RGCommentDefinition new
+                         parent: self; 
+                         stamp: aString ]
+!
+
+theMetaClass
+    
+    ^metaClass
+!
+
+theNonMetaClass
+
+    ^self
+! !
+
+!RGClassDefinition methodsFor:'behavior'!
+
+withMetaclass
+    "Registers explicitly the metaclass of a class"
+
+    metaClass:= RGMetaclassDefinition class: self
+!
+
+withMetaclass: aRGMetaclassDefinition
+    "Registers explicitly the metaclass of a class"
+
+    metaClass:= aRGMetaclassDefinition.
+    metaClass baseClass: self.  
+! !
+
+!RGClassDefinition methodsFor:'class variables'!
+
+addClassVarNamed: aString
+    | var |
+    var := (RGClassVariableDefinition named: aString) parent: self.
+    self addVariable: var in: classVariables.
+    ^var
+!
+
+addClassVariable: aRCClassVariable
+
+    self addVariable: (aRCClassVariable parent: self) 
+        in: classVariables
+!
+
+addClassVariables: aCollection
+    
+    aCollection do: [:var | self addClassVarNamed: var ]
+!
+
+allClassVarNames
+
+    ^self allClassVariables collect:[ :cvar| cvar name ]
+!
+
+allClassVariables
+    "Answer a collection of the receiver's classVariables, including those defined its superclasses"
+
+    ^self hasSuperclass 
+        ifFalse:[ classVariables ]
+        ifTrue:[ self superclass allClassVariables, classVariables ]
+!
+
+classVarNamed: aString
+
+    ^classVariables detect:[ :v| v name = aString asSymbol ] ifNone:[ nil ]
+!
+
+classVarNames
+    "Answer a collection of the names of the class variables defined in the receiver."
+    
+    ^classVariables collect:[ :cvar| cvar name ]
+!
+
+removeClassVarNamed: aString
+
+    self removeVariable: (self classVarNamed: aString) from: classVariables
+!
+
+removeClassVariable: aRGClassVariableDefinition
+
+    self removeVariable: aRGClassVariableDefinition from: classVariables
+! !
+
+!RGClassDefinition methodsFor:'initialization'!
+
+initialize
+
+    super initialize.
+    classVariables:= OrderedCollection new.
+    sharedPools:= OrderedCollection new.
+! !
+
+!RGClassDefinition methodsFor:'managing pool users'!
+
+addUser: aRGClassDefinition
+    "The receiver registers the aRGClassDefinition as an user.  An reinforces its status as a shared pool."
+    
+    aRGClassDefinition isClass ifFalse:[ ^self ].
+    (aRGClassDefinition theNonMetaClass sharedPoolNamed: self name) isNil
+        ifTrue: [ aRGClassDefinition theNonMetaClass addSharedPoolNamed: self name ].
+    self isPool: true.
+    self users add: aRGClassDefinition theNonMetaClass
+!
+
+includesUser: aRGBehaviorDefinition
+
+    ^self users includes: aRGBehaviorDefinition
+!
+
+isPool
+    "The receiver is a shared pool if it inherits from SharedPool"
+    
+    ^self annotationNamed: self class isPoolKey 
+        ifAbsent: [ self superclassName == #SharedPool ]
+!
+
+isPool: aBoolean
+    
+    ^self annotationNamed: self class isPoolKey put: aBoolean
+!
+
+removeUser: aRGClassDefinition
+    "Removes this RGClassDefinition from the users of the receiver"
+    
+    aRGClassDefinition isClass ifFalse:[ ^self ].
+    aRGClassDefinition theNonMetaClass removeSharedPoolNamed: self name.
+    self users remove: aRGClassDefinition theNonMetaClass ifAbsent:[ ]
+!
+
+users
+    "If the reciever is a SharedPool then retrieves its users"
+    
+    ^self isPool
+        ifTrue: [ self annotationNamed: self class usersKey ifAbsentPut: [ OrderedCollection new ] ]
+        ifFalse:[ #() ]
+! !
+
+!RGClassDefinition methodsFor:'shared pools'!
+
+addSharedPool: aRGPoolVariableDefinition
+    self 
+        addVariable: (aRGPoolVariableDefinition parent: self) 
+        in: sharedPools
+!
+
+addSharedPoolNamed: poolName
+    | pool |
+    pool:= (RGPoolVariableDefinition named:  poolName) parent: self.
+    self addVariable: pool in: sharedPools.
+    ^pool
+!
+
+addSharedPools: aCollection
+    aCollection do: [ :pool | self addSharedPoolNamed: pool ]
+!
+
+allSharedPoolNames
+    ^ self allSharedPools collect: [ :pool | pool name ]
+!
+
+allSharedPools
+    "Answer a collection of the pools the receiver shares, including those defined  
+    in the superclasses of the receiver."
+
+    ^ self hasSuperclass
+        ifFalse: [ sharedPools ]
+        ifTrue: [ self superclass allSharedPools , sharedPools ]
+!
+
+removeSharedPool: aRGPoolVariableDefinition
+
+    self removeVariable: aRGPoolVariableDefinition from: sharedPools
+!
+
+removeSharedPoolNamed: poolName
+
+    self removeVariable: (self sharedPoolNamed: poolName) from: sharedPools
+!
+
+sharedPoolNamed: poolName
+
+    ^sharedPools detect:[ :v| v name = poolName asSymbol ] ifNone:[ nil ]
+!
+
+sharedPoolNames
+    
+    ^sharedPools collect:[ :pool| pool name ]
+! !
+
+!RGClassDefinition methodsFor:'testing'!
+
+hasComment
+
+    ^comment isEmptyOrNil not
+!
+
+hasMetaclass
+
+    ^metaClass notNil
+!
+
+hasStamp
+
+    ^self stamp isEmptyOrNil not
+!
+
+isSameRevisionAs: aRGClassDefinition
+    "This method look for equality of the properties of the receiver"
+
+    ^(super isSameRevisionAs: aRGClassDefinition)
+        and:[ self superclassName == aRGClassDefinition superclassName
+        and:[ self category = aRGClassDefinition category 
+        and:[ self classVarNames sorted = aRGClassDefinition classVarNames sorted 
+        and:[ self sharedPoolNames sorted = aRGClassDefinition sharedPoolNames sorted  
+        and:[ self traitCompositionSource = aRGClassDefinition traitCompositionSource 
+        and:[ ((self hasComment and:[ self comment isSameRevisionAs: aRGClassDefinition comment ]) or:[ self hasComment not ])
+        and:[ (self theMetaClass isSameRevisionAs: aRGClassDefinition theMetaClass) ] ] ] ] ] ] ]
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/RGClassDescriptionDefinition.st	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,168 @@
+"{ Package: 'stx:goodies/ring' }"
+
+"{ NameSpace: Smalltalk }"
+
+RGBehaviorDefinition subclass:#RGClassDescriptionDefinition
+	instanceVariableNames:'instanceVariables organization'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Ring-Core-Kernel'
+!
+
+RGClassDescriptionDefinition comment:'RGClassDescriptionDefinition is the common parent for classes and metaclasses defining instance variables'
+!
+
+!RGClassDescriptionDefinition methodsFor:'accessing'!
+
+instanceVariables
+
+    ^instanceVariables
+!
+
+instanceVariables: aCollection
+
+    instanceVariables:= aCollection
+!
+
+organization: aClassOrg
+    "Install an instance of ClassOrganizer that represents the organization of the messages of the receiver."
+
+    aClassOrg ifNotNil: [aClassOrg setSubject: self].
+    organization := aClassOrg
+! !
+
+!RGClassDescriptionDefinition methodsFor:'comparing'!
+
+= aRGClassDefinition
+
+    ^self class = aRGClassDefinition class 
+        and: [ self name = aRGClassDefinition name 
+            and: [ self environment = aRGClassDefinition environment ] ]
+!
+
+hash
+
+    ^self name hash bitXor: self class hash
+! !
+
+!RGClassDescriptionDefinition methodsFor:'initialization'!
+
+initialize
+
+    super initialize.
+    instanceVariables:= OrderedCollection new.
+! !
+
+!RGClassDescriptionDefinition methodsFor:'instance variables'!
+
+addInstVarNamed: aString
+    | var |
+    var := ((self isMeta 
+                ifTrue: [ RGClassInstanceVariableDefinition ]
+                ifFalse:[  RGInstanceVariableDefinition ])
+        named: aString) parent: self.
+    self addVariable: var in: instanceVariables.
+    ^var
+!
+
+addInstanceVariable: aRGVariableDefinition
+    "aRGVariableDefinition is a instance variable or class instance variable"
+
+    self addVariable: (aRGVariableDefinition parent: self)
+        in: instanceVariables
+!
+
+addInstanceVariables: aCollection
+    
+    aCollection do: [:var | self addInstVarNamed: var ]
+!
+
+allInstVarNames
+
+    ^self allInstanceVariables collect:[ :ivar| ivar name ]
+!
+
+allInstanceVariables
+    "Answer a collection of the receiver's instanceVariables, including those defined in its superclass"
+
+    ^self hasSuperclass 
+        ifFalse:[ instanceVariables ]
+        ifTrue:[ self superclass allInstanceVariables, instanceVariables ]
+!
+
+instVarNames
+    "Answer a collection of the names of the instance variables defined in the receiver."
+    
+    ^instanceVariables collect:[ :ivar| ivar name ]
+!
+
+instanceVariableNamed: aString
+    ^ instanceVariables 
+        detect: [ :v | v name = aString asSymbol ] 
+        ifNone: [ nil ]
+!
+
+removeInstVarNamed: aString
+
+    self removeVariable: (self instanceVariableNamed: aString) from: instanceVariables
+!
+
+removeInstanceVariable: aRGVariableDefinition
+    "aRGVariableDefinition is a instance variable or class instance variable"
+
+    self removeVariable: aRGVariableDefinition from: instanceVariables
+! !
+
+!RGClassDescriptionDefinition methodsFor:'organization'!
+
+organization
+    "Answer the instance of ClassOrganizer that represents the organization 
+    of the messages of the receiver."
+
+    organization ifNil: [
+        self organization: (ClassOrganization forClass: self) ].
+    "Making sure that subject is set correctly. It should not be necessary."
+    organization ifNotNil: [ organization setSubject: self ].
+    ^ organization
+! !
+
+!RGClassDescriptionDefinition methodsFor:'printing'!
+
+storeOn: aStream
+    aStream
+        nextPutAll: '(';
+        nextPutAll: self class name;
+        nextPutAll: ' named: '.
+    name storeOn: aStream.
+    aStream nextPut: $)
+! !
+
+!RGClassDescriptionDefinition methodsFor:'private'!
+
+addVariable: aRGVariableDefinition in: aCollection
+    "Adds a RGVariableDefinition in the collection received" 
+
+    aCollection add: aRGVariableDefinition
+!
+
+removeVariable: aRGVariableDefinition from: aCollection
+    "Removes a variable from a particular collection.
+    This behavior is the same for any kind of variable"
+    aCollection remove: aRGVariableDefinition ifAbsent:[]
+! !
+
+!RGClassDescriptionDefinition methodsFor:'testing'!
+
+isClass
+
+    ^true
+!
+
+isSameRevisionAs: aRGClassDescriptionDefinition
+    "This method look for equality of the properties of the receiver"
+    "Instances variables are compared at the level of names but without any sorting"
+
+    ^(super isSameRevisionAs: aRGClassDescriptionDefinition)
+        and:[ self instVarNames sort = aRGClassDescriptionDefinition instVarNames sort ]
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/RGClassInstanceVariableDefinition.st	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,29 @@
+"{ Package: 'stx:goodies/ring' }"
+
+"{ NameSpace: Smalltalk }"
+
+RGVariableDefinition subclass:#RGClassInstanceVariableDefinition
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Ring-Core-Kernel'
+!
+
+RGClassInstanceVariableDefinition comment:'A class instance variable definition'
+!
+
+!RGClassInstanceVariableDefinition methodsFor:'initialization'!
+
+initialize 
+
+    super initialize.
+    self isMetaSide: true.
+! !
+
+!RGClassInstanceVariableDefinition methodsFor:'testing'!
+
+isClassInstanceVariable
+
+    ^true
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/RGClassVariableDefinition.st	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,21 @@
+"{ Package: 'stx:goodies/ring' }"
+
+"{ NameSpace: Smalltalk }"
+
+RGVariableDefinition subclass:#RGClassVariableDefinition
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Ring-Core-Kernel'
+!
+
+RGClassVariableDefinition comment:'A class variable definition'
+!
+
+!RGClassVariableDefinition methodsFor:'testing'!
+
+isClassVariable
+
+    ^true
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/RGCommentDefinition.st	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,282 @@
+"{ Package: 'stx:goodies/ring' }"
+
+"{ NameSpace: Smalltalk }"
+
+RGElementDefinition subclass:#RGCommentDefinition
+	instanceVariableNames:'content stamp'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Ring-Core-Kernel'
+!
+
+RGCommentDefinition comment:'RGCommentDefinition is a first-class representation of class''s comments'
+!
+
+!RGCommentDefinition class methodsFor:'instance creation'!
+
+realClass: aClass
+    "Creates a ring comment definition from a Smalltalk class"
+    ^(super realClass: aClass)
+        asActive;
+        yourself
+! !
+
+!RGCommentDefinition methodsFor:'accessing'!
+
+content
+
+    self isActive 
+        ifTrue: [ ^ self realClass organization classComment ].
+    self isHistorical
+        ifTrue: [ ^ self contentAtPointer ifNil:[ self realClass ifNil:[ content ] ifNotNil:[ :rc| rc organization classComment ] ] ].	
+    ^ content
+!
+
+content: anObject
+
+    content:= anObject
+!
+
+fullName
+    "Keeps a unique description for the receiver. As annotation to avoid converting each time is invoked"
+    
+    ^self annotationNamed: self class fullNameKey
+        ifAbsentPut:[ (self parentName, ' ', self name) asSymbol ]
+!
+
+name
+
+    ^name ifNil:[ name := #Comment ]
+!
+
+stamp
+    "Retrieves the user-alias + timestamp associated to the receiver (if exists)"
+    
+    self isActive 
+        ifTrue: [ ^ self realClass organization commentStamp ].
+    self isHistorical
+        ifTrue: [ ^ self stampAtPointer ifNil:[ self realClass ifNil:[ stamp ] ifNotNil:[ :rc| rc organization commentStamp ] ] ].	
+    ^ stamp
+!
+
+stamp: anObject
+
+    stamp:= anObject
+! !
+
+!RGCommentDefinition methodsFor:'backward compatibility'!
+
+sourceCode
+
+    ^ self content   
+! !
+
+!RGCommentDefinition methodsFor:'comparing'!
+
+<= aRGCommentDefinition
+    "Sort comment definition according to: 1) name of the class"
+    
+    ^(self parentName <= aRGCommentDefinition parentName)
+! !
+
+!RGCommentDefinition methodsFor:'printing'!
+
+printOn: aStream 
+
+    self parentName ifNotNil: [
+        aStream nextPutAll: self parentName;
+                  nextPutAll: ' ' ].
+    aStream nextPutAll: self name
+! !
+
+!RGCommentDefinition methodsFor:'source pointers'!
+
+commentDataPointers
+    "Retrieves the combination key to look for information of the receiver in the source file"
+    ^'commentStamp:' -> #commentStamp:
+!
+
+contentAtPointer
+    "A RGCommentDefinition may be created to point the sourceFile in which case it retrieves the class comment"
+
+    ^ self sourcePointer notNil
+        ifTrue: [ SourceFiles sourceCodeAt: self sourcePointer ]
+        ifFalse:[ '' ]
+!
+
+sourcePointer
+    "Retrieves the sourcePointer for this definition if exists"
+    
+    ^self annotationNamed:  self class sourcePointerKey   
+!
+
+sourcePointer: aNumber
+
+    self annotationNamed:  self class sourcePointerKey put: aNumber 
+!
+
+stampAtPointer
+    "A RGMethodDefinition may be created to point the sourceFile in which case it retrieves the stamp"
+
+    ^ self sourcePointer notNil
+        ifTrue: [ SourceFiles timeStampAt: self sourcePointer for: self commentDataPointers ]
+        ifFalse:[ nil ]	
+! !
+
+!RGCommentDefinition methodsFor:'stamp values'!
+
+author 
+
+    ^self annotationNamed: self class authorKey
+        ifAbsentPut:[ self class parseAuthorAliasFrom: stamp ]
+!
+
+author: aString 
+
+    self annotationNamed: self class authorKey
+            put: aString 
+!
+
+timeStamp 
+
+    ^ self annotationNamed: self class timeStampKey 
+        ifAbsentPut: [ self class 
+                            parseTimestampFrom: self stamp 
+                            default: (DateAndTime epoch) ]
+!
+
+timeStamp: aTimestamp 
+
+    self annotationNamed: self class timeStampKey
+            put: aTimestamp 
+! !
+
+!RGCommentDefinition methodsFor:'testing'!
+
+hasAuthor
+
+    ^self hasStamp and:[ self author isEmptyOrNil not ]
+!
+
+hasStamp
+
+    ^stamp isEmptyOrNil not
+
+    
+!
+
+isComment
+
+    ^true
+!
+
+isEmptyOrNil
+
+    ^content isEmptyOrNil 
+!
+
+isFromTrait
+    ^false
+!
+
+isSameRevisionAs: aRGCommentDefinition
+    "This method look for equality of the properties of the receiver"
+    "A comment validates only its contents and not its stamp"
+    
+    ^(super isSameRevisionAs: aRGCommentDefinition)
+        and:[ self content = aRGCommentDefinition content ]
+! !
+
+!RGCommentDefinition methodsFor:'to remove as soon as possible'!
+
+category
+    ^self realClass category
+!
+
+isValid
+    "for compatibility with method definition"
+
+    ^ true
+!
+
+methodClass
+    self flag: 'if comments are mixed with methods use #realClass instead'.
+    ^self realClass
+!
+
+selector
+    self flag: 'if comments are mixed with methods use #name instead'.
+    ^self name
+! !
+
+!RGCommentDefinition methodsFor:'type of comments'!
+
+asActive
+
+    "Sets the receiver as active object, which will allow itself to retrieve its data from the class organization"
+    self annotationNamed: self class statusKey put: #active.
+!
+
+asHistorical
+
+    "Sets the receiver as historical object, which will allow itself to retrieve its data using the sourcePointer"
+    | realClass |
+    self annotationNamed: self class statusKey put: #historical.
+    self sourcePointer ifNil:[
+        realClass := self realClass.
+        realClass notNil ifTrue: [ 
+            realClass organization commentRemoteString
+                ifNotNil: [:str | self sourcePointer: str sourcePointer ] ] ]
+!
+
+asPassive
+
+    "Sets the receiver as passive object, which will allow itself to retrieve its data that was assigned in its creation"
+    self annotationNamed: self class statusKey put: #passive
+!
+
+fromActiveToHistorical
+    "If the receiver was generated as an active comment, it can be converted to a historical one by reading the data of the real class (if exists)"
+    
+    self isActive ifTrue: [
+        self asHistorical ]
+!
+
+fromActiveToPassive
+    "If the receiver was generated as an active comment, it can be converted to a passive one by reading the data of the real class organization"
+
+    | realClass |
+    self isActive
+        ifFalse: [ ^ self ].
+    realClass := self realClass.
+    realClass notNil
+        ifTrue: [ 
+            self content: realClass organization classComment.
+            self stamp: realClass organization commentStamp ].
+    self asPassive
+!
+
+isActive
+
+    "A ring comment isActive when it needs to access the class organization for retrieving its data"
+    ^(self annotationNamed: self class statusKey) 
+        ifNil:[ false ] 
+        ifNotNil:[ :status| status == #active ]
+!
+
+isHistorical
+
+    "A ring comment can be used to point an old version of the receiver, in this case it will use the sourcePointer to retrieve its information"
+    ^(self annotationNamed: self class statusKey) 
+        ifNil:[ false ] 
+        ifNotNil:[ :status| status == #historical ]
+!
+
+isPassive
+
+    "A ring comment isPassive by default.  In this case it will retrieve the data that was assigned in its creation"
+    ^(self annotationNamed: self class statusKey) 
+        ifNil:[ true ] 
+        ifNotNil:[ :status| status == #passive ]
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/RGContainer.st	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,537 @@
+"{ Package: 'stx:goodies/ring' }"
+
+"{ NameSpace: Smalltalk }"
+
+RGAbstractContainer subclass:#RGContainer
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Ring-Core-Containers'
+!
+
+RGContainer comment:'A concrete container already knows how to treat classes, methods and packages. '
+!
+
+!RGContainer class methodsFor:'image package loading'!
+
+allManagers
+
+    ^ Smalltalk globals at: #MCWorkingCopy 
+        ifPresent: [:mcwc | mcwc allManagers ] 
+        ifAbsent: [OrderedCollection new ]
+!
+
+category: categoryName matches: prefix
+
+    | prefixSize catSize |
+    categoryName ifNil: [ ^false ].
+    catSize := categoryName size.
+    prefixSize := prefix size.
+    catSize < prefixSize ifTrue: [ ^false ].
+    (categoryName findString: prefix startingAt: 1 caseSensitive: true) = 1
+        ifFalse: [ ^false ].
+    ^(categoryName at: prefix size + 1 ifAbsent: [ ^true ]) = $-
+!
+
+packageKeys
+
+    ^ self allManagers collect: [ :pck | pck package name asSymbol -> ('*', pck package name asLowercase) ]
+!
+
+packageNames
+
+    ^ self allManagers collect: [ :pck | pck package name asSymbol ]
+!
+
+packageOfClass: aRGBehaviorDefinition
+
+    ^ self packageOfClass: aRGBehaviorDefinition using: self packageNames.
+!
+
+packageOfClass: aRGBehaviorDefinition using: packageNames
+
+    "Looks for the package of aRGBehaviorDefinition from the image"
+    | pName |
+    aRGBehaviorDefinition ifNil:[ ^nil ].
+    pName := (packageNames 
+                detect: [ :each| each = aRGBehaviorDefinition category ]
+                ifNone: [ packageNames detect:[ :each| self category: aRGBehaviorDefinition category matches: each ] ifNone:[ nil ] ]).
+    ^ pName ifNotNil:[ RGPackage named: pName ]
+!
+
+packageOfMethod: aRGMethodDefinition
+
+    ^ self packageOfMethod: aRGMethodDefinition using: self packageKeys
+!
+
+packageOfMethod: aRGMethodDefinition using: packageKeys
+
+    "Looks for the package of aRGMethodDefinition from the image"
+    | pName parentPackage |
+    (aRGMethodDefinition protocol notNil and:[ aRGMethodDefinition protocol beginsWith: '*' ]) ifFalse:[
+        parentPackage := (aRGMethodDefinition parent ifNotNil:[ aRGMethodDefinition parent package ]).	
+        ^ parentPackage ifNil:[ self packageOfClass: aRGMethodDefinition parent ] ].
+
+    aRGMethodDefinition protocol ifNil: [ ^ nil ].
+    pName := (packageKeys 
+                detect: [ :each| self category: aRGMethodDefinition protocol asLowercase matches: each value ] ifNone:[ nil ]).
+    ^ pName ifNotNil:[ RGPackage named: pName key ]
+! !
+
+!RGContainer methodsFor:'accessing'!
+
+definedClasses
+    "Retrieves classes (traits are included)"
+
+    ^self elements at: #definedClasses ifAbsentPut:[ IdentityDictionary new ]
+!
+
+definedClasses: aCollection
+    "Set the classes collection"
+
+    self elements at: #definedClasses put: aCollection
+!
+
+methods
+    "Retrieves methods defined in the container"
+    
+    ^self elements at: #methods ifAbsentPut:[ IdentityDictionary new ]
+!
+
+methods: aCollection
+    "Set the methods collection"
+    
+    self elements at: #methods put: aCollection
+!
+
+packages
+    "Retrieves the children packages defined in the receiver"
+
+    ^self elements at: #packages ifAbsentPut:[ IdentityDictionary new ]
+!
+
+packages: aCollection
+
+    self elementsCategorized: #packages with: aCollection
+! !
+
+!RGContainer methodsFor:'adding/removing'!
+
+addClass: aRGBehaviorDefinition
+    "aRGBehaviorDefinition has to be a class, trait or metaclass"
+    self flag: 'when i am adding a metaclass? check this?'.
+
+    (aRGBehaviorDefinition isClass
+        or:[ aRGBehaviorDefinition isTrait ]) ifFalse:[ ^self ].
+    self addElement: aRGBehaviorDefinition in: self definedClasses
+!
+
+addClassNamed: className 
+    "Creates a class with the given name"
+    self addClass: (RGClassDefinition named: className)
+!
+
+addMethod: aRGMethodDefinition
+    "aRGMethodDefinition needs to satisfy the status isMethod"
+
+    aRGMethodDefinition isMethod ifFalse:[ ^self ].
+    self addElement: aRGMethodDefinition in: self methods
+!
+
+addPackage: aRGPackage
+    "adds a child package"
+
+    aRGPackage isPackage ifFalse:[ ^self ].
+    self addElement: aRGPackage in: self packages
+!
+
+addPackageNamed: packageName
+    "adds a child package with the given name"
+
+    (self includesPackageNamed: packageName) ifTrue: [ ^self ].
+    self addPackage: (RGPackage named: packageName)
+!
+
+addTrait: aRGTraitDefinition
+    "convenient method"
+
+    self addClass: aRGTraitDefinition
+!
+
+addTraitNamed: traitName 
+    "Creates a trait with the given name"
+    self addClass:  (RGTraitDefinition named: traitName)
+!
+
+removeClass: aRGAbstractClassDefinition
+
+    self removeElement: aRGAbstractClassDefinition from: self definedClasses
+!
+
+removeMethod: aRGMethodDefinition
+
+    self removeElement: aRGMethodDefinition from: self methods
+!
+
+removePackage: aRGPackage
+    "removes a child aRGPackage"
+
+    aRGPackage isPackage ifFalse:[ ^self ].
+    self removeElement: aRGPackage from: self packages
+!
+
+removeTrait: aRGTraitDefinition
+    "convenient method"
+
+    self removeClass: aRGTraitDefinition
+!
+
+withoutClasses
+
+    self removeElementsCategorized: #definedClasses
+!
+
+withoutMethods
+    
+    self removeElementsCategorized: #methods
+!
+
+withoutPackages
+    
+    self removeElementsCategorized: #packages
+! !
+
+!RGContainer methodsFor:'convenient accesses'!
+
+allClasses
+    "convenient method"
+
+    ^self classes
+!
+
+allMethods
+    "convenient method"
+
+    ^self methods
+!
+
+allTraits
+    "convenient method"
+    
+    ^self allClasses select:[ :each | each isTrait ]
+!
+
+classNames
+    "Retrieves class names (including traits)"
+    
+    ^ self definedClasses isDictionary
+        ifTrue: [ self definedClasses keys ]
+        ifFalse:[ self definedClasses collect:[ :class|  class name ] ]
+!
+
+classes
+    "convenient method"
+
+    ^self definedClasses
+!
+
+classes: aCollection
+    "convenient method"
+
+    self definedClasses: aCollection
+!
+
+extensionMethods
+    "Retrieves a collection (by default a dictionary) with the extensions methods of the receiver"
+
+    ^self methods values select:[ :mth| mth isExtension ]
+!
+
+traitNames
+    "Retrieves the names of defined traits"
+
+    ^ self traits isDictionary
+        ifTrue: [ self traits keys ]
+        ifFalse:[ self traits collect:[ :trait| trait name ] ]
+!
+
+traits
+    "Retrieves a collection (by default a dictionary) containing only defined traits"
+
+    ^self definedClasses select:[ :each| each isTrait ]
+! !
+
+!RGContainer methodsFor:'image class and method loading'!
+
+loadClass: aRGBehaviorDefinition using: packageKeys
+
+    self setPackageOfClass: aRGBehaviorDefinition using: packageKeys.
+    self addClass: aRGBehaviorDefinition
+!
+
+loadMethod: aRGMethodDefinition inClass: aRGBehaviorDefinition using: packageKeys
+
+    self addMethod: aRGMethodDefinition.
+    aRGBehaviorDefinition addMethod: aRGMethodDefinition.
+    self setPackageOfMethod: aRGMethodDefinition ofClass: aRGBehaviorDefinition using: packageKeys
+!
+
+loadTraitUsers
+    "Set the users of a trait"
+    | users |
+    
+    users := self classes select: [ :cls | cls hasTraitComposition ].
+    users do:[ :each |  | rgTrait |
+        each traitNames do:[ :tname|
+            rgTrait := self traitNamed: tname.
+            rgTrait notNil ifTrue: [
+                rgTrait addUser: each.
+                rgTrait theMetaClass addUser: each theMetaClass ] ] ]
+! !
+
+!RGContainer methodsFor:'image package loading'!
+
+cleanEmptyPackages
+
+    (self packages select:[ :pck| pck classes size isZero and:[ pck methods size isZero ] ])
+        do:[ :pck| self removePackage: pck ]
+!
+
+findPackageOfClass: aRGBehaviorDefinition using: packageKeys
+
+    "Look for the package of a class. It is nil when there is not a package created for a category in MC"
+    | pair |
+    self packages isEmpty ifTrue: [ ^ nil ].
+    ^ self packages at: aRGBehaviorDefinition category ifAbsent:[
+        pair := packageKeys detect:[ :each| self class category: aRGBehaviorDefinition category matches: each key ] ifNone:[ nil ].
+        pair ifNotNil:[ self packages at: pair key ] ]
+!
+
+findPackageOfMethod: aRGMethodDefinition using: packageKeys
+
+    "Look for the package of an extension method. nil otherwise"
+    | pair lname |	
+    self packages isEmpty ifTrue: [ ^nil ].
+    (aRGMethodDefinition protocol beginsWith: '*') ifFalse:[ ^ nil ].
+    lname := aRGMethodDefinition protocol asLowercase.
+ 	pair := packageKeys detect:[ :assoc| self class category: lname matches: assoc value ] ifNone:[ nil ].
+    ^ pair ifNotNil:[ self packages at: pair key ]
+!
+
+loadPackagesFromImage
+
+    | rgPackage rgPackageKeys |
+    rgPackageKeys := OrderedCollection new.
+    self class allManagers do: [ :pck | 
+        rgPackage := RGPackage named: pck package name asSymbol.
+        rgPackageKeys add: (rgPackage name -> ('*', rgPackage name asLowercase)).
+        self addPackage: rgPackage ].
+    ^ rgPackageKeys
+!
+
+setPackageOfClass: rgClass using: packageKeys
+    "Set the package to aRGBehaviorDefinition"
+
+    (self findPackageOfClass: rgClass using: packageKeys) 
+        ifNotNil:[ :pck| pck addClass: rgClass ]
+    
+!
+
+setPackageOfMethod: rgMethod ofClass: rgClass using: packageKeys
+    "Set the package to aRGMethodDefinition and its value isExtension"
+
+    (self findPackageOfMethod: rgMethod using: packageKeys) 
+        ifNil:[ rgClass package ifNotNil:[ :pck| 
+                pck addMethod: rgMethod.
+                rgMethod isExtension: false ] ]
+        ifNotNil:[ :pck| 
+            pck addMethod: rgMethod.
+            rgMethod isExtension: (rgMethod package ~= rgClass package) ]
+! !
+
+!RGContainer methodsFor:'initialization'!
+
+initialize
+
+    super initialize.
+    self definedClasses: IdentityDictionary new.
+    self methods: IdentityDictionary new.
+    self packages: IdentityDictionary new.
+! !
+
+!RGContainer methodsFor:'iterating'!
+
+allClassesDo: aBlock
+    "Evaluate the argument, aBlock, for each class and its metaclass"
+
+    self allClasses do: [ :each|
+        aBlock value: each.
+        each hasMetaclass
+            ifTrue:[ aBlock value: each theMetaClass ] ]
+!
+
+allTraitsDo: aBlock
+    "Evaluate the argument, aBlock, for each trait"
+
+    self allTraits do: [ :each|
+        aBlock value: each.
+        each hasMetaclass
+            ifTrue:[ aBlock value: each theMetaClass ] ]
+!
+
+classesDo: aBlock
+
+    self classes do: [ :each|
+        aBlock value: each.
+        each hasMetaclass
+            ifTrue:[ aBlock value: each theMetaClass ] ]
+!
+
+definedClassesDo: aBlock
+
+    self definedClasses do: [ :each|
+        aBlock value: each.
+        each hasMetaclass
+            ifTrue:[ aBlock value: each theMetaClass ] ]
+!
+
+methodsDo: aBlock
+
+    self methods
+        do:[ :each| aBlock value: each ]
+!
+
+traitsDo: aBlock
+
+    self traits do: [ :each|
+        aBlock value: each.
+        each hasMetaclass
+            ifTrue:[ aBlock value: each theMetaClass ] ]
+! !
+
+!RGContainer methodsFor:'lookup by name'!
+
+classNamed: className
+    "Retrieves an RGBehaviorDefinition object.
+    className could be theMetaClass name"
+    
+    ^self classOrTraitNamed: className
+!
+
+classOrTraitNamed: className
+    "A class or metaclass can be reached by its name"
+    | theClass |
+
+    className ifNil: [^nil ].
+    theClass:= self elementNamed: (self theNonMetaClassNameOf: className) in: self definedClasses.
+    theClass ifNil:[ ^nil ].
+    
+    ^(self isMetaclassName: className)
+        ifTrue: [ theClass theMetaClass ]
+        ifFalse:[ theClass ] 
+!
+
+metaclassNamed: metaclassName
+    | theClass |
+    
+    theClass:= (self classOrTraitNamed: metaclassName).
+    theClass notNil
+    ifTrue:[ ^theClass isMeta 
+              ifTrue: [ theClass ]
+              ifFalse:[ theClass theMetaClass ] ].
+    
+    ^nil
+!
+
+methodNamed: fullSelectorName
+
+    ^self elementNamed: fullSelectorName in: self methods
+!
+
+packageNamed: packageName
+    "Look for a child package named packageName"
+    
+    ^self elementNamed: packageName in: self packages
+!
+
+traitNamed: traitName
+    "Retrieves an RGTraitDefinition object.
+    traitName could be theMetaClass name"
+    | trait |
+    
+    ^(trait:= self classOrTraitNamed: traitName) isTrait
+    ifTrue:[ trait ]
+    ifFalse:[ nil ]
+! !
+
+!RGContainer methodsFor:'testing'!
+
+hasClasses
+
+    ^self definedClasses notEmpty
+!
+
+hasMethods
+
+    ^self methods notEmpty
+!
+
+includesClass: aRGBehaviorDefinition
+    "Returns true if the receiver includes aRGBehaviorDefinition in the defined classes"
+
+    ^self definedClasses includes: aRGBehaviorDefinition
+!
+
+includesClassNamed: className
+    "Returns true if the receiver includes the className in the defined classes"
+
+    self flag: 'can a metaclass be stored without its nonMetaClass? Check this'.
+    ^self includesElementNamed: (self theNonMetaClassNameOf: className) in: self definedClasses.
+!
+
+includesMethod: aRGMethodDefinition
+
+    ^self methods includes: aRGMethodDefinition
+!
+
+includesMethodNamed: fullSelectorName
+    
+    ^self includesElementNamed: fullSelectorName in: self methods
+!
+
+includesPackage: aRGPackage
+    "Verifies if a child package == aRGPackage exists"
+    
+    ^self packages includes: aRGPackage
+!
+
+includesPackageNamed: packageName
+    "Verifies if a child package with name = packageName exists"
+    
+    ^self includesElementNamed: packageName in: self packages
+! !
+
+!RGContainer methodsFor:'utilities'!
+
+isMetaclassName: aSymbol
+    "Validates if the arguments corresponds to a nonMetaClass"
+    
+    ^(aSymbol
+        indexOfSubCollection: ' class'
+        startingAt: 1) > 0
+!
+
+theNonMetaClassNameOf: aSymbol
+    "Rejects the prefix ' class' or ' classTrait' of the argument"
+    | index |
+    
+    index := aSymbol
+                indexOfSubCollection: ' class'
+                startingAt: 1
+                ifAbsent: [ ^aSymbol asSymbol ].
+
+    ^(aSymbol 
+        copyFrom: 1
+        to: index - 1) asSymbol
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/RGDefinition.st	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,240 @@
+"{ Package: 'stx:goodies/ring' }"
+
+"{ NameSpace: Smalltalk }"
+
+Object subclass:#RGDefinition
+	instanceVariableNames:'annotations name'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Ring-Core-Kernel'
+!
+
+RGDefinition comment:'I am the root class of the Ring meta-model.
A Ring definition has a name, can be annotated and knows its environment'
+!
+
+!RGDefinition class methodsFor:'instance creation'!
+
+new
+    "return an initialized instance"
+
+    ^ self basicNew initialize.
+! !
+
+!RGDefinition class methodsFor:'annotations'!
+
+authorKey
+
+    ^#author
+!
+
+fullNameKey
+
+    ^#fullName
+!
+
+timeStampKey
+
+    ^#timestamp
+! !
+
+!RGDefinition class methodsFor:'class initialization'!
+
+named: aName
+
+    ^self new
+        name: aName asSymbol;
+        yourself
+! !
+
+!RGDefinition methodsFor:'accessing'!
+
+environment
+    "If the receiver has not namespace assigned the default is used"
+    "self class environment = Smalltalk globals"
+
+    ^ self annotationNamed: #environment ifAbsent: [ self class environment ]
+!
+
+environment: namespace
+
+    namespace = self class environment
+        ifFalse:[ self annotationNamed: #environment put: namespace ]
+!
+
+fullName
+
+    ^self name
+!
+
+name
+
+    ^name
+!
+
+name: anObject
+    "a symbol or a string should be expected"
+    
+    name:= anObject
+!
+
+rootEnvironment
+    "Retrieves the runtime environment of an RGObject"
+    "If the receiver is defined in an RGContainer the runtime environment is the one associated to its container"
+    | parent |
+    
+    parent:= self environment.
+    [ parent isRingObject ]
+        whileTrue:[ parent:= parent environment ].
+
+    ^parent
+! !
+
+!RGDefinition methodsFor:'annotations'!
+
+annotationNamed: annotationName 
+    "Answer the value of the annotation named <annotationName>, or 
+    nil if the annotation is not defined for the receiver."
+    
+    ^ self
+        annotationNamed: annotationName
+        ifAbsent: [ nil ]
+!
+
+annotationNamed: annotationName ifAbsent: exceptionBlock 
+    "Answer the value of the annotation named <annotationName>. If the 
+    annotation is not defined for the receiver, answer the result of 
+    evaluating the <exceptionBlock>."
+
+    self hasAnnotations
+        ifFalse: [ ^exceptionBlock value ].
+
+    ^self annotations
+            at: annotationName
+            ifAbsent: [ exceptionBlock value ]
+!
+
+annotationNamed: annotationName ifAbsentPut: blockValue 
+
+    ^self annotations
+        at: annotationName
+        ifAbsentPut: blockValue
+!
+
+annotationNamed: annotationName put: value 
+
+    self annotations
+        at: annotationName
+        put: value
+!
+
+annotationNames
+    
+    self hasAnnotations
+        ifFalse:[ ^OrderedCollection new ].
+    ^annotations keys
+!
+
+annotations
+
+    ^annotations ifNil:[ annotations:= IdentityDictionary new ]
+!
+
+hasAnnotationNamed: annotationName
+    "Answer <true> if the receiver contains the annotation named <annotationName>. "
+    
+    self hasAnnotations	
+        ifFalse:[ ^false ].
+    ^annotations includesKey: annotationName
+!
+
+hasAnnotations
+
+    ^annotations notNil
+!
+
+removeAnnotationNamed: annotationName 
+    "Remove the annotation named <annotationName>. Fails quietly if there 
+    is no annotation with the given name."
+    
+    (self hasAnnotationNamed: annotationName)
+        ifTrue:[ annotations removeKey: annotationName ]
+! !
+
+!RGDefinition methodsFor:'converting'!
+
+asRingDefinition
+    ^ self
+! !
+
+!RGDefinition methodsFor:'testing types'!
+
+isAccess 
+
+    ^false
+!
+
+isComment
+
+    ^false
+!
+
+isGlobalVariable
+
+    ^false
+!
+
+isInheritance
+
+    ^false
+!
+
+isInvocation
+
+    ^false
+!
+
+isMethod
+
+    ^false
+!
+
+isNamespace
+
+    ^false
+!
+
+isOrganization 
+
+    ^false
+!
+
+isPackage
+
+    ^false
+!
+
+isPool
+
+    ^false
+!
+
+isReference 
+
+    ^false
+!
+
+isRingObject
+
+    ^true
+!
+
+isSlice
+
+    ^false
+!
+
+isVariable
+
+    ^false
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/RGElementDefinition.st	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,286 @@
+"{ Package: 'stx:goodies/ring' }"
+
+"{ NameSpace: Smalltalk }"
+
+RGDefinition subclass:#RGElementDefinition
+	instanceVariableNames:'parent'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Ring-Core-Kernel'
+!
+
+RGElementDefinition comment:'RGElementDefinition is the abstract class for representing elements of a class-alike definition (i.e., methods, variables, comment).

parent holds the RGClassDefinition or RGMetaclassDefinition defining this element.
	
	
Now a RingEntityDefinition offers two APIs: one that is generic and works for all the source code entities and this is the one we just 
presented: parent, parentName and realParent. Having such interface is important to build generic tools that could manipulate 
any entities in a polymorphic way (yes no isKindOf: everywhere).

In addition, a ring method definition offers a specific interface that should only be used when you know that you are solely manipulate
specific entity such as class element: method definition, class comment, and variables. 

Here is the equivalence table

	realParent 				realClass
	parent					ringClass
	parentName			className
	
For example for a methodDefinition we will have the following:

GENERIC API
------------------
* To access the ring class definition name, use parentName
	aRGMethodDefinition parentName
	
Example:
	(Point>>#dist:) asRingDefinition parentName
		->  #Point
		
* If you have a complete model where classes and methods are ring definition, to access the ring class definition , use parent
	aRGMethodDefinition parent
	
Example:
	aRGMethodDefinition(Point>>#dist:) parent
		->  aRGClassDefinition(Point)
		
* If you want to access the smalltalk class that contains the compiledMethod that is represented by a ringMethodDefinition, use realParent
	aRGMethodDefinition realParent
	
Example:
	(Point>>#dist:) asRingDefinition realParent
		->  Point
		


CLASS Element specific API
------------------------------------------
* The message class returns the class of the object :). Yes as you see we could not use class and className because class is already used to refer to the class of the object.

Example:
	(Point>>#dist:) asRingDefinition class
		->  RingMethodDefinition
		
* The message className returns the name of the ring class defining the reingMethodDefinition.

Example:
	(Point>>#dist:) asRingDefinition className
		->  #Point		
		
* If you have a complete model where classes and methods are ring definition, to access the ring class definition , use parent
	aRGMethodDefinition ringClass
	
Example:
	aRGMethodDefinition(Point>>#dist:) ringClass
		->  aRGClassDefinition(Point)
		
		
* If you want to access the smalltalk class that contains the compiledMethod that is represented by a ringMethodDefinition, use realClass
	aRGMethodDefinition realClass
	
Example:
	(Point>>#dist:) asRingDefinition realClass
		->  Point

'
+!
+
+!RGElementDefinition class methodsFor:'class initialization'!
+
+class: aRGBehaviorDefinition
+    "The argument is a ring object and serves as the parent of a method, variable or class comment"
+
+    ^self new
+        parent: aRGBehaviorDefinition;
+        yourself
+!
+
+realClass: aClass
+    "The argument is a Smalltalk class and the parent of a method, variable, class comment.
+    However it is not set as parent but only its name and scope (instance/class)"
+
+    ^self new
+        parent: aClass asRingDefinition;
+        yourself
+! !
+
+!RGElementDefinition class methodsFor:'elements-annotations'!
+
+classNameKey
+
+    ^#className
+!
+
+isMetaSideKey
+
+    ^#isMetaSide
+!
+
+sourcePointerKey 
+
+    ^#sourcePointer
+!
+
+statusKey
+
+    ^#statusKey
+! !
+
+!RGElementDefinition class methodsFor:'parsing stamp'!
+
+basicParseAuthorAliasFrom: aString
+    "Parse an alias/name of the author from a string that is extracted from a source file. If there is no alias/name we return emtpy string."
+
+    | tokens dateStartIndex unknown |
+    "The following timestamp strings are supported (source: squeak sources archeological survey):
+        <authorname><date><time>. 
+        <authorname><date>
+        <date><time>
+        <date><time><authorname>
+        <date><authorname>
+        <historical>
+    All fields can be separated by spaces or line ends but a separator between author alias/name and date can be missing as well"
+    "unknown:= 'unknown'."
+    unknown := nil.
+    aString isEmptyOrNil
+        ifTrue: [ ^ unknown ].
+    dateStartIndex := (aString indexOf: $/) - 1.	"If there is no / character in the timestamp, no author alias/name exists"
+    dateStartIndex = -1
+        ifTrue: [ ^ unknown ].
+    ^ [ 
+    "Go the start of the date string (there can be 1 or 2 digits and a space separator can be missing at the front!!!!)"
+    (dateStartIndex >= 2 and: [ (aString at: dateStartIndex - 1) isDigit ])
+        ifTrue: [ dateStartIndex := dateStartIndex - 1 ].	"Extract only those tokens that do not possible represent date or time - meaning that authorname may be at the end"
+    tokens := (aString copyFrom: dateStartIndex to: aString size) substrings
+        reject: [ :token | (token occurrencesOf: $/) = 2 or: [ (token occurrencesOf: $:) = 1 ] ].	"only one token should be left if author name/alias exists"
+    ^ tokens isEmpty
+        ifTrue: [ 
+            "if dateStartIndex is not 1 then the authorname may be at the beginning"
+            dateStartIndex > 1
+                ifTrue: [ (aString copyFrom: 1 to: dateStartIndex - 1) trimBoth ]
+                ifFalse: [ unknown ] ]
+        ifFalse: [ tokens first ] ]
+        on: Exception
+        do: [ :e | unknown ]
+!
+
+parseAuthorAliasFrom: aString
+    "Allows other applications  to treat a different empty alias by overriding this method"
+    
+    ^self basicParseAuthorAliasFrom: aString
+!
+
+parseTimestampFrom: aString
+    
+    ^self parseTimestampFrom: aString default: nil
+!
+
+parseTimestampFrom: aString default: anObject
+    "Parse a date-time from a timestamp-string that is extracted from a source file. If there is no timestamp, or we cannot make sense of it, we return the default value."
+
+    | tokens dateStartIndex unknown |
+    "The following timestamp strings are supported (source: squeak sources archeological survey):
+        <authorname><date><time>. 
+        <authorname><date>
+        <date><time>
+        <date><time><authorname>
+        <date><authorname>
+        <historical>
+    All fields can be separated by spaces or line ends but a separator between authorname and date can be missing as well"
+    unknown := anObject.
+    aString isEmptyOrNil
+        ifTrue: [ ^ unknown ].
+    dateStartIndex := (aString indexOf: $/) - 1.	"If there is no / character in the timestamp, we cannot parse a date and return the epoch"
+    dateStartIndex = -1
+        ifTrue: [ ^ unknown ].
+    ^ [ 
+    "Go the start of the date string (there can be 1 or 2 digits and a space separator can be missing at the front!!!!)"
+    (dateStartIndex >= 2 and: [ (aString at: dateStartIndex - 1) isDigit ])
+        ifTrue: [ dateStartIndex := dateStartIndex - 1 ].	"Extract only those tokens that possibly represent date or time"
+    tokens := (aString copyFrom: dateStartIndex to: aString size) substrings
+        select: [ :token | (token occurrencesOf: $/) = 2 or: [ (token occurrencesOf: $:) = 1 ] ].	"2 tokens is a datetime"
+    tokens size = 2
+        ifTrue: [ (tokens joinUsing: Character space) asDateAndTime ]
+        ifFalse: [ tokens first asDate asDateAndTime ] ]
+        on: Exception
+        do: [ :e | unknown ]
+! !
+
+!RGElementDefinition methodsFor:'accessing'!
+
+fullName: aString
+
+    ^ self annotationNamed: self class fullNameKey put: aString asSymbol
+!
+
+isMetaSide
+    "Even thought several class elements do not define this property (ie. class variables, pool variables) they understand it"
+    "This is a derived property from the class definining the receiver and thus its value is kept as an annotation"
+    "Default value is false"
+
+    ^self annotationNamed: self class isMetaSideKey ifAbsentPut: [ false ]
+!
+
+isMetaSide: aBoolean
+
+    self annotationNamed: self class isMetaSideKey put: aBoolean
+!
+
+package
+    ^self parent package 
+! !
+
+!RGElementDefinition methodsFor:'backward compatibility'!
+
+actualClass
+    "returns the Smalltalk class of the receiver"
+    
+    ^ self realClass
+! !
+
+!RGElementDefinition methodsFor:'class element specific api'!
+
+className
+    
+    ^ self parentName
+!
+
+className: aName
+    
+    ^ self parentName: aName
+!
+
+realClass
+    "Retrieves the Class/Trait/.. object in the System corresponding to the class of the this element."
+    
+    ^ self realParent
+!
+
+ringClass
+    "Return the ring definition of the class containing the receiver."
+    
+    ^ self parent
+!
+
+theNonMetaClassName
+
+    ^self theNonMetaParentName 
+! !
+
+!RGElementDefinition methodsFor:'comparing'!
+
+= aRGElementDefinition
+    "This method look for equality of the properties of the receiver"
+    "Verifies the class and the parentName of the receiver"
+
+    ^self class = aRGElementDefinition class
+        and:[ self parentName == aRGElementDefinition parentName 
+            and:[ self isMetaSide = aRGElementDefinition isMetaSide ] ]
+!
+
+hash
+    "Hash is re-implemented because #= is re-implemented"
+    
+    ^self class hash bitXor: (self parentName hash bitXor: self isMetaSide hash)
+! !
+
+!RGElementDefinition methodsFor:'generic parent api'!
+
+parent
+    "The parent of a class definition element: method, comment and variable is the class definition. This method retrieves the class that defines such element"
+    
+    ^ parent
+!
+
+parent: aRGBehaviorDefinition
+    "Set the class associated to the receiver"
+
+    parent := aRGBehaviorDefinition.
+    self setParentInfo: aRGBehaviorDefinition.
+!
+
+parentName
+    "Retrieves the name of the class defining the receiver. Its value is kept as an annotation"
+
+    ^ self annotationNamed: self class classNameKey
+!
+
+parentName: aString
+
+    self annotationNamed: self class classNameKey put: aString asSymbol
+!
+
+realParent
+    "Retrieves the Class/Trait/.. object in the System corresponding to the class of the this element."
+    
+    ^self parent notNil
+        ifTrue: [ self parent realClass ]
+        ifFalse: [ self rootEnvironment classNamed: self parentName ]
+!
+
+theNonMetaParentName
+    "Rejects the prefix ' class' or ' classTrait' of the parentName"
+    | index |
+    
+    index := self parentName
+                indexOfSubCollection: ' class'
+                startingAt: 1
+                ifAbsent: [ ^self parentName ].
+
+    ^(self parentName 
+        copyFrom: 1
+        to: index - 1) asSymbol
+! !
+
+!RGElementDefinition methodsFor:'private'!
+
+setParentInfo: anObject
+    "anObject is aRGBehaviorDefinition or aClass/aTrait"
+
+    self parentName: anObject name. 
+    self isMetaSide: anObject isMeta
+! !
+
+!RGElementDefinition methodsFor:'testing'!
+
+isDefined
+    "isDefined when the receiver has its realClass defined in the system"
+
+    ^self realClass notNil
+!
+
+isSameRevisionAs: aRGElementDefinition
+    "This method look for equality of the properties of the receiver"
+    "Verifies the class and the parentName of the receiver"
+
+    ^self class = aRGElementDefinition class
+        and:[ self parentName == aRGElementDefinition parentName ]
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/RGGlobalDefinition.st	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,38 @@
+"{ Package: 'stx:goodies/ring' }"
+
+"{ NameSpace: Smalltalk }"
+
+RGDefinition subclass:#RGGlobalDefinition
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Ring-Core-Kernel'
+!
+
+RGGlobalDefinition comment:'An RGGlobalDefinition is an abstract superclass for representing classes, global variables and shared pools
'
+!
+
+!RGGlobalDefinition methodsFor:'accessing'!
+
+parent
+    "Retrieves the namespace in which the receiver is known"
+    
+    ^self environment
+! !
+
+!RGGlobalDefinition methodsFor:'comparing'!
+
+= aRGGlobalDefinition
+    "This method look for equality of the properties of the receiver"
+    "Verifies the class and the name of the receiver"
+
+    ^self class = aRGGlobalDefinition class
+        and:[ self name == aRGGlobalDefinition name ]
+!
+
+hash
+    "Hash is re-implemented because #= is re-implemented"
+    
+    ^self class hash bitXor: (self name hash)
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/RGGlobalVariableDefinition.st	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,56 @@
+"{ Package: 'stx:goodies/ring' }"
+
+"{ NameSpace: Smalltalk }"
+
+RGGlobalDefinition subclass:#RGGlobalVariableDefinition
+	instanceVariableNames:'value'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Ring-Core-Kernel'
+!
+
+RGGlobalVariableDefinition comment:'A global variable definition'
+!
+
+!RGGlobalVariableDefinition methodsFor:'accessing'!
+
+value
+    "Retrieves the current value of the global variable"
+
+    ^ value
+!
+
+value: anObject
+
+    value := anObject
+! !
+
+!RGGlobalVariableDefinition methodsFor:'managing container'!
+
+addInContainer: aRGContainer
+
+    aRGContainer addGlobalVariable: self
+!
+
+isIncludedInContainer: aRGContainer
+
+    ^aRGContainer includesGlobalVariable: self
+!
+
+removeFromContainer: aRGContainer
+
+    aRGContainer removeGlobalVariable: self
+! !
+
+!RGGlobalVariableDefinition methodsFor:'testing'!
+
+isGlobalVariable
+
+    ^true
+!
+
+isVariable
+
+    ^true
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/RGInstanceVariableDefinition.st	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,21 @@
+"{ Package: 'stx:goodies/ring' }"
+
+"{ NameSpace: Smalltalk }"
+
+RGVariableDefinition subclass:#RGInstanceVariableDefinition
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Ring-Core-Kernel'
+!
+
+RGInstanceVariableDefinition comment:'An instance variable definition'
+!
+
+!RGInstanceVariableDefinition methodsFor:'testing'!
+
+isInstanceVariable
+
+    ^true
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/RGMetaclassDefinition.st	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,98 @@
+"{ Package: 'stx:goodies/ring' }"
+
+"{ NameSpace: Smalltalk }"
+
+RGClassDescriptionDefinition subclass:#RGMetaclassDefinition
+	instanceVariableNames:'baseClass'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Ring-Core-Kernel'
+!
+
+RGMetaclassDefinition comment:'RGMetaclassDefinition is a concrete representation of metaclasses of classes (traits are excluded)'
+!
+
+!RGMetaclassDefinition class methodsFor:'class initialization'!
+
+class: anORClassDefinition
+
+    ^self new
+        baseClass: anORClassDefinition;
+        yourself
+! !
+
+!RGMetaclassDefinition methodsFor:'accessing'!
+
+baseClass: aRGClassDefinition
+
+    baseClass:= aRGClassDefinition.
+    self name: (baseClass name, ' class') asSymbol
+!
+
+category
+    ^ self theNonMetaClass category
+!
+
+environment
+
+    ^baseClass environment
+!
+
+package
+
+    ^baseClass package
+!
+
+realClass
+
+    ^baseClass realClass theMetaClass
+!
+
+theMetaClass
+
+    ^self
+!
+
+theNonMetaClass
+
+    ^baseClass
+! !
+
+!RGMetaclassDefinition methodsFor:'printing'!
+
+storeOn: aStream
+    
+    aStream nextPut: $(. 
+    super storeOn: aStream.
+    aStream nextPutAll: ' baseClass:'.
+    self theNonMetaClass storeOn: aStream.
+    aStream nextPut: $).
+    
+! !
+
+!RGMetaclassDefinition methodsFor:'testing'!
+
+isMeta
+
+    ^true
+!
+
+isSameRevisionAs: aRGMetaclassDefinition
+    "This method look for equality of the properties of the receiver"
+
+    ^(super isSameRevisionAs: aRGMetaclassDefinition)
+        and:[ self traitCompositionSource = aRGMetaclassDefinition traitCompositionSource ]
+! !
+
+!RGMetaclassDefinition methodsFor:'variables'!
+
+allClassVarNames
+
+    ^self theNonMetaClass allClassVarNames
+!
+
+allSharedPoolNames
+
+    ^self theNonMetaClass allSharedPoolNames
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/RGMetatraitDefinition.st	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,74 @@
+"{ Package: 'stx:goodies/ring' }"
+
+"{ NameSpace: Smalltalk }"
+
+RGTraitDescriptionDefinition subclass:#RGMetatraitDefinition
+	instanceVariableNames:'baseClass'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Ring-Core-Kernel'
+!
+
+RGMetatraitDefinition comment:'RGMetatraitDefinition is a concrete representation of metaclasses of traits'
+!
+
+!RGMetatraitDefinition class methodsFor:'class initialization'!
+
+class: anORTraitDefinition
+
+    ^self new
+        baseClass: anORTraitDefinition;
+        yourself
+! !
+
+!RGMetatraitDefinition methodsFor:'accessing'!
+
+baseClass: anRGTraitDefinition
+
+    baseClass:= anRGTraitDefinition.
+    self name: (baseClass name, ' classTrait') asSymbol
+!
+
+category
+    ^ self theNonMetaClass category
+!
+
+environment
+
+    ^baseClass environment
+!
+
+package
+
+    ^baseClass package
+!
+
+realClass
+
+    ^baseClass realClass theMetaClass
+!
+
+theMetaClass
+
+    ^self
+!
+
+theNonMetaClass
+
+    ^baseClass
+! !
+
+!RGMetatraitDefinition methodsFor:'testing'!
+
+isMeta
+
+    ^true
+!
+
+isSameRevisionAs: aRGMetatraitDefinition
+    "This method look for equality of the properties of the receiver"
+
+    ^(super isSameRevisionAs: aRGMetatraitDefinition)
+        and: [ self traitCompositionSource = aRGMetatraitDefinition traitCompositionSource ]
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/RGMethodDefinition.st	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,492 @@
+"{ Package: 'stx:goodies/ring' }"
+
+"{ NameSpace: Smalltalk }"
+
+RGElementDefinition subclass:#RGMethodDefinition
+	instanceVariableNames:'protocol sourceCode stamp package'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Ring-Core-Kernel'
+!
+
+RGMethodDefinition comment:'RGMethodDefinition is a concrete representation of methods. It can be used to build browser for methods that are not in the image. It is polymorphic with CompiledMethod. 

* We can ask a RGMethodDefinition for its selector using the selector message.
Example:
	(Point>>#dist:) asRingDefinition selector
		-> #dist

We can also ask the ring object representation of its class or the Smalltalk class actually implementing the corresponding compiledMethod. 

* To access the ring class definition name, use parentName
	aRGMethodDefinition parentName
	
Example:
	(Point>>#dist:) asRingDefinition parentName
		->  #Point
		
* If you have a complete model where classes and methods are ring definition, to access the ring class definition , use parent
	aRGMethodDefinition parent
	
Example:
	aRGMethodDefinition(Point>>#dist:) parent
		->  aRGClassDefinition(Point)
		
* If you want to access the smalltalk class that contains the compiledMethod that is represented by a ringMethodDefinition, use realParent
	aRGMethodDefinition realParent
	
Example:
	(Point>>#dist:) asRingDefinition realParent
		->  Point
		

Now a RingEntityDefinition offers two APIs: one that is generic and works for all the source code entities and this is the one we just 
presented: parent, parentName and realParent. Having such interface is important to build generic tools that could manipulate 
any entities in a polymorphic way (yes no isKindOf: everywhere).

In addition, a ring method definition offers a specific interface that should only be used when you know that you are solely manipulate
specific entity such as class element: method definition, class comment, and variables. 

Here is the equivalence table

	realParent 				realClass
	parent					ringClass
	parentName			className


* The message class returns the class of the object :).

Example:
	(Point>>#dist:) asRingDefinition class
		->  RingMethodDefinition
		
* The message className returns the name of the ring class defining the reingMethodDefinition.

Example:
	(Point>>#dist:) asRingDefinition className
		->  #Point		
		
* If you have a complete model where classes and methods are ring definition, to access the ring class definition , use parent
	aRGMethodDefinition ringClass
	
Example:
	aRGMethodDefinition(Point>>#dist:) ringClass
		->  aRGClassDefinition(Point)
		
		
* If you want to access the smalltalk class that contains the compiledMethod that is represented by a ringMethodDefinition, use realClass
	aRGMethodDefinition realClass
	
Example:
	(Point>>#dist:) asRingDefinition realClass
		->  Point

'
+!
+
+!RGMethodDefinition class methodsFor:'instance creation'!
+
+class: aRGBehaviorDefinition selector: aString
+    "Create a ring method definition from a ring class and a selector"
+
+    ^(self class: aRGBehaviorDefinition)
+        selector: aString asSymbol;
+        yourself
+!
+
+className: aString selector: aSelector isMetaSide: aBoolean
+
+    ^ (self class: (RGClassDefinition named: aString) selector: aSelector) isMetaSide: aBoolean; yourself
+!
+
+realClass: aClass selector: aString
+    "Creates a ring method definition from a Smalltalk class and a selector <compiledMethod>"
+
+    ^(aClass>>aString asSymbol) asActiveRingDefinition
+! !
+
+!RGMethodDefinition class methodsFor:'categories'!
+
+unclassifiedProtocolName
+    "Return the string labeling the unclassified protocol."
+
+    ^ 'as yet unclassified'
+! !
+
+!RGMethodDefinition class methodsFor:'elements-annotations'!
+
+isExtensionKey 
+
+    ^#isExtension
+! !
+
+!RGMethodDefinition methodsFor:'accessing'!
+
+ast
+    ^ self compiledMethod ast 
+!
+
+compiledMethod
+    "Retrieves the compiled method of this definition if exists"
+    
+    | rClass |
+    (rClass := self realClass) notNil
+        ifTrue: [ (rClass includesSelector: self selector)
+            ifTrue: [ ^rClass >> self selector ] ].
+            
+    ^nil
+!
+
+fullName
+    "Keeps a unique description for the receiver. As annotation to avoid converting each time is invoked"
+    
+    ^self annotationNamed: self class fullNameKey
+        ifAbsentPut: [ (self parentName, '>>', self selector) asSymbol ]
+!
+
+isExtension
+    "The receiver is an extension when is defined in a different package to the one of its parent.
+    Ring allows to set this property. If not assigned tries to find its value "
+    
+    ^self 
+        annotationNamed: self class isExtensionKey
+        ifAbsent: [  
+            (self parent notNil and:[ self package notNil ])
+                ifTrue: [ | value |
+                           value :=  self parent package ~= self package.
+                         self annotationNamed: self class isExtensionKey put: value.
+                         value ]
+                ifFalse: [ self protocol ifNil:[ false ] ifNotNil:[ :prot|  prot beginsWith: '*' ] ] ]
+!
+
+isExtension: aBoolean
+    "Explicitily set that the receiver is an extension"
+    
+    self annotationNamed: self class isExtensionKey put: aBoolean 
+!
+
+origin
+    "Return the real oring of this method."
+    ^ self compiledMethod 
+        ifNil: [ self methodClass ]
+        ifNotNil: [ :compileMethod| compileMethod origin ]
+!
+
+package
+    "Retrieves the package in which this class is contained, if exists"
+    
+    ^package
+!
+
+package: aRGPackage
+
+    package:= aRGPackage
+!
+
+protocol
+
+    self isActive 
+        ifTrue: [ ^ self compiledMethod ifNil: [ protocol ] ifNotNil: [ self compiledMethod protocol ]].
+    self isHistorical
+        ifTrue: [ ^ self protocolAtPointer ifNil: [ self compiledMethod ifNil: [ protocol ] ifNotNil:[ :cm | cm protocol ] ] ].
+    ^ protocol			
+!
+
+protocol: anObject
+
+    protocol := anObject
+!
+
+selector
+    "Retrieves the name of the method"
+
+    ^name
+!
+
+selector: aSymbol
+    "The name of a method is known as #selector"
+
+    name := aSymbol
+!
+
+sourceCode
+
+    self isActive 
+        ifTrue: [ ^ self compiledMethod ifNil:[ sourceCode ] ifNotNil: [ self compiledMethod sourceCode ]].
+    self isHistorical
+        ifTrue: [ ^ self sourceCodeAtPointer ifNil:[ self compiledMethod ifNil:[ sourceCode ] ifNotNil:[ :cm| cm sourceCode ] ] ].	
+    ^ sourceCode
+!
+
+sourceCode: anObject
+
+    sourceCode := anObject
+!
+
+stamp
+
+    self isActive 
+        ifTrue: [ ^ self compiledMethod timeStamp ].
+    self isHistorical
+        ifTrue: [ ^ self stampAtPointer ifNil:[ self compiledMethod ifNil:[ stamp ] ifNotNil:[ :cm| cm timeStamp ] ] ].
+    ^ stamp
+!
+
+stamp: anObject
+    "stores an author alias and a timestamp"
+    
+    stamp := anObject
+! !
+
+!RGMethodDefinition methodsFor:'backward compatibility'!
+
+category
+
+    ^ self protocol
+!
+
+messages
+
+    ^ self method messages
+!
+
+method
+
+    ^self compiledMethod
+!
+
+methodClass
+    "Return the class to which the receiver belongs to."
+    
+    ^ self realClass
+!
+
+symbolic
+
+    ^ self method symbolic
+! !
+
+!RGMethodDefinition methodsFor:'comparing'!
+
+<= aRGMethodDefinition
+    "Sort method definitions according to: 1. class name - 2. class comment - 3. method selector - 4. timestamp"
+
+    self parentName < aRGMethodDefinition parentName ifTrue: [^true].
+    self parentName > aRGMethodDefinition parentName ifTrue: [^false].
+
+    self flag: 'This ugly test is needed right now because the old system is used to represent 
+    class comment as method with Comment selector. And to mix comment and methods'.
+    aRGMethodDefinition isComment ifTrue: [^false].
+    
+    ^(self selector < aRGMethodDefinition selector) 
+ 		  or: [ (self selector == aRGMethodDefinition selector) and: [
+    			  self timeStamp <= aRGMethodDefinition timeStamp ]]
+!
+
+= aRGMethodDefinition
+    "This method look for equality of the key properties of the receiver"
+
+
+    ^(super = aRGMethodDefinition)
+        and: [ self selector == aRGMethodDefinition selector]
+!
+
+hash
+
+    ^super hash bitXor: self selector hash
+! !
+
+!RGMethodDefinition methodsFor:'managing container'!
+
+addInContainer: aRGContainer
+
+    aRGContainer addMethod: self
+    
+!
+
+isIncludedInContainer: aRGContainer
+
+    ^aRGContainer includesMethod: self
+!
+
+removeFromContainer: aRGContainer
+
+    aRGContainer removeMethod: self
+! !
+
+!RGMethodDefinition methodsFor:'metrics'!
+
+numberOfLinesOfCode
+
+    ^ self annotationNamed: #numberOfLinesOfCode ifAbsentPut: [ self sourceCode lineCount ]
+! !
+
+!RGMethodDefinition methodsFor:'operations'!
+
+recompile
+    self method recompile
+! !
+
+!RGMethodDefinition methodsFor:'printing'!
+
+printOn: aStream 
+
+    self parentName ifNotNil: [
+        aStream nextPutAll: self parentName;
+                  nextPutAll: '>>' ].
+    aStream print: self selector
+! !
+
+!RGMethodDefinition methodsFor:'source pointers'!
+
+getPreambleFrom: aFileStream at: position
+    ^ SourceFiles getPreambleFrom: aFileStream at: position
+!
+
+protocolAtPointer
+
+    "A RGMethodDefinition that was set as historical will retrieve the protocol using the sourcePointer"
+
+    ^ self sourcePointer notNil
+        ifTrue: [ SourceFiles protocolAt: self sourcePointer ]
+        ifFalse:[ nil ]
+!
+
+sourceCodeAtPointer
+
+    "A RGMethodDefinition that was set as historical will retrieve the sourceCode using the sourcePointer"
+
+    ^ self sourcePointer notNil
+        ifTrue: [ SourceFiles sourceCodeAt: self sourcePointer ]
+        ifFalse:[ nil ]
+!
+
+sourcePointer
+    "Retrieves the sourcePointer for this definition if exists"
+    
+    ^self annotationNamed:  self class sourcePointerKey   
+!
+
+sourcePointer: aNumber
+
+    self annotationNamed:  self class sourcePointerKey put: aNumber 
+!
+
+stampAtPointer	
+
+    "A RGMethodDefinition that was set as historical will retrieve the stamp using the sourcePointer"
+
+    ^ self sourcePointer notNil
+        ifTrue: [ SourceFiles timeStampAt: self sourcePointer ]
+        ifFalse:[ nil ]
+! !
+
+!RGMethodDefinition methodsFor:'stamp values'!
+
+author 
+
+    ^self 
+        annotationNamed: self class authorKey
+        ifAbsentPut: [ self class parseAuthorAliasFrom: self stamp ]
+!
+
+author: aString 
+
+    self annotationNamed: self class authorKey put: aString 
+!
+
+timeStamp 
+
+    ^self annotationNamed: self class timeStampKey 
+        ifAbsentPut: [ self class 
+                            parseTimestampFrom: self stamp 
+                            default: (DateAndTime epoch) ]
+!
+
+timeStamp: aTimestamp 
+
+    self annotationNamed: self class timeStampKey put: aTimestamp 
+! !
+
+!RGMethodDefinition methodsFor:'testing'!
+
+hasStamp
+
+    ^stamp isEmptyOrNil not
+!
+
+isAbstract
+    ^ self compiledMethod isAbstract
+!
+
+isDefined
+    "Answer whether the receiver exists in the environment"
+    
+    | rClass |
+    self selector isDoIt ifTrue:[ ^false ].
+    rClass := self realClass.
+    ^rClass notNil and: [ rClass includesSelector: self selector ]
+!
+
+isFromTrait
+
+    "Return true for methods that have been included from Traits"
+    ^ self origin isTrait and: [ self origin ~= self methodClass ]
+!
+
+isLocalSelector
+    "Answer whether the receiver exists in the environment as a local implementation"
+    
+    | rClass |
+    rClass:= self realClass.
+    ^rClass notNil and: [ rClass includesLocalSelector: self selector ]
+!
+
+isMethod
+
+    ^true
+!
+
+isOverridden
+    ^ self compiledMethod isOverridden
+!
+
+isSameRevisionAs: aRGMethodDefinition
+    "This method look for equality of the properties of the receiver"
+    "Stamp is ignored as in many cases a method is saved without containing any change. However it appears as changed due to a different stamp"
+    self flag: 'needs to be evaluated'.
+
+    ^(super isSameRevisionAs: aRGMethodDefinition)
+        and: [ self selector = aRGMethodDefinition selector 
+            and: [ self protocol = aRGMethodDefinition protocol
+                and: [ self sourceCode = aRGMethodDefinition sourceCode ] ] ]
+! !
+
+!RGMethodDefinition methodsFor:'to remove as soon as possible'!
+
+classIsMeta
+
+    ^self isMetaSide
+!
+
+isValid
+    "verifies that the receiver is locally defined in the class and that is not a DoIt"
+
+    ^self isDefined
+! !
+
+!RGMethodDefinition methodsFor:'traits'!
+
+argumentNames
+    "Return an array with the argument names of the method's selector"
+
+    ^ self compiledMethod argumentNames
+!
+
+isBinarySelector
+    ^self selector
+        allSatisfy: [:each | each isSpecial]
+! !
+
+!RGMethodDefinition methodsFor:'type of methods'!
+
+asActive
+
+    "Sets the receiver as active object, which will allow itself to retrieve its data from the compiled method"
+    self annotationNamed: self class statusKey put: #active
+!
+
+asHistorical
+
+    "Sets the receiver as historical object, which will allow itself to retrieve its data using the sourcePointer"
+    self annotationNamed: self class statusKey put: #historical.
+    self sourcePointer ifNil:[ | pointer compiledMethod |
+        pointer := 0.
+        compiledMethod := self compiledMethod.
+        compiledMethod notNil ifTrue: [
+            pointer := compiledMethod sourcePointer ].
+        pointer isZero
+            ifFalse:[ self sourcePointer: pointer ] ]
+!
+
+asPassive
+
+    "Sets the receiver as passive object, which will allow itself to retrieve its data that was assigned in its creation"
+    self annotationNamed: self class statusKey put: #passive
+!
+
+fromActiveToHistorical
+    "If the receiver was generated as an active method, it can be converted to a historical one by reading the data of the compiled method (if exists)"
+    
+    self isActive ifTrue: [
+        self asHistorical ]
+!
+
+fromActiveToPassive
+    "If the receiver was generated as an active method, it can be converted to a passive one by reading the data of the compiled method (if exists)"
+
+    | compiledMethod |
+    self isActive
+        ifFalse: [ ^ self ].
+    compiledMethod := self compiledMethod.
+    compiledMethod notNil
+        ifTrue: [ 
+            self protocol: compiledMethod category.
+            self sourceCode: compiledMethod sourceCode.
+            self stamp: compiledMethod timeStamp ].
+    self asPassive
+!
+
+isActive
+
+    "A ring method isActive when it needs to access the compiledMethod for retrieving its data"
+    ^(self annotationNamed: self class statusKey) 
+        ifNil:[ false ] 
+        ifNotNil:[ :status| status == #active ]
+!
+
+isHistorical
+
+    "A ring method can be used to point an old version of the receiver, in this case it will use the sourcePointer to retrieve its information"
+    ^(self annotationNamed: self class statusKey) 
+        ifNil:[ false ] 
+        ifNotNil:[ :status| status == #historical ]
+!
+
+isPassive
+
+    "A ring method isPassive when it retrieves the data that was assigned in its creation.
+    By default is passive"
+    ^(self annotationNamed: self class statusKey) 
+        ifNil:[ true ] 
+        ifNotNil:[ :status| status == #passive ]
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/RGNamespace.st	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,156 @@
+"{ Package: 'stx:goodies/ring' }"
+
+"{ NameSpace: Smalltalk }"
+
+RGContainer subclass:#RGNamespace
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Ring-Core-Containers'
+!
+
+RGNamespace comment:'A namespace is a container that in addition to managing classes and methods, it also knows how to treat pools and global variables'
+!
+
+!RGNamespace methodsFor:'accessing global variables'!
+
+globalVariableNamed: globalVariableName
+
+    ^self elementNamed: globalVariableName in: self globalVariables
+!
+
+globalVariables
+    "retrieves global variables"
+
+    ^self elementsCategorized: #globalVariables
+!
+
+globalVariables: aCollection
+
+    self elementsCategorized: #globalVariables with: aCollection
+! !
+
+!RGNamespace methodsFor:'accessing pools'!
+
+poolNamed: poolName
+
+    ^self elementNamed: poolName in: self pools
+!
+
+pools
+    "retrieves the shares pools"
+
+    ^self elementsCategorized: #pools
+!
+
+pools: aCollection
+
+    self elementsCategorized: #pools with: aCollection
+! !
+
+!RGNamespace methodsFor:'adding elements'!
+
+addElement: anObject in: aCollection
+
+    anObject environment: self.
+    super addElement: anObject in: aCollection
+!
+
+addGlobalVariable: anORGlobalVariableDefinition
+    "adds anORGlobalVariableDefinition to the globals dictionary if satisfies it #isGlobalVariable"
+
+    anORGlobalVariableDefinition isGlobalVariable ifFalse:[ ^self ].
+    self addElement: anORGlobalVariableDefinition in: self globalVariables
+!
+
+addGlobalVariableNamed: globalVariableName
+    "creates a RGGlobalVariableDefinition with the given name.
+    It's verified that a pool with that name does not exist"
+
+    (self includesGlobalVariableNamed: globalVariableName) ifTrue: [ ^self ].
+    self addGlobalVariable: (RGGlobalVariableDefinition named: globalVariableName).
+!
+
+addPool: anORPoolDefinition
+    "adds anORPoolDefinition to the pools dictionary if satisfies it #isPool"
+
+    anORPoolDefinition isPool ifFalse:[ ^self ].
+    self addElement: anORPoolDefinition in: self pools
+!
+
+addPoolNamed: poolName
+    "creates a RGPoolDefinition with the given name.
+    It's verified that a pool with that name does not exist"
+    | pool |
+
+    (self includesPoolNamed: poolName) ifTrue: [ ^self ].
+    "A shared pool is a class inheriting from #SharedPool"
+    pool := (RGClassDefinition named: poolName)
+            superclassName: #SharedPool;
+            isPool: true;
+            yourself.
+    self addPool: pool.
+! !
+
+!RGNamespace methodsFor:'initialization'!
+
+initialize
+
+    super initialize.
+    self globalVariables: IdentityDictionary new.
+    self pools: IdentityDictionary new.
+! !
+
+!RGNamespace methodsFor:'removing elements'!
+
+removeGlobalVariable: anORGlobalVariableDefinition
+    "removes anORGlobalVariableDefinition from the globals dictionary if satisfies it #isGlobalVariable"
+
+    anORGlobalVariableDefinition isGlobalVariable ifFalse:[ ^self ].
+    self removeElement: anORGlobalVariableDefinition from: self globalVariables
+!
+
+removePool: anORPoolDefinition
+    "removes anORPoolDefinition from the pools dictionary if satisfies it #isPool"
+
+    anORPoolDefinition isPool ifFalse:[ ^self ].
+    self removeElement: anORPoolDefinition from: self pools
+!
+
+withoutGlobalVariables
+
+    self removeElementsCategorized: #globalVariables
+!
+
+withoutPools
+
+    self removeElementsCategorized: #pools
+! !
+
+!RGNamespace methodsFor:'testing'!
+
+includesGlobalVariable: anORGlobalVariableDefinition
+
+    ^self globalVariables includes: anORGlobalVariableDefinition
+!
+
+includesGlobalVariableNamed: globalVariableName
+    
+    ^self includesElementNamed: globalVariableName in: self globalVariables
+!
+
+includesPool: anORPoolDefinition
+
+    ^self pools includes: anORPoolDefinition
+!
+
+includesPoolNamed: poolName
+    
+    ^self includesElementNamed: poolName in: self pools
+!
+
+isNamespace
+
+    ^true
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/RGOrganization.st	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,55 @@
+"{ Package: 'stx:goodies/ring' }"
+
+"{ NameSpace: Smalltalk }"
+
+RGAbstractContainer subclass:#RGOrganization
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Ring-Core-Containers'
+!
+
+RGOrganization comment:'An organization with categories'
+!
+
+!RGOrganization methodsFor:'accessing'!
+
+categories
+    "Retrieves categories in the system (tag-packages)"
+
+    ^self elements at: #categories ifAbsent:[ #() ]
+!
+
+categories: aCollection
+    "Set the categories collection"
+
+    self elements at: #categories put: aCollection
+!
+
+fullName
+
+    ^#organization
+! !
+
+!RGOrganization methodsFor:'initialization'!
+
+initialize
+
+    super initialize.
+    self categories: OrderedCollection new.
+! !
+
+!RGOrganization methodsFor:'testing'!
+
+isOrganization
+
+    ^true
+!
+
+isSameRevisionAs: aRGOrganization
+    "This method look for equality of the properties of the receiver"
+
+    ^(self class = aRGOrganization class)
+        and:[ self categories = aRGOrganization categories ]
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/RGPackage.st	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,229 @@
+"{ Package: 'stx:goodies/ring' }"
+
+"{ NameSpace: Smalltalk }"
+
+RGContainer subclass:#RGPackage
+	instanceVariableNames:'package'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Ring-Core-Containers'
+!
+
+RGPackage comment:'RGPackage is the representation for packages.
A package manages classes, methods and children packages as elements.
A package can also know in which package is defined
'
+!
+
+!RGPackage methodsFor:'accessing'!
+
+categories
+    "Retrieves class categories of the receiver"
+    
+    ^self elements at: #categories
+!
+
+categories: aCollection
+    "Set the class categories collection"
+    
+    self elements at: #categories put: (aCollection asOrderedCollection)
+!
+
+classNames
+
+    ^ self classes isDictionary
+        ifTrue: [ self classes keys ]
+        ifFalse:[ self classes collect:[ :class|  class name ] ]	
+!
+
+classes
+    "Retrieves a collection (by default a dictionary) of classes defined in the receiver and classes holding extension methods"
+    
+    ^self definedClasses, self extendedClasses 
+!
+
+definedClassNames
+
+    ^ super classNames
+!
+
+definedTraits
+    "Retrieves the traits defined in the receiver"
+
+    ^self traits
+!
+
+extendedClassNames
+
+    ^ self extendedClasses isDictionary
+        ifTrue: [ self extendedClasses keys ]
+        ifFalse:[ self extendedClasses collect:[ :each| each name ]]
+!
+
+extendedClasses
+    "Retrieves the classes holding the extension methods and returns a dictionary as well"
+    |  classesOfExt |
+    classesOfExt := Dictionary new.
+    
+    self extensionMethods
+        do:[ :mth| (classesOfExt includesKey: mth parentName)
+                    ifFalse:[ classesOfExt at: mth parentName put: mth parent ] ].
+    
+    ^classesOfExt
+!
+
+extendedSelectors
+    "Retrieves the names of the methods"
+    
+    ^ self extensionMethods keys
+!
+
+extensionMethods
+    "Retrieves extension methods"
+    
+    ^self elements at: #extensionMethods
+!
+
+extensionMethods: aCollection
+    "Set the extension methods collection"
+    
+    self elements at: #extensionMethods put: aCollection
+!
+
+methods
+    "Retrieves all the methods defined in the receiver. 
+    #methods holds the methods of defined classes"
+    
+    ^super methods, self extensionMethods 
+!
+
+package
+    "Retrieves the  package in which self is contained"
+
+    ^package
+!
+
+package: aRGPackage
+    "Sets the outer package of the receiver if exists"
+
+    package:= aRGPackage
+!
+
+parent
+    "Retrieves the environment linked to this package"
+    
+    ^self environment
+! !
+
+!RGPackage methodsFor:'adding/removing'!
+
+addElement: aRGDefinition in: aCollection
+
+    aRGDefinition package: self.
+    super addElement: aRGDefinition in: aCollection.
+!
+
+addMethod: aRGMethodDefinition
+    "aRGMethodDefinition needs to satisfy the status isMethod"
+
+    aRGMethodDefinition isMethod ifFalse:[ ^self ].
+    aRGMethodDefinition package: self.	"Needed to evaluate #isExtension if it was not set in advance"
+    self 
+        addElement: aRGMethodDefinition 
+        in: (aRGMethodDefinition isExtension 
+            ifTrue: [ self extensionMethods ]
+            ifFalse:[ super methods ])
+!
+
+removeMethod: aRGMethodDefinition
+
+    self 
+        removeElement: aRGMethodDefinition 
+        from: (aRGMethodDefinition isExtension 
+                ifTrue: [ self extensionMethods ]
+                ifFalse:[ super methods ])
+!
+
+withoutCategories
+
+    self removeElementsCategorized: #categories
+! !
+
+!RGPackage methodsFor:'initialization'!
+
+initialize
+
+    super initialize.
+    self withoutPackages.	"By default the receiver has no child packages"
+    self extensionMethods: IdentityDictionary new.		
+    self categories: OrderedCollection new.
+! !
+
+!RGPackage methodsFor:'lookup'!
+
+lookupClassNamed: className
+    "Look for the class named className in the receiver's defined classes or in any of its package children"
+    | class |
+    
+    class:= self classNamed: className.
+    class ifNotNil:[ ^class ].
+    
+    self packages
+        do:[ :each| class:= each lookupClassNamed: className.
+                    class ifNotNil:[ ^class ] ].
+    ^nil
+! !
+
+!RGPackage methodsFor:'managing container'!
+
+addInContainer: anRGContainer
+
+    anRGContainer addPackage: self
+! !
+
+!RGPackage methodsFor:'metrics'!
+
+numberOfLinesOfCode
+    
+    ^ self 
+        annotationNamed: #numberOfLinesOfCode
+        ifAbsentPut: [
+            | number |
+            number := self classes inject: 0 into: [ :sum :each | sum + each numberOfLinesOfCode + each theMetaClass numberOfLinesOfCode ].
+            number := self methods inject: number into: [ :sum :each | sum + each numberOfLinesOfCode ].
+            number ]
+! !
+
+!RGPackage methodsFor:'printing'!
+
+printOn: aStream
+    aStream
+        nextPutAll: self class name;
+        nextPutAll: '(';
+        nextPutAll: self name;
+        nextPutAll: ')'
+! !
+
+!RGPackage methodsFor:'testing'!
+
+definesClass: aRGBehaviorDefinition
+    "Returns true if the receiver includes aRGBehaviorDefinition in the defined classes"
+
+    ^ self includesClass: aRGBehaviorDefinition
+!
+
+definesOrExtendsClass: aRGBehaviorDefinition
+    "Returns true whether the class, aRGBehaviorDefinition, is one locally defined classes of the receiver or 
+    if the receiver extends such class (that is defined in another package)"
+    
+    ^ (self definesClass: aRGBehaviorDefinition) or:[ self extendsClass: aRGBehaviorDefinition ]
+!
+
+extendsClass: aRGBehaviorDefinition
+    "Returns true if the receiver extends aRGBehaviorDefinition (that is defined in another package)"
+    
+    ^ self extendedClasses includes: aRGBehaviorDefinition
+!
+
+isPackage
+
+    ^true
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/RGPoolVariableDefinition.st	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,21 @@
+"{ Package: 'stx:goodies/ring' }"
+
+"{ NameSpace: Smalltalk }"
+
+RGVariableDefinition subclass:#RGPoolVariableDefinition
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Ring-Core-Kernel'
+!
+
+RGPoolVariableDefinition comment:'A pool variable definition'
+!
+
+!RGPoolVariableDefinition methodsFor:'testing'!
+
+isPoolVariable
+
+    ^true
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/RGSlice.st	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,29 @@
+"{ Package: 'stx:goodies/ring' }"
+
+"{ NameSpace: Smalltalk }"
+
+RGContainer subclass:#RGSlice
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Ring-Core-Containers'
+!
+
+RGSlice comment:'A slice is an arbitrary container of elements (working unit)
By inheritance it knows how to treat classes and methods
'
+!
+
+!RGSlice methodsFor:'adding/removing'!
+
+addElement: aRGDefinition in: aCollection
+
+    aRGDefinition environment: self.
+    super addElement: aRGDefinition in: aCollection
+! !
+
+!RGSlice methodsFor:'testing'!
+
+isSlice
+
+    ^true
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/RGTraitDefinition.st	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,139 @@
+"{ Package: 'stx:goodies/ring' }"
+
+"{ NameSpace: Smalltalk }"
+
+RGTraitDescriptionDefinition subclass:#RGTraitDefinition
+	instanceVariableNames:'metaClass comment category package'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Ring-Core-Kernel'
+!
+
+RGTraitDefinition comment:'RGTraitDefinition is the concrete representation of a trait (no class)'
+!
+
+!RGTraitDefinition methodsFor:'accessing'!
+
+category
+    "Retrieves the tag-package associated to the receiver"
+
+    ^category
+!
+
+category: aSymbol
+
+    category:= aSymbol
+!
+
+classVariables
+
+    ^#()
+!
+
+comment
+    "Retrieves the comment definition object associated to the receiver"
+    
+    ^comment
+!
+
+comment: anObject
+    "Sets a RGCommentDefinition object based on the argument"
+    
+    comment := anObject isRingObject 
+        ifFalse: [ 
+            RGCommentDefinition new
+                parent: self;
+                content: anObject; 
+                yourself ]
+        ifTrue: [anObject ]
+    
+!
+
+instanceVariables
+
+    ^#()
+!
+
+package
+    "Retrieves the package in which this trait is contained"
+    
+    ^package
+!
+
+package: aRGPackage
+    "Sets the package in which this trait is contained"
+    
+    package:= aRGPackage
+!
+
+sharedPools
+
+    ^#()
+!
+
+stamp
+
+    ^self hasComment ifTrue:[ self comment stamp ] ifFalse:[ nil ]
+!
+
+stamp: aString
+
+    self hasComment
+    ifTrue: [ self comment stamp: aString ]
+    ifFalse:[ RGCommentDefinition new
+                         parent: self; 
+                         stamp: aString ]
+!
+
+theMetaClass
+
+    ^metaClass
+!
+
+theNonMetaClass
+
+    ^self
+! !
+
+!RGTraitDefinition methodsFor:'behavior'!
+
+withMetaclass
+    "Registers explicitly the metaclass of a trait"
+
+    metaClass:= RGMetatraitDefinition class: self.
+!
+
+withMetaclass: aRGMetatraitDefinition
+    "Registers explicitly the metaclass of a class"
+
+    metaClass:= aRGMetatraitDefinition.
+    metaClass baseClass: self.  
+! !
+
+!RGTraitDefinition methodsFor:'testing'!
+
+hasComment
+
+    ^comment isEmptyOrNil not
+!
+
+hasMetaclass
+
+    ^metaClass notNil
+!
+
+hasStamp
+
+    ^self stamp isEmptyOrNil not
+!
+
+isSameRevisionAs: aRGTraitDefinition
+    "This method look for equality of the properties of the receiver"
+
+    ^(super isSameRevisionAs: aRGTraitDefinition)
+        and: [ self category = aRGTraitDefinition category 
+        and: [ self traitCompositionSource = aRGTraitDefinition traitCompositionSource 
+        and: [ ((self hasComment and: [ self comment isSameRevisionAs: aRGTraitDefinition comment ]) or:[ self hasComment not ])
+        and: [ (self theMetaClass isSameRevisionAs: aRGTraitDefinition theMetaClass) ] ] ] ]
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/RGTraitDescriptionDefinition.st	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,74 @@
+"{ Package: 'stx:goodies/ring' }"
+
+"{ NameSpace: Smalltalk }"
+
+RGBehaviorDefinition subclass:#RGTraitDescriptionDefinition
+	instanceVariableNames:'users'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Ring-Core-Kernel'
+!
+
+RGTraitDescriptionDefinition comment:'RGTraitDescriptionDefinition is the common parent for traits and metatraits that know their users (ie. classes/metaclasses)'
+!
+
+!RGTraitDescriptionDefinition methodsFor:'accessing'!
+
+traitUsers
+    "Retrieves the receiver's classes and traits"
+    
+    ^users ifNil:[ users := OrderedCollection new ]
+!
+
+traitUsers: aCollection
+
+    users:= aCollection
+!
+
+users
+    "Retrieves the receiver's classes and traits"
+    
+    ^users ifNil:[ users := OrderedCollection new ]
+!
+
+users: aCollection
+
+    users:= aCollection
+! !
+
+!RGTraitDescriptionDefinition methodsFor:'adding/removing users'!
+
+addUser: aRGBehavior
+
+    self users add: aRGBehavior
+!
+
+removeUser: aRGBehavior
+
+    self users remove: aRGBehavior ifAbsent:[]
+! !
+
+!RGTraitDescriptionDefinition methodsFor:'testing'!
+
+isTrait
+
+    ^true
+! !
+
+!RGTraitDescriptionDefinition methodsFor:'variables'!
+
+allClassVarNames
+
+    ^#()
+!
+
+allInstVarNames
+
+    ^#()
+!
+
+allSharedPoolNames
+
+    ^#()
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/RGVariableDefinition.st	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,77 @@
+"{ Package: 'stx:goodies/ring' }"
+
+"{ NameSpace: Smalltalk }"
+
+RGElementDefinition subclass:#RGVariableDefinition
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Ring-Core-Kernel'
+!
+
+RGVariableDefinition comment:'A variable definition'
+!
+
+
+!RGVariableDefinition methodsFor:'accessing'!
+
+environment
+
+    ^ self parent environment 
+!
+
+fullName
+    "Keeps a unique description for the receiver. As annotation to avoid converting each time is invoked"
+    
+    ^self annotationNamed: self class fullNameKey
+        ifAbsentPut:[ (self parentName, '->', self name) asSymbol ]
+! !
+
+!RGVariableDefinition methodsFor:'comparing'!
+
+= aRGVariableDefinition
+    "This variable look for equality of the key properties of the receiver"
+
+    ^(super = aRGVariableDefinition)
+        and:[ self name == aRGVariableDefinition name ]
+!
+
+hash
+
+    ^super hash bitXor: self name hash
+! !
+
+!RGVariableDefinition methodsFor:'testing'!
+
+isClassInstanceVariable
+
+    ^false
+!
+
+isClassVariable
+
+    ^false
+!
+
+isInstanceVariable
+
+    ^false
+!
+
+isPoolVariable
+
+    ^false
+!
+
+isVariable
+
+    ^true
+! !
+
+!RGVariableDefinition class methodsFor:'documentation'!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/abbrev.stc	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,28 @@
+# automagically generated by the project definition
+# this file is needed for stc to be able to compile modules independently.
+# it provides information about a classes filename, category and especially namespace.
+RGDefinition RGDefinition stx:goodies/ring 'Ring-Core-Kernel' 0
+stx_goodies_ring stx_goodies_ring stx:goodies/ring '* Projects & Packages *' 3
+RGAbstractContainer RGAbstractContainer stx:goodies/ring 'Ring-Core-Containers' 0
+RGElementDefinition RGElementDefinition stx:goodies/ring 'Ring-Core-Kernel' 0
+RGGlobalDefinition RGGlobalDefinition stx:goodies/ring 'Ring-Core-Kernel' 0
+RGBehaviorDefinition RGBehaviorDefinition stx:goodies/ring 'Ring-Core-Kernel' 0
+RGCommentDefinition RGCommentDefinition stx:goodies/ring 'Ring-Core-Kernel' 0
+RGContainer RGContainer stx:goodies/ring 'Ring-Core-Containers' 0
+RGGlobalVariableDefinition RGGlobalVariableDefinition stx:goodies/ring 'Ring-Core-Kernel' 0
+RGMethodDefinition RGMethodDefinition stx:goodies/ring 'Ring-Core-Kernel' 0
+RGOrganization RGOrganization stx:goodies/ring 'Ring-Core-Containers' 0
+RGVariableDefinition RGVariableDefinition stx:goodies/ring 'Ring-Core-Kernel' 0
+RGClassDescriptionDefinition RGClassDescriptionDefinition stx:goodies/ring 'Ring-Core-Kernel' 0
+RGClassInstanceVariableDefinition RGClassInstanceVariableDefinition stx:goodies/ring 'Ring-Core-Kernel' 0
+RGClassVariableDefinition RGClassVariableDefinition stx:goodies/ring 'Ring-Core-Kernel' 0
+RGInstanceVariableDefinition RGInstanceVariableDefinition stx:goodies/ring 'Ring-Core-Kernel' 0
+RGNamespace RGNamespace stx:goodies/ring 'Ring-Core-Containers' 0
+RGPackage RGPackage stx:goodies/ring 'Ring-Core-Containers' 0
+RGPoolVariableDefinition RGPoolVariableDefinition stx:goodies/ring 'Ring-Core-Kernel' 0
+RGSlice RGSlice stx:goodies/ring 'Ring-Core-Containers' 0
+RGTraitDescriptionDefinition RGTraitDescriptionDefinition stx:goodies/ring 'Ring-Core-Kernel' 0
+RGClassDefinition RGClassDefinition stx:goodies/ring 'Ring-Core-Kernel' 0
+RGMetaclassDefinition RGMetaclassDefinition stx:goodies/ring 'Ring-Core-Kernel' 0
+RGMetatraitDefinition RGMetatraitDefinition stx:goodies/ring 'Ring-Core-Kernel' 0
+RGTraitDefinition RGTraitDefinition stx:goodies/ring 'Ring-Core-Kernel' 0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bc.mak	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,114 @@
+# $Header$
+#
+# DO NOT EDIT
+# automagically generated from the projectDefinition: stx_goodies_ring.
+#
+# Warning: once you modify this file, do not rerun
+# stmkmp or projectDefinition-build again - otherwise, your changes are lost.
+#
+# Notice, that the name bc.mak is historical (from times, when only borland c was supported).
+# This file contains make rules for the win32 platform using either borland-bcc or visual-c.
+# It shares common definitions with the unix-make in Make.spec.
+# The bc.mak supports the following targets:
+#    bmake         - compile all st-files to a classLib (dll)
+#    bmake clean   - clean all temp files
+#    bmake clobber - clean all
+#
+# Historic Note:
+#  this used to contain only rules to make with borland
+#    (called via bmake, by "make.exe -f bc.mak")
+#  this has changed; it is now also possible to build using microsoft visual c
+#    (called via vcmake, by "make.exe -f bc.mak -DUSEVC")
+#
+TOP=..\..
+INCLUDE_TOP=$(TOP)\..
+
+
+
+!INCLUDE $(TOP)\rules\stdHeader_bc
+
+!INCLUDE Make.spec
+
+LIBNAME=libstx_goodies_ring
+MODULE_PATH=goodies\ring
+RESFILES=ring.$(RES)
+
+
+
+LOCALINCLUDES= -I$(INCLUDE_TOP)\jv\tea\compiler -I$(INCLUDE_TOP)\stx\goodies\refactoryBrowser\helpers -I$(INCLUDE_TOP)\stx\libbasic -I$(INCLUDE_TOP)\stx\libcompat
+LOCALDEFINES=
+
+STCLOCALOPT=-package=$(PACKAGE) -I. $(LOCALINCLUDES) -headerDir=. $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES)  -varPrefix=$(LIBNAME)
+LOCALLIBS=
+
+OBJS= $(COMMON_OBJS) $(WIN32_OBJS)
+
+ALL::  classLibRule
+
+classLibRule: $(OUTDIR) $(OUTDIR)$(LIBNAME).dll
+
+!INCLUDE $(TOP)\rules\stdRules_bc
+
+# build all mandatory prerequisite packages (containing superclasses) for this package
+prereq:
+	pushd ..\..\libbasic & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+	pushd ..\refactoryBrowser\helpers & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+	pushd ..\refactoryBrowser\parser & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+	pushd ..\..\libbasic2 & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+	pushd ..\..\libview & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+	pushd ..\..\libview2 & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+	pushd ..\sunit & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+	pushd ..\..\..\jv\tea\compiler & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+
+
+
+
+
+
+
+test: $(TOP)\goodies\builder\reports\NUL
+	pushd $(TOP)\goodies\builder\reports & $(MAKE_BAT)
+	$(TOP)\goodies\builder\reports\report-runner.bat -D . -r Builder::TestReport -p $(PACKAGE)
+        
+clean::
+	del *.$(CSUFFIX)
+
+
+# BEGINMAKEDEPEND --- do not remove this line; make depend needs it
+$(OUTDIR)RGDefinition.$(O) RGDefinition.$(H): RGDefinition.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)stx_goodies_ring.$(O) stx_goodies_ring.$(H): stx_goodies_ring.st $(INCLUDE_TOP)\stx\libbasic\LibraryDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\ProjectDefinition.$(H) $(STCHDR)
+$(OUTDIR)RGAbstractContainer.$(O) RGAbstractContainer.$(H): RGAbstractContainer.st $(INCLUDE_TOP)\stx\goodies\ring\RGDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)RGElementDefinition.$(O) RGElementDefinition.$(H): RGElementDefinition.st $(INCLUDE_TOP)\stx\goodies\ring\RGDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)RGGlobalDefinition.$(O) RGGlobalDefinition.$(H): RGGlobalDefinition.st $(INCLUDE_TOP)\stx\goodies\ring\RGDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)RGBehaviorDefinition.$(O) RGBehaviorDefinition.$(H): RGBehaviorDefinition.st $(INCLUDE_TOP)\stx\goodies\ring\RGDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGGlobalDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)RGCommentDefinition.$(O) RGCommentDefinition.$(H): RGCommentDefinition.st $(INCLUDE_TOP)\stx\goodies\ring\RGDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGElementDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)RGContainer.$(O) RGContainer.$(H): RGContainer.st $(INCLUDE_TOP)\stx\goodies\ring\RGAbstractContainer.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)RGGlobalVariableDefinition.$(O) RGGlobalVariableDefinition.$(H): RGGlobalVariableDefinition.st $(INCLUDE_TOP)\stx\goodies\ring\RGDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGGlobalDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)RGMethodDefinition.$(O) RGMethodDefinition.$(H): RGMethodDefinition.st $(INCLUDE_TOP)\stx\goodies\ring\RGDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGElementDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)RGOrganization.$(O) RGOrganization.$(H): RGOrganization.st $(INCLUDE_TOP)\stx\goodies\ring\RGAbstractContainer.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)RGVariableDefinition.$(O) RGVariableDefinition.$(H): RGVariableDefinition.st $(INCLUDE_TOP)\stx\goodies\ring\RGDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGElementDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)RGClassDescriptionDefinition.$(O) RGClassDescriptionDefinition.$(H): RGClassDescriptionDefinition.st $(INCLUDE_TOP)\stx\goodies\ring\RGBehaviorDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGGlobalDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)RGClassInstanceVariableDefinition.$(O) RGClassInstanceVariableDefinition.$(H): RGClassInstanceVariableDefinition.st $(INCLUDE_TOP)\stx\goodies\ring\RGDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGElementDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGVariableDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)RGClassVariableDefinition.$(O) RGClassVariableDefinition.$(H): RGClassVariableDefinition.st $(INCLUDE_TOP)\stx\goodies\ring\RGDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGElementDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGVariableDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)RGInstanceVariableDefinition.$(O) RGInstanceVariableDefinition.$(H): RGInstanceVariableDefinition.st $(INCLUDE_TOP)\stx\goodies\ring\RGDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGElementDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGVariableDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)RGNamespace.$(O) RGNamespace.$(H): RGNamespace.st $(INCLUDE_TOP)\stx\goodies\ring\RGAbstractContainer.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGContainer.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)RGPackage.$(O) RGPackage.$(H): RGPackage.st $(INCLUDE_TOP)\stx\goodies\ring\RGAbstractContainer.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGContainer.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)RGPoolVariableDefinition.$(O) RGPoolVariableDefinition.$(H): RGPoolVariableDefinition.st $(INCLUDE_TOP)\stx\goodies\ring\RGDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGElementDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGVariableDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)RGSlice.$(O) RGSlice.$(H): RGSlice.st $(INCLUDE_TOP)\stx\goodies\ring\RGAbstractContainer.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGContainer.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)RGTraitDescriptionDefinition.$(O) RGTraitDescriptionDefinition.$(H): RGTraitDescriptionDefinition.st $(INCLUDE_TOP)\stx\goodies\ring\RGBehaviorDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGGlobalDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)RGClassDefinition.$(O) RGClassDefinition.$(H): RGClassDefinition.st $(INCLUDE_TOP)\stx\goodies\ring\RGBehaviorDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGClassDescriptionDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGGlobalDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)RGMetaclassDefinition.$(O) RGMetaclassDefinition.$(H): RGMetaclassDefinition.st $(INCLUDE_TOP)\stx\goodies\ring\RGBehaviorDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGClassDescriptionDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGGlobalDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)RGMetatraitDefinition.$(O) RGMetatraitDefinition.$(H): RGMetatraitDefinition.st $(INCLUDE_TOP)\stx\goodies\ring\RGBehaviorDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGGlobalDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGTraitDescriptionDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)RGTraitDefinition.$(O) RGTraitDefinition.$(H): RGTraitDefinition.st $(INCLUDE_TOP)\stx\goodies\ring\RGBehaviorDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGGlobalDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGTraitDescriptionDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)extensions.$(O): extensions.st $(INCLUDE_TOP)\jv\tea\compiler\TClass.$(H) $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\helpers\RBAbstractClass.$(H) $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\helpers\RBClass.$(H) $(INCLUDE_TOP)\stx\libbasic\Behavior.$(H) $(INCLUDE_TOP)\stx\libbasic\Class.$(H) $(INCLUDE_TOP)\stx\libbasic\ClassDescription.$(H) $(INCLUDE_TOP)\stx\libbasic\CompiledCode.$(H) $(INCLUDE_TOP)\stx\libbasic\ExecutableFunction.$(H) $(INCLUDE_TOP)\stx\libbasic\Method.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+
+# ENDMAKEDEPEND --- do not remove this line
+
+# **Must be at end**
+
+# Enforce recompilation of package definition class if Mercurial working
+# copy state changes. Together with --guessVersion it ensures that package
+# definition class always contains correct binary revision string.
+!IFDEF HGROOT
+$(OUTDIR)stx_goodies_ring.$(O): $(HGROOT)\.hg\dirstate
+!ENDIF
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bmake.bat	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,10 @@
+@REM -------
+@REM make using Borland bcc32
+@REM type bmake, and wait...
+@REM do not edit - automatically generated from ProjectDefinition
+@REM -------
+@SET DEFINES=
+
+make.exe -N -f bc.mak  %DEFINES% %*
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extensions.st	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,333 @@
+"{ Package: 'stx:goodies/ring' }"!
+
+!Behavior methodsFor:'*Ring-Core-Kernel'!
+
+methodNamed: aSelector
+
+    ^ self methodDict at: aSelector
+
+    "Created: / 28-08-2015 / 09:37:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!Behavior methodsFor:'*Ring-Core-Kernel'!
+
+protocols
+
+    ^ self organization categories copy
+
+    "Created: / 28-08-2015 / 09:37:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!Class methodsFor:'*Ring-Core-Kernel'!
+
+asFullRingDefinition
+    "A behavior is converted to a ring class including its variables, methods, direct superclass, direct subclasses and the package in which is loaded.
+    Active methods are generated and each knows its package as well.
+    Note that for its direct superclass and subclasses no full definitions are requested. If you need to traverse hierarchies use #asRingDefinitionWithMethods:withSuperclasses:withSubclasses:withPackages:"
+
+    | rgClass rgSuper rgSub rgMethod packageKeys |
+    rgClass:= self asRingDefinition.
+    rgClass package: (RGContainer packageOfClass: rgClass).
+
+    self superclass notNil 
+        ifTrue: [ 
+            rgSuper := self superclass asRingDefinition.
+            rgClass superclass: rgSuper ]
+        ifFalse: [  
+            self isTrait ifTrue: [ 
+                rgSuper := Trait asRingDefinition.
+                rgClass superclass: rgSuper. ]
+            ].
+
+    self subclasses do:[ :each |
+        rgSub := each asRingDefinition.
+        rgSub superclass: rgClass ].
+
+    packageKeys := RGContainer packageKeys.
+    self methodsDo:[ :mth|  
+            rgMethod := mth asActiveRingDefinition.
+            rgClass addMethod: rgMethod.
+            rgMethod package: (RGContainer packageOfMethod: rgMethod using: packageKeys) ].
+    self theMetaClass methodsDo:[ :mth|  
+            rgMethod := mth asActiveRingDefinition.
+            rgClass theMetaClass addMethod: rgMethod.
+            rgMethod package: (RGContainer packageOfMethod: rgMethod using: packageKeys) ].
+
+    ^ rgClass
+
+    "Created: / 28-08-2015 / 09:36:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!Class methodsFor:'*Ring-Core-Kernel'!
+
+asRingDefinition
+    "A behavior is converted to a ring class. Only the receiver and its variables (instance, class, pools) are converted.
+    Methods, superclasses, subclasses are not generated"
+    
+    | ring |
+    ring := (RGClassDefinition named: self name)
+        category: self category;
+        superclassName: self superclass name;  
+        traitCompositionSource: self traitCompositionString;
+        addInstanceVariables: self instVarNames;
+        addClassVariables: self classVarNames;
+        addSharedPools: self sharedPoolNames;
+        comment: self organization classComment;
+        stamp: self organization commentStamp;
+        definitionSource: self definition;
+        package: self package asRingDefinition;
+        withMetaclass.
+    ring theMetaClass 
+        traitCompositionSource: self theMetaClass traitCompositionString;
+        definitionSource: self theMetaClass definition;
+        addInstanceVariables: self theMetaClass instVarNames.  
+    ^ ring
+! !
+
+!Class methodsFor:'*Ring-Core-Kernel'!
+
+asRingDefinitionWithMethods: methodsBoolean withSuperclasses: supersBoolean withSubclasses: subsBoolean withPackageKeys: packageKeys in: aRGSlice
+    | rgClass rgMethod rgSuper rgSub subs |
+    rgClass := self asRingDefinition.
+    aRGSlice loadClass: rgClass using: packageKeys.
+    methodsBoolean
+        ifTrue: [ 
+            self
+                methodsDo: [ :mth | 
+                    rgMethod := mth asActiveRingDefinition.
+                    aRGSlice loadMethod: rgMethod inClass: rgClass using: packageKeys ].
+            self theMetaClass
+                methodsDo: [ :mth | 
+                    rgMethod := mth asActiveRingDefinition.
+                    aRGSlice loadMethod: rgMethod inClass: rgClass theMetaClass using: packageKeys ] ].
+    supersBoolean
+        ifTrue: [ 
+            self superclass
+                ifNotNil: [ 
+                    rgSuper := aRGSlice classNamed: self superclass name.
+                    rgSuper
+                        ifNil: [ 
+                            rgSuper := self superclass
+                                asRingDefinitionWithMethods: methodsBoolean
+                                withSuperclasses: supersBoolean
+                                withSubclasses: subsBoolean
+                                withPackageKeys: packageKeys
+                                in: aRGSlice ].
+                    rgClass superclass: rgSuper ] ].
+    subsBoolean
+        ifTrue: [ 
+            subs := self subclasses reject: [ :sub | sub isMeta ].
+            rgClass name = #Trait
+                ifTrue: [ subs := aRGSlice environment allTraits ].
+            subs
+                do: [ :each | 
+                    rgSub := aRGSlice classNamed: each name.
+                    rgSub
+                        ifNil: [ 
+                            rgSub := each
+                                asRingDefinitionWithMethods: methodsBoolean
+                                withSuperclasses: supersBoolean
+                                withSubclasses: subsBoolean
+                                withPackageKeys: packageKeys
+                                in: aRGSlice ].
+                    rgSub superclass: rgClass ] ].
+    ^ rgClass
+! !
+
+!Class methodsFor:'*Ring-Core-Kernel'!
+
+asRingDefinitionWithMethods: methodsBoolean withSuperclasses: supersBoolean withSubclasses: subsBoolean withPackages: packsBoolean
+    "Retrieves a ring class/trait based on the receiver.
+    The data loaded in the class/trait (active methods, superclasses, subclasses and packages) is requested by the users.
+    As it may need to traverse hierarchies for retrieving super and subclasses a ring slice is created as the container for every class, method and package.
+    To retrieve the slice:  aRGClass environment "
+    | rgClass rgSlice  rgPackageKeys |
+
+    rgSlice := RGSlice named: #fromImage.
+    packsBoolean ifTrue: [ 
+        rgPackageKeys := rgSlice loadPackagesFromImage ].
+    rgClass := self asRingDefinitionWithMethods: methodsBoolean withSuperclasses: supersBoolean withSubclasses: subsBoolean withPackageKeys: rgPackageKeys in: rgSlice.
+    rgSlice cleanEmptyPackages.
+    rgSlice loadTraitUsers.
+
+    ^ rgClass
+
+    "Created: / 28-08-2015 / 09:36:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!Method methodsFor:'*Ring-Core-Kernel'!
+
+asActiveRingDefinition
+    "Retrieves an active RGMethodDefinition object based on the data of the receiver.
+    Source, protocol and stamp are retrieved from the compiled method"
+    
+    ^ RGMethodDefinition new 
+            name: self selector;
+            parentName: self methodClass name;
+            isMetaSide: self methodClass isMeta;
+            asActive.
+! !
+
+!Method methodsFor:'*Ring-Core-Kernel'!
+
+asFullRingDefinition
+
+    "Retrieves an active RGMethodDefinition which knows its parent <class>.
+    Note that the full conversion does not happen at the level of the class. If you need that request asFullRingDefinition to the class"
+    | rgClass rgMethod |
+    rgClass := self realClass asRingDefinition.
+    rgMethod := self asActiveRingDefinition.
+    rgClass addMethod: rgMethod.
+    rgMethod package: (RGContainer packageOfMethod: rgMethod).
+    ^ rgMethod
+! !
+
+!Method methodsFor:'*Ring-Core-Kernel'!
+
+asHistoricalRingDefinition
+
+    "Retrieves a historical RGMethodDefinition object based on the data of the receiver.
+    Source, protocol and stamp are retrieved from the source file method"
+    | ring |
+    ring := (RGMethodDefinition named: self selector)
+                parentName: self methodClass name;
+                isMetaSide: self methodClass isMeta.
+
+    self sourcePointer isZero
+        ifTrue: [ "this should not happen but sometimes the system looks corrupted"
+            ring protocol: self category;
+                sourceCode: self sourceCode;
+                stamp: self timeStamp ]
+        ifFalse: [ 
+            ring sourcePointer: self sourcePointer ].
+    ring asHistorical.	
+    
+    ^ ring
+! !
+
+!Method methodsFor:'*Ring-Core-Kernel'!
+
+asPassiveRingDefinition
+    "Retrieves a passive RGMethodDefinition object based on the data of the receiver.
+    Source, protocol and stamp are retrieved from value assigned in creation"
+    
+    ^RGMethodDefinition new 
+         	name: self selector;
+            parentName: self methodClass name;
+            isMetaSide: self methodClass isMeta;
+            protocol: self category;
+            sourceCode: self sourceCode;
+            stamp: self timeStamp;
+            asPassive.
+! !
+
+!Method methodsFor:'*Ring-Core-Kernel'!
+
+asRingDefinition
+    "Retrieves an active RGMethodDefinition object based on the receiver.
+    Note that its class is not converted."
+    
+    ^ self asActiveRingDefinition
+! !
+
+!Method methodsFor:'*Ring-Core-Kernel'!
+
+methodReference
+
+    | class selector |
+    class := self methodClass ifNil: [^nil].
+    selector := self selector ifNil: [^nil].
+    ^RGMethodDefinition realClass: class selector: selector.
+    
+! !
+
+!Method methodsFor:'*Ring-Core-Kernel'!
+
+realClass
+    "answer the class that I am installed in"
+    
+    ^ self methodClass
+! !
+
+!Object methodsFor:'*Ring-Core-Kernel'!
+
+isRingObject
+
+    ^false
+! !
+
+!TClass methodsFor:'*Ring-Core-Kernel'!
+
+asFullRingDefinition
+    "A behavior is converted to a ring class including its variables, methods, direct superclass, direct subclasses and the package in which is loaded.
+    Active methods are generated and each knows its package as well.
+    Note that for its direct superclass and subclasses no full definitions are requested. If you need to traverse hierarchies use #asRingDefinitionWithMethods:withSuperclasses:withSubclasses:withPackages:"
+    
+    | rgClass rgSuper rgSub rgMethod packageKeys |
+    rgClass:= self asRingDefinition.
+    rgClass package: (RGContainer packageOfClass: rgClass).
+    
+    self superclass notNil 
+        ifTrue: [ 
+            rgSuper := self superclass asRingDefinition.
+            rgClass superclass: rgSuper ]
+        ifFalse: [  
+            self isTrait ifTrue: [ 
+                rgSuper := Trait asRingDefinition.
+                rgClass superclass: rgSuper. ]
+            ].
+
+    self subclasses do:[ :each |
+        rgSub := each asRingDefinition.
+        rgSub superclass: rgClass ].
+    
+    packageKeys := RGContainer packageKeys.
+    self methodsDo:[ :mth|  
+            rgMethod := mth asActiveRingDefinition.
+            rgClass addMethod: rgMethod.
+            rgMethod package: (RGContainer packageOfMethod: rgMethod using: packageKeys) ].
+    self theMetaClass methodsDo:[ :mth|  
+            rgMethod := mth asActiveRingDefinition.
+            rgClass theMetaClass addMethod: rgMethod.
+            rgMethod package: (RGContainer packageOfMethod: rgMethod using: packageKeys) ].
+    
+    ^ rgClass
+! !
+
+!TClass methodsFor:'*Ring-Core-Kernel'!
+
+asRingDefinition
+    ^self explicitRequirement.
+! !
+
+!TClass methodsFor:'*Ring-Core-Kernel'!
+
+asRingDefinitionWithMethods: methodsBoolean withSuperclasses: supersBoolean withSubclasses: subsBoolean withPackageKeys: packageKeys in: aRGSlice
+    ^self explicitRequirement.
+! !
+
+!TClass methodsFor:'*Ring-Core-Kernel'!
+
+asRingDefinitionWithMethods: methodsBoolean withSuperclasses: supersBoolean withSubclasses: subsBoolean withPackages: packsBoolean
+    "Retrieves a ring class/trait based on the receiver.
+    The data loaded in the class/trait (active methods, superclasses, subclasses and packages) is requested by the users.
+    As it may need to traverse hierarchies for retrieving super and subclasses a ring slice is created as the container for every class, method and package.
+    To retrieve the slice:  aRGClass environment "
+    | rgClass rgSlice  rgPackageKeys |
+    
+    rgSlice := RGSlice named: #fromImage.
+    packsBoolean ifTrue: [ 
+        rgPackageKeys := rgSlice loadPackagesFromImage ].
+    rgClass := self asRingDefinitionWithMethods: methodsBoolean withSuperclasses: supersBoolean withSubclasses: subsBoolean withPackageKeys: rgPackageKeys in: rgSlice.
+    rgSlice cleanEmptyPackages.
+    rgSlice loadTraitUsers.
+        
+    ^ rgClass
+! !
+
+!stx_goodies_ring class methodsFor:'documentation'!
+
+extensionsVersion_HG
+
+    ^ '$Changeset: <not expanded> $'
+! !
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libInit.cc	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,58 @@
+/*
+ * $Header$
+ *
+ * DO NOT EDIT
+ * automagically generated from the projectDefinition: stx_goodies_ring.
+ */
+#define __INDIRECTVMINITCALLS__
+#include <stc.h>
+
+#ifdef WIN32
+# pragma codeseg INITCODE "INITCODE"
+#endif
+
+#if defined(INIT_TEXT_SECTION) || defined(DLL_EXPORT)
+DLL_EXPORT void _libstx_goodies_ring_Init() INIT_TEXT_SECTION;
+DLL_EXPORT void _libstx_goodies_ring_InitDefinition() INIT_TEXT_SECTION;
+#endif
+
+void _libstx_goodies_ring_InitDefinition(pass, __pRT__, snd)
+OBJ snd; struct __vmData__ *__pRT__; {
+__BEGIN_PACKAGE2__("libstx_goodies_ring__DFN", _libstx_goodies_ring_InitDefinition, "stx:goodies/ring");
+_stx_137goodies_137ring_Init(pass,__pRT__,snd);
+
+__END_PACKAGE__();
+}
+
+void _libstx_goodies_ring_Init(pass, __pRT__, snd)
+OBJ snd; struct __vmData__ *__pRT__; {
+__BEGIN_PACKAGE2__("libstx_goodies_ring", _libstx_goodies_ring_Init, "stx:goodies/ring");
+_RGDefinition_Init(pass,__pRT__,snd);
+_stx_137goodies_137ring_Init(pass,__pRT__,snd);
+_RGAbstractContainer_Init(pass,__pRT__,snd);
+_RGElementDefinition_Init(pass,__pRT__,snd);
+_RGGlobalDefinition_Init(pass,__pRT__,snd);
+_RGBehaviorDefinition_Init(pass,__pRT__,snd);
+_RGCommentDefinition_Init(pass,__pRT__,snd);
+_RGContainer_Init(pass,__pRT__,snd);
+_RGGlobalVariableDefinition_Init(pass,__pRT__,snd);
+_RGMethodDefinition_Init(pass,__pRT__,snd);
+_RGOrganization_Init(pass,__pRT__,snd);
+_RGVariableDefinition_Init(pass,__pRT__,snd);
+_RGClassDescriptionDefinition_Init(pass,__pRT__,snd);
+_RGClassInstanceVariableDefinition_Init(pass,__pRT__,snd);
+_RGClassVariableDefinition_Init(pass,__pRT__,snd);
+_RGInstanceVariableDefinition_Init(pass,__pRT__,snd);
+_RGNamespace_Init(pass,__pRT__,snd);
+_RGPackage_Init(pass,__pRT__,snd);
+_RGPoolVariableDefinition_Init(pass,__pRT__,snd);
+_RGSlice_Init(pass,__pRT__,snd);
+_RGTraitDescriptionDefinition_Init(pass,__pRT__,snd);
+_RGClassDefinition_Init(pass,__pRT__,snd);
+_RGMetaclassDefinition_Init(pass,__pRT__,snd);
+_RGMetatraitDefinition_Init(pass,__pRT__,snd);
+_RGTraitDefinition_Init(pass,__pRT__,snd);
+
+_stx_137goodies_137ring_extensions_Init(pass,__pRT__,snd);
+__END_PACKAGE__();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mingwmake.bat	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,13 @@
+@REM -------
+@REM make using mingw gnu compiler
+@REM type mingwmake, and wait...
+@REM do not edit - automatically generated from ProjectDefinition
+@REM -------
+@SET DEFINES=
+
+@pushd ..\..\rules
+@call find_mingw.bat
+@popd
+make.exe -N -f bc.mak %DEFINES% %USEMINGW_ARG% %*
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ring.rc	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,37 @@
+//
+// DO NOT EDIT
+// automagically generated from the projectDefinition: stx_goodies_ring.
+//
+VS_VERSION_INFO VERSIONINFO
+  FILEVERSION     6,2,32767,32767
+  PRODUCTVERSION  6,2,5,0
+#if (__BORLANDC__)
+  FILEFLAGSMASK   VS_FF_DEBUG | VS_FF_PRERELEASE
+  FILEFLAGS       VS_FF_PRERELEASE | VS_FF_SPECIALBUILD
+  FILEOS          VOS_NT_WINDOWS32
+  FILETYPE        VFT_DLL
+  FILESUBTYPE     VS_USER_DEFINED
+#endif
+
+BEGIN
+  BLOCK "StringFileInfo"
+  BEGIN
+    BLOCK "040904E4"
+    BEGIN
+      VALUE "CompanyName", "eXept Software AG\0"
+      VALUE "FileDescription", "Smalltalk/X Class library (LIB)\0"
+      VALUE "FileVersion", "6.2.32767.32767\0"
+      VALUE "InternalName", "stx:goodies/ring\0"
+      VALUE "LegalCopyright", "Copyright Claus Gittinger 1988-2015\nCopyright eXept Software AG 2015\0"
+      VALUE "ProductName", "Smalltalk/X\0"
+      VALUE "ProductVersion", "6.2.5.0\0"
+      VALUE "ProductDate", "Fri, 28 Aug 2015 11:19:29 GMT\0"
+    END
+
+  END
+
+  BLOCK "VarFileInfo"
+  BEGIN                               //  Language   |    Translation
+    VALUE "Translation", 0x409, 0x4E4 // U.S. English, Windows Multilingual
+  END
+END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/stx_goodies_ring.st	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,163 @@
+"{ Package: 'stx:goodies/ring' }"
+
+"{ NameSpace: Smalltalk }"
+
+LibraryDefinition subclass:#stx_goodies_ring
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'* Projects & Packages *'
+!
+
+
+!stx_goodies_ring class methodsFor:'description'!
+
+excludedFromPreRequisites
+    "list packages which are to be explicitely excluded from the automatic constructed
+     prerequisites list. If empty, everything that is found along the inheritance of any of
+     my classes is considered to be a prerequisite package."
+
+    ^ #(
+    )
+!
+
+mandatoryPreRequisites
+    "list packages which are mandatory as a prerequisite.
+     This are packages containing superclasses of my classes and classes which
+     are extended by myself.
+     They are mandatory, because we need these packages as a prerequisite for loading and compiling.
+     This method is generated automatically,
+     by searching along the inheritance chain of all of my classes."
+
+    ^ #(
+        #'jv:tea/compiler'    "TClass - extended"
+        #'stx:goodies/refactoryBrowser/helpers'    "RBAbstractClass - extended"
+        #'stx:libbasic'    "Behavior - extended"
+    )
+!
+
+referencedPreRequisites
+    "list packages which are a prerequisite, because they contain
+     classes which are referenced by my classes.
+     We do not need these packages as a prerequisite for compiling or loading,
+     however, a class from it may be referenced during execution and having it
+     unloaded then may lead to a runtime doesNotUnderstand error, unless the caller
+     includes explicit checks for the package being present.
+     This method is generated automatically,
+     by searching all classes (and their packages) which are referenced by my classes."
+
+    ^ #(
+        #'stx:libcompat'    "DateAndTime - referenced by RGCommentDefinition>>timeStamp"
+    )
+!
+
+subProjects
+    "list packages which are known as subprojects.
+     The generated makefile will enter those and make there as well.
+     However: they are not forced to be loaded when a package is loaded;
+     for those, redefine requiredPrerequisites."
+
+    ^ #(
+    )
+! !
+
+!stx_goodies_ring class methodsFor:'description - contents'!
+
+classNamesAndAttributes
+    "lists the classes which are to be included in the project.
+     Each entry in the list may be: a single class-name (symbol),
+     or an array-literal consisting of class name and attributes.
+     Attributes are: #autoload or #<os> where os is one of win32, unix,..."
+
+    ^ #(
+        "<className> or (<className> attributes...) in load order"
+        RGDefinition
+        #'stx_goodies_ring'
+        RGAbstractContainer
+        RGElementDefinition
+        RGGlobalDefinition
+        RGBehaviorDefinition
+        RGCommentDefinition
+        RGContainer
+        RGGlobalVariableDefinition
+        RGMethodDefinition
+        RGOrganization
+        RGVariableDefinition
+        RGClassDescriptionDefinition
+        RGClassInstanceVariableDefinition
+        RGClassVariableDefinition
+        RGInstanceVariableDefinition
+        RGNamespace
+        RGPackage
+        RGPoolVariableDefinition
+        RGSlice
+        RGTraitDescriptionDefinition
+        RGClassDefinition
+        RGMetaclassDefinition
+        RGMetatraitDefinition
+        RGTraitDefinition
+    )
+!
+
+extensionMethodNames
+    "list class/selector pairs of extensions.
+     A correponding method with real names must be present in my concrete subclasses"
+
+    ^ #(
+        Behavior methodNamed:
+        Behavior protocols
+        Class asFullRingDefinition
+        Class asRingDefinition
+        Class asRingDefinitionWithMethods:withSuperclasses:withSubclasses:withPackageKeys:in:
+        Class asRingDefinitionWithMethods:withSuperclasses:withSubclasses:withPackages:
+        Method asActiveRingDefinition
+        Method asFullRingDefinition
+        Method asHistoricalRingDefinition
+        Method asPassiveRingDefinition
+        Method asRingDefinition
+        Method methodReference
+        Method realClass
+        Object isRingObject
+        TClass asFullRingDefinition
+        TClass asRingDefinition
+        TClass asRingDefinitionWithMethods:withSuperclasses:withSubclasses:withPackageKeys:in:
+        TClass asRingDefinitionWithMethods:withSuperclasses:withSubclasses:withPackages:
+    )
+! !
+
+!stx_goodies_ring class methodsFor:'description - project information'!
+
+companyName
+    "Returns a company string which will appear in <lib>.rc.
+     Under win32, this is placed into the dlls file-info"
+
+    ^ 'eXept Software AG'
+!
+
+description
+    "Returns a description string which will appear in nt.def / bc.def"
+
+    ^ 'Smalltalk/X Class library'
+!
+
+legalCopyright
+    "Returns a copyright string which will appear in <lib>.rc.
+     Under win32, this is placed into the dlls file-info"
+
+    ^ 'Copyright Claus Gittinger 1988-2015\nCopyright eXept Software AG 2015'
+!
+
+productName
+    "Returns a product name which will appear in <lib>.rc.
+     Under win32, this is placed into the dlls file-info.
+     This method is usually redefined in a concrete application definition"
+
+    ^ 'Smalltalk/X'
+! !
+
+!stx_goodies_ring class methodsFor:'documentation'!
+
+version_HG
+    ^ '$Changeset: <not expanded> $'
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/Make.proto	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,143 @@
+# $Header$
+#
+# DO NOT EDIT
+# automagically generated from the projectDefinition: stx_goodies_ring_tests.
+#
+# Warning: once you modify this file, do not rerun
+# stmkmp or projectDefinition-build again - otherwise, your changes are lost.
+#
+# The Makefile as generated by this Make.proto supports the following targets:
+#    make         - compile all st-files to a classLib
+#    make clean   - clean all temp files
+#    make clobber - clean all
+#
+# This file contains definitions for Unix based platforms.
+# It shares common definitions with the win32-make in Make.spec.
+
+#
+# position (of this package) in directory hierarchy:
+# (must point to ST/X top directory, for tools and includes)
+TOP=../../..
+INCLUDE_TOP=$(TOP)/..
+
+# subdirectories where targets are to be made:
+SUBDIRS=
+
+
+# subdirectories where Makefiles are to be made:
+# (only define if different from SUBDIRS)
+# ALLSUBDIRS=
+
+REQUIRED_SUPPORT_DIRS=
+
+# if your embedded C code requires any system includes,
+# add the path(es) here:,
+# ********** OPTIONAL: MODIFY the next lines ***
+# LOCALINCLUDES=-Ifoo -Ibar
+LOCALINCLUDES= -I$(INCLUDE_TOP)/jv/tea/compiler -I$(INCLUDE_TOP)/stx/goodies/ring -I$(INCLUDE_TOP)/stx/goodies/sunit -I$(INCLUDE_TOP)/stx/libbasic -I$(INCLUDE_TOP)/stx/libbasic2
+
+
+# if you need any additional defines for embedded C code,
+# add them here:,
+# ********** OPTIONAL: MODIFY the next lines ***
+# LOCALDEFINES=-Dfoo -Dbar -DDEBUG
+LOCALDEFINES=
+
+LIBNAME=libstx_goodies_ring_tests
+STCLOCALOPT='-package=$(PACKAGE)' -I. $(LOCALINCLUDES) $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES) -headerDir=.  -varPrefix=$(LIBNAME)
+
+
+# ********** OPTIONAL: MODIFY the next line ***
+# additional C-libraries that should be pre-linked with the class-objects
+LD_OBJ_LIBS=
+LOCAL_SHARED_LIBS=
+
+
+# ********** OPTIONAL: MODIFY the next line ***
+# additional C targets or libraries should be added below
+LOCAL_EXTRA_TARGETS=
+
+OBJS= $(COMMON_OBJS) $(UNIX_OBJS)
+
+
+
+all:: preMake classLibRule postMake
+
+pre_objs::  
+
+
+
+
+
+
+# Enforce recompilation of package definition class if Mercurial working
+# copy state changes. Together with --guessVersion it ensures that package
+# definition class always contains correct binary revision string.
+ifneq (**NOHG**, $(shell hg root 2> /dev/null || echo -n '**NOHG**'))
+stx_goodies_ring_tests.$(O): $(shell hg root)/.hg/dirstate
+endif
+
+
+
+
+# run default testsuite for this package
+test: $(TOP)/goodies/builder/reports
+	$(MAKE) -C $(TOP)/goodies/builder/reports -f Makefile.init
+	$(TOP)/goodies/builder/reports/report-runner.sh -D . -r Builder::TestReport -p $(PACKAGE)
+
+
+
+# add more install actions here
+install::
+
+# add more install actions for aux-files (resources) here
+installAux::
+
+# add more preMake actions here
+preMake::
+
+# add more postMake actions here
+postMake:: cleanjunk
+
+# build all mandatory prerequisite packages (containing superclasses) for this package
+prereq:
+	cd ../../../libbasic && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
+	cd ../../../libbasic2 && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
+	cd ../../../libview && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
+	cd ../../../libview2 && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
+	cd ../../sunit && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
+
+
+
+# build all packages containing referenced classes for this package
+# they are not needed to compile the package (but later, to load it)
+references:
+
+
+cleanjunk::
+	-rm -f *.s *.s2
+
+clean::
+	-rm -f *.o *.H
+
+clobber:: clean
+	-rm -f *.so *.dll
+
+
+# BEGINMAKEDEPEND --- do not remove this line; make depend needs it
+$(OUTDIR)RGClassDefinitionTest.$(O) RGClassDefinitionTest.$(H): RGClassDefinitionTest.st $(INCLUDE_TOP)/stx/goodies/sunit/TestAsserter.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestCase.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)RGCommentDefinitionTest.$(O) RGCommentDefinitionTest.$(H): RGCommentDefinitionTest.st $(INCLUDE_TOP)/stx/goodies/sunit/TestAsserter.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestCase.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)RGContainerTest.$(O) RGContainerTest.$(H): RGContainerTest.st $(INCLUDE_TOP)/stx/goodies/sunit/TestAsserter.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestCase.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)RGGlobalDefinitionTest.$(O) RGGlobalDefinitionTest.$(H): RGGlobalDefinitionTest.st $(INCLUDE_TOP)/stx/goodies/sunit/TestAsserter.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestCase.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)RGMetaclassDefinitionTest.$(O) RGMetaclassDefinitionTest.$(H): RGMetaclassDefinitionTest.st $(INCLUDE_TOP)/stx/goodies/sunit/TestAsserter.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestCase.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)RGMetatraitDefinitionTest.$(O) RGMetatraitDefinitionTest.$(H): RGMetatraitDefinitionTest.st $(INCLUDE_TOP)/stx/goodies/sunit/TestAsserter.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestCase.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)RGMethodDefinitionTest.$(O) RGMethodDefinitionTest.$(H): RGMethodDefinitionTest.st $(INCLUDE_TOP)/stx/goodies/sunit/TestAsserter.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestCase.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)RGNamespaceTest.$(O) RGNamespaceTest.$(H): RGNamespaceTest.st $(INCLUDE_TOP)/stx/goodies/sunit/TestAsserter.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestCase.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)RGPackageTest.$(O) RGPackageTest.$(H): RGPackageTest.st $(INCLUDE_TOP)/stx/goodies/sunit/TestAsserter.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestCase.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)RGSliceTest.$(O) RGSliceTest.$(H): RGSliceTest.st $(INCLUDE_TOP)/stx/goodies/sunit/TestAsserter.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestCase.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)RGTraitDefinitionTest.$(O) RGTraitDefinitionTest.$(H): RGTraitDefinitionTest.st $(INCLUDE_TOP)/stx/goodies/sunit/TestAsserter.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestCase.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)RGVariableDefinitionTest.$(O) RGVariableDefinitionTest.$(H): RGVariableDefinitionTest.st $(INCLUDE_TOP)/stx/goodies/sunit/TestAsserter.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestCase.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)stx_goodies_ring_tests.$(O) stx_goodies_ring_tests.$(H): stx_goodies_ring_tests.st $(INCLUDE_TOP)/stx/libbasic/LibraryDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/ProjectDefinition.$(H) $(STCHDR)
+
+# ENDMAKEDEPEND --- do not remove this line
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/Make.spec	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,87 @@
+# $Header$
+#
+# DO NOT EDIT
+# automagically generated from the projectDefinition: stx_goodies_ring_tests.
+#
+# Warning: once you modify this file, do not rerun
+# stmkmp or projectDefinition-build again - otherwise, your changes are lost.
+#
+# This file contains specifications which are common to all platforms.
+#
+
+# Do NOT CHANGE THESE DEFINITIONS
+# (otherwise, ST/X will have a hard time to find out the packages location from its packageID,
+#  to find the source code of a class and to find the library for a package)
+MODULE=stx
+MODULE_DIR=goodies/ring/tests
+PACKAGE=$(MODULE):$(MODULE_DIR)
+
+
+# Argument(s) to the stc compiler (stc --usage).
+#  -headerDir=. : create header files locally
+#                (if removed, they will be created as common
+#  -Pxxx       : defines the package
+#  -Zxxx       : a prefix for variables within the classLib
+#  -Dxxx       : defines passed to to CC for inline C-code
+#  -Ixxx       : include path passed to CC for inline C-code
+#  +optspace   : optimized for space
+#  +optspace2  : optimized more for space
+#  +optspace3  : optimized even more for space
+#  +optinline  : generate inline code for some ST constructs
+#  +inlineNew  : additionally inline new
+#  +inlineMath : additionally inline some floatPnt math stuff
+#
+# ********** OPTIONAL: MODIFY the next line(s) ***
+# STCLOCALOPTIMIZATIONS=+optinline +inlineNew
+# STCLOCALOPTIMIZATIONS=+optspace3
+STCLOCALOPTIMIZATIONS=+optspace3
+
+
+# Argument(s) to the stc compiler (stc --usage).
+#  -warn            : no warnings
+#  -warnNonStandard : no warnings about ST/X extensions
+#  -warnEOLComments : no warnings about EOL comment extension
+#  -warnPrivacy     : no warnings about privateClass extension
+#  -warnUnused      : no warnings about unused variables
+#
+# ********** OPTIONAL: MODIFY the next line(s) ***
+# STCWARNINGS=-warn
+# STCWARNINGS=-warnNonStandard
+# STCWARNINGS=-warnEOLComments
+STCWARNINGS=-warnNonStandard
+
+COMMON_CLASSES= \
+	RGClassDefinitionTest \
+	RGCommentDefinitionTest \
+	RGContainerTest \
+	RGGlobalDefinitionTest \
+	RGMetaclassDefinitionTest \
+	RGMetatraitDefinitionTest \
+	RGMethodDefinitionTest \
+	RGNamespaceTest \
+	RGPackageTest \
+	RGSliceTest \
+	RGTraitDefinitionTest \
+	RGVariableDefinitionTest \
+	stx_goodies_ring_tests \
+
+
+
+
+COMMON_OBJS= \
+    $(OUTDIR_SLASH)RGClassDefinitionTest.$(O) \
+    $(OUTDIR_SLASH)RGCommentDefinitionTest.$(O) \
+    $(OUTDIR_SLASH)RGContainerTest.$(O) \
+    $(OUTDIR_SLASH)RGGlobalDefinitionTest.$(O) \
+    $(OUTDIR_SLASH)RGMetaclassDefinitionTest.$(O) \
+    $(OUTDIR_SLASH)RGMetatraitDefinitionTest.$(O) \
+    $(OUTDIR_SLASH)RGMethodDefinitionTest.$(O) \
+    $(OUTDIR_SLASH)RGNamespaceTest.$(O) \
+    $(OUTDIR_SLASH)RGPackageTest.$(O) \
+    $(OUTDIR_SLASH)RGSliceTest.$(O) \
+    $(OUTDIR_SLASH)RGTraitDefinitionTest.$(O) \
+    $(OUTDIR_SLASH)RGVariableDefinitionTest.$(O) \
+    $(OUTDIR_SLASH)stx_goodies_ring_tests.$(O) \
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/Makefile.init	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,27 @@
+#
+# DO NOT EDIT
+#
+# make uses this file (Makefile) only, if there is no
+# file named "makefile" (lower-case m) in the same directory.
+# My only task is to generate the real makefile and call make again.
+# Thereafter, I am no longer used and needed.
+#
+# MACOSX caveat:
+#   as filenames are not case sensitive (in a default setup),
+#   we cannot use the above trick. Therefore, this file is now named
+#   "Makefile.init", and you have to execute "make -f Makefile.init" to
+#   get the initial makefile.  This is now also done by the toplevel CONFIG
+#   script.
+
+.PHONY: run
+
+run: makefile
+	$(MAKE) -f makefile
+
+#only needed for the definition of $(TOP)
+include Make.proto
+
+makefile: mf
+
+mf:
+	$(TOP)/rules/stmkmf
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/RGClassDefinitionTest.st	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,411 @@
+"{ Package: 'stx:goodies/ring/tests' }"
+
+"{ NameSpace: Smalltalk }"
+
+TestCase subclass:#RGClassDefinitionTest
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Ring-Core-Kernel-Tests'
+!
+
+RGClassDefinitionTest comment:'SUnit tests for class definitions'
+!
+
+!RGClassDefinitionTest methodsFor:'testing'!
+
+testAddingMethods
+    | newMethod newClass |
+    
+    newClass:= RGClassDefinition named:  #OrderedCollection.
+    newMethod:= (RGMethodDefinition named: #add:)
+                     parent: newClass;
+                    protocol: 'adding';
+                    sourceCode: 'add: newObject
+                                    ^self addLast: newObject'.
+    
+    self assert: (newMethod isMetaSide not).
+    self assert: (newClass hasMethods not).
+
+    newClass addMethod: newMethod.
+    newClass addSelector: #size 
+               classified: 'accessing' 
+               sourced: 'fakeMethod
+                            ^lastIndex - firstIndex + 1'.
+    
+    self assert: (newClass hasMethods).
+    self assert: (newClass selectors = #(add: size)).
+    self assert: (newClass includesSelector: #add:).
+    self assert: ((newClass methodNamed: #add:) = newMethod).
+    self assert: (newClass methods size = 2).
+    self assert: (newClass selectors size = 2).
+    self assert: (newClass allSelectors size = 2).  "no hierarchy"
+
+    newMethod:= newClass methodNamed: #size.
+    self assert: (newMethod parent = newClass).
+    
+    self assert: ((newClass compiledMethodNamed: #size) notNil).
+    self assert: ((newClass compiledMethodNamed: #fakeMethod) isNil)
+!
+
+testAsClassDefinition
+    | newClass |
+
+    newClass:= OrderedCollection asRingDefinition.
+    
+    self assert: (newClass isRingObject).
+    self assert: (newClass isClass).  
+    self assert: (newClass name == #OrderedCollection).  
+    self assert: (newClass category notNil).
+    self assert: (newClass superclassName notNil).
+    
+    self assert: (newClass theMetaClass isRingObject).
+    self assert: (newClass theMetaClass isClass).
+!
+
+testAsClassDefinition2
+
+    | newClass |
+    newClass:= Trait asRingDefinition.
+    
+    self assert: (newClass isRingObject).
+    self assert: (newClass isClass).  
+    self assert: (newClass name == #Trait).  
+    self assert: (newClass category notNil).
+    self assert: (newClass superclassName notNil).
+    self assert: (newClass  traitCompositionSource = 'TClass').
+    
+    self assert: (newClass theMetaClass isRingObject).
+    self assert: (newClass theMetaClass isClass).
+    self assert: (newClass theMetaClass traitCompositionSource = 'TClass classTrait').
+    
+!
+
+testAsClassDefinitionSourceDefinition
+
+    | newClass |
+    newClass:= Trait asRingDefinition.
+    self assert: (newClass definitionSource =  'TraitDescription subclass: #Trait
+    uses: TClass
+    instanceVariableNames: ''name environment classTrait category''
+    classVariableNames: ''''
+    poolDictionaries: ''''
+    category: ''Traits-Kernel''').
+    
+    self assert: (newClass theMetaClass definitionSource =  'Trait class
+    uses: TClass classTrait
+    instanceVariableNames: ''''').
+    
+!
+
+testAsRingDefinition
+    self assert: OrderedCollection asRingDefinition asRingDefinition isRingObject
+!
+
+testClassEquality
+    | newClass |
+    
+    self assert: OrderedCollection asRingDefinition = OrderedCollection asRingDefinition.
+    
+    newClass := (OrderedCollection asRingDefinition)
+        category: #Kernel.
+    self assert: (OrderedCollection asRingDefinition = newClass) 
+!
+
+testExistingClass
+    | newClass metaClass |
+    
+    newClass:= RGClassDefinition named:  #OrderedCollection.
+    self assert: (newClass isClass).
+    self assert: (newClass isDefined).
+    self assert: (newClass realClass = OrderedCollection).
+    self assert: (newClass isMeta not).
+    
+    newClass withMetaclass.
+    self assert: (newClass hasMetaclass).
+    metaClass:= newClass theMetaClass.
+    self assert: (metaClass isMeta).
+    self assert: (metaClass name = 'OrderedCollection class').
+    self assert: (metaClass theNonMetaClass = newClass).
+    self assert: (metaClass realClass = OrderedCollection class).
+!
+
+testNonExistingClass
+    | newClass |
+    
+    newClass:= RGClassDefinition named:  #Connection.
+    self assert: (newClass isClass).
+    self assert: (newClass instanceVariables isEmpty).
+    self assert: (newClass classVariables isEmpty).
+    self assert: (newClass sharedPools isEmpty).
+    self assert: (newClass hasMetaclass not).
+    self assert: (newClass hasComment not).
+    self assert: (newClass hasStamp not).
+    self assert: (newClass parent = Smalltalk globals).
+    self assert: (newClass package isNil).
+    self assert: (newClass category isNil).
+    self assert: (newClass hasMethods not).
+    self assert: (newClass hasSuperclass not).
+    self assert: (newClass hasTraitComposition not).
+    self assert: (newClass isDefined not).
+    self assert: (newClass hasProtocols not).
+    
+    
+!
+
+testReadFrom
+    "self debug: #testReadFrom"
+    
+    
+    | st rg |
+    rg := Point asRingDefinition.
+    st := String streamContents: [:s |
+        rg storeOn: s.
+        s contents].
+    self assert: (Object readFrom: st) = rg. 
+    
+    rg := Point class asRingDefinition.
+    st := String streamContents: [:s |
+        rg storeOn: s.
+        s contents].
+    self assert: (Object readFrom: st) = rg 
+!
+
+testRemovingMethods
+    | newMethod newClass |
+    
+    newClass:= RGClassDefinition named: #OrderedCollection.
+    newMethod:= (RGMethodDefinition named: #add:)
+                    parent: newClass;
+                    protocol: 'adding';
+                    sourceCode: 'add: newObject
+                                    ^self addLast: newObject'.
+    self assert: (newClass hasMethods not).
+
+    newClass addMethod: newMethod.
+    newClass addSelector: #size 
+               classified: 'accessing' 
+               sourced: 'size
+                            ^ lastIndex - firstIndex + 1'.
+    
+    self assert: (newClass selectors = #(add: size)).
+    newClass removeSelector: #join:.
+    self assert: (newClass selectors = #(add: size)).
+    newClass removeMethod: newMethod.
+    self assert: ((newClass includesSelector: #add:) not).
+    newClass removeSelector: #size.
+    self assert: (newClass hasMethods not).
+!
+
+testStoreOn
+    "self debug: #testStoreOn"
+    
+    
+    | st |
+    st := String streamContents: [:s |
+        
+        (Point) asRingDefinition storeOn: s.
+        s contents].
+    self assert: st = '(RGClassDefinition named: #Point)'.
+    
+    st := String streamContents: [:s |
+        
+        (Point class) asRingDefinition storeOn: s.
+        s contents].
+    self assert: st = '((RGMetaclassDefinition named: #''Point class'') baseClass:(RGClassDefinition named: #Point))'
+!
+
+testWithCategory
+    | newClass |
+    
+    newClass:= (RGClassDefinition named:  #Object)
+                        category: 'Kernel-Objects';
+                        yourself.
+
+    self assert: (newClass package isNil).
+    self assert: (newClass category = 'Kernel-Objects').
+!
+
+testWithClassInstanceVariables
+    | newClass metaClass classInstVar |
+    
+    newClass:= RGClassDefinition named:  #HashTableSizes.
+    newClass withMetaclass.
+    metaClass:= newClass theMetaClass.
+    metaClass addInstanceVariables: #(sizes).
+    
+    self assert: (metaClass instanceVariables size = 1).
+    self assert: (metaClass instVarNames size = 1).
+    self assert: (metaClass allInstVarNames size = 1).
+    
+    classInstVar:= metaClass instanceVariableNamed: #sizes.
+    self assert: (classInstVar notNil).
+    self assert: (classInstVar parent = metaClass).
+    self assert: (classInstVar isClassInstanceVariable).
+    self assert: (classInstVar isVariable).
+    self assert: (classInstVar parentName = metaClass name).
+    self assert: (classInstVar realClass = HashTableSizes class).
+    
+    metaClass removeInstVarNamed: #sizes.
+    self assert: (metaClass instanceVariables isEmpty).
+    self assert: ((metaClass instanceVariableNamed: #sizes) isNil).
+    
+!
+
+testWithClassVariables
+    | newClass classVar |
+    
+    newClass:= (RGClassDefinition named: #Object)
+                        addClassVariables: #(DependentsFields);
+                        addClassVarNamed: #FakeVariable;
+                        yourself.
+
+    self assert: (newClass classVariables size = 2).
+    self assert: (newClass classVarNames size = 2).
+    self assert: (newClass allClassVarNames size = 2).  "no hierarchy"
+    
+    classVar:= newClass classVarNamed: #DependentsFields.
+    self assert: (classVar notNil).
+    self assert: (classVar isClassVariable).
+    self assert: (classVar isVariable).
+    self assert: (classVar parent = newClass).
+    self assert: (classVar parentName == newClass name).
+    self assert: (classVar realClass = Object).
+    
+    newClass withMetaclass.
+    self assert: (newClass theMetaClass allClassVarNames size = 2).
+    
+    newClass removeClassVarNamed: #DependentsFields.
+    self assert: (newClass classVariables size = 1).
+!
+
+testWithComment
+    | newClass newComment |
+    
+    newClass:= RGClassDefinition named: #Object.
+    newComment:= RGCommentDefinition new
+                        parent: newClass;
+                        content: 'This is a comment for test';
+                        stamp: 'VeronicaUquillas 3/22/2011 14:51';
+                        yourself.
+    newClass comment: newComment.
+
+    self assert: (newClass hasComment).
+    self assert: (newClass hasStamp).
+    self assert: (newClass = newComment parent).
+    self assert: (newComment content = 'This is a comment for test').
+    self assert: (newComment author = 'VeronicaUquillas').
+    self assert: (newComment timeStamp = '3/22/2011 14:51' asDateAndTime).
+    
+    newClass comment: nil.
+    self assert: (newClass hasComment not).
+    
+    newClass comment:  'This is a comment for test';
+              stamp: 'VeronicaUquillas 3/22/2011 14:51'.
+    
+    self assert: (newClass comment isRingObject).
+!
+
+testWithDefaultNamespace
+    | newClass |
+    
+    newClass:= RGClassDefinition named:  #Object.
+
+    self assert: (newClass parent = Smalltalk globals).
+    self assert: (newClass realClass = Object).
+!
+
+testWithInstanceVariables
+    | newClass instVar |
+    
+    newClass:= RGClassDefinition named: #OrderedCollection.
+    newClass addInstanceVariables: #(array firstIndex).
+    newClass addInstVarNamed: #lastIndex.
+    
+    self assert: (newClass instanceVariables size = 3).
+    self assert: (newClass instVarNames size = 3).
+    self assert: (newClass allInstVarNames size = 3).
+    
+    instVar:= newClass instanceVariableNamed: #firstIndex.
+    self assert: (instVar notNil).
+    self assert: (instVar parent = newClass).
+    self assert: (instVar isInstanceVariable).
+    self assert: (instVar isVariable).
+    self assert: (instVar parentName == newClass name).
+    self assert: (instVar realClass = OrderedCollection).
+    
+    newClass removeInstVarNamed: #array.
+    self assert: (newClass instanceVariables size = 2).
+    self assert: ((newClass instanceVariableNamed: #array) isNil).
+    
+!
+
+testWithPoolDictionaries
+    | newClass poolVar |
+    
+    newClass:= (RGClassDefinition named:  #Text)
+                        addSharedPoolNamed: #TextConstants;
+                        yourself.
+
+    self assert: (newClass sharedPools size = 1).
+    self assert: (newClass sharedPoolNames size = 1).
+    self assert: (newClass allSharedPools size = 1).  "no hierarchy"
+    self assert: (newClass allSharedPoolNames size = 1).
+    
+    poolVar:= newClass sharedPoolNamed: #TextConstants.
+    self assert: (poolVar notNil).
+    self assert: (poolVar isPoolVariable).
+    self assert: (poolVar isVariable).
+    self assert: (poolVar parent = newClass).
+    self assert: (poolVar parentName == newClass name).
+    self assert: (poolVar realClass = Text).
+    
+    newClass withMetaclass.
+    self assert: (newClass theMetaClass allSharedPoolNames size = 1).
+    
+    newClass removeSharedPoolNamed: #TextConstants.
+    self assert: (newClass sharedPools isEmpty).
+!
+
+testWithProtocols
+    | newMethod newClass |
+    
+    newClass:= RGClassDefinition named: #OrderedCollection.
+    newMethod:= (RGMethodDefinition named: #add:)
+                     parent: newClass;
+                    protocol: 'adding'; 
+                    sourceCode: 'add: newObject
+                                    ^self addLast: newObject'.
+    
+    newClass addMethod: newMethod.
+    newClass addProtocol: 'accessing'.
+    
+    self assert: (newClass hasProtocols).
+    self assert: (newClass protocols size = 2).
+    self assert: (newClass includesProtocol: 'accessing').
+    self assert: ((newClass methodsInProtocol: 'adding') size = 1).
+    self assert: ((newClass methodsInProtocol: 'accessing') isEmpty)
+!
+
+testWithSuperclass
+    | newClass supClass  |
+    
+    supClass:= (RGClassDefinition named:  #Object)
+                        superclassName: #ProtoObject;
+                        yourself.
+
+    self assert: (supClass hasSuperclass not).
+    self assert: (supClass superclassName == #ProtoObject).   "kept as annotation"
+    self assert: (supClass annotations size = 1).
+    
+    newClass := (RGClassDefinition named: #OrderedCollection) superclass: supClass.
+    self assert: (newClass superclass = supClass).
+    self assert: (newClass superclassName == #Object).
+    self assert: (newClass withAllSuperclasses size = 2).
+    self assert: (newClass allSuperclasses size = 1).
+    
+    self assert: (supClass subclasses size = 1).
+    self assert: (supClass withAllSubclasses size = 2).
+    self assert: (supClass allSubclasses size = 1).
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/RGCommentDefinitionTest.st	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,107 @@
+"{ Package: 'stx:goodies/ring/tests' }"
+
+"{ NameSpace: Smalltalk }"
+
+TestCase subclass:#RGCommentDefinitionTest
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Ring-Core-Kernel-Tests'
+!
+
+RGCommentDefinitionTest comment:'SUnit tests for comment definitions'
+!
+
+!RGCommentDefinitionTest methodsFor:'testing'!
+
+testActiveComment
+
+    | rgComment |
+    rgComment := RGCommentDefinition realClass: RGClassDefinition.
+    self assert: rgComment isActive.
+    self assert: rgComment sourcePointer isNil.
+    self assert: rgComment content notNil.
+    self assert: rgComment stamp notNil.
+    rgComment content: ''.
+    "it always reads from the organization and the previous changes was not commited"
+    self assert: rgComment content ~= ''.
+    
+    rgComment fromActiveToPassive.
+    self assert: rgComment isPassive.
+    self assert: rgComment sourcePointer isNil.
+    self assert: rgComment content notNil.
+    self assert: rgComment stamp notNil.
+    rgComment content: ''.
+    self assert: rgComment content = ''.
+    
+    rgComment := RGCommentDefinition realClass: RGClassDefinition.
+    rgComment fromActiveToHistorical.
+    self assert: rgComment isHistorical.
+    self assert: rgComment sourcePointer notNil.
+    self assert: rgComment content notNil.
+    self assert: rgComment stamp notNil.
+    rgComment content: ''.
+    "it always reads from the source file and the previous changes was not commited"
+    self assert: rgComment content ~= ''
+!
+
+testCommentFromSourceFile
+    | rgComment |
+    
+    rgComment := (RGCommentDefinition realClass: RGClassDefinition) asHistorical.
+    self assert: rgComment isHistorical.
+    self assert: rgComment sourcePointer notNil.
+    self assert: rgComment content notNil.
+    self assert: rgComment stamp notNil
+!
+
+testCommentWithoutAuthor
+    | newComment |
+    
+    newComment:= RGCommentDefinition new
+                        content: 'This is a comment for test';
+                        stamp: '3/22/2011 14:51';
+                        yourself.
+    
+    self assert: (newComment hasAuthor not).
+!
+
+testNewComment
+    | newComment |
+    
+    newComment:= RGCommentDefinition new
+                        content: 'This is a comment for test';
+                        stamp: 'VeronicaUquillas 3/22/2011 14:51';
+                        yourself.
+    
+    self assert: newComment isComment.
+    self assert: newComment isPassive.
+    self assert: newComment name = #Comment.
+    self assert: newComment hasStamp.
+    self assert: newComment hasAuthor.
+    self assert: newComment timeStamp notNil.
+    
+    self assert: (newComment author = 'VeronicaUquillas').
+    self assert: (newComment timeStamp = '3/22/2011 14:51' asDateAndTime).
+    self assert: (newComment parent = nil).
+    self assert: (newComment environment = Smalltalk globals).
+!
+
+testSorting
+
+    | rgComm1 rgComm2 |
+    rgComm1 := RGCommentDefinition realClass: RGClassDefinition.
+    rgComm2 := RGCommentDefinition realClass: RGElementDefinition.
+    self assert: rgComm1 <= rgComm2
+!
+
+testingConversion
+    
+    | rgComm |
+    rgComm := RGCommentDefinition realClass: RGClassDefinition.
+    self assert: rgComm asString equals: 'RGClassDefinition Comment'.
+    
+    rgComm := RGCommentDefinition class: (RGClassDefinition named: #Foo).
+    self assert: rgComm asString equals: 'Foo Comment'
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/RGContainerTest.st	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,14 @@
+"{ Package: 'stx:goodies/ring/tests' }"
+
+"{ NameSpace: Smalltalk }"
+
+TestCase subclass:#RGContainerTest
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Ring-Core-Containers-Tests'
+!
+
+RGContainerTest comment:'SUnit tests for container'
+!
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/RGGlobalDefinitionTest.st	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,60 @@
+"{ Package: 'stx:goodies/ring/tests' }"
+
+"{ NameSpace: Smalltalk }"
+
+TestCase subclass:#RGGlobalDefinitionTest
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Ring-Core-Kernel-Tests'
+!
+
+RGGlobalDefinitionTest comment:'SUnit tests for global definitions (pools, global variables)'
+!
+
+
+!RGGlobalDefinitionTest methodsFor:'testing'!
+
+testEquality
+    | global1 global2 |
+    
+    global1 := RGGlobalVariableDefinition named: #Transcript.
+    global2 := RGGlobalVariableDefinition named: #Transcript.
+    self assert: global1 = global2.
+    
+    global2 := RGGlobalVariableDefinition named: #Transcript2.
+    self deny: global1 = global2.
+!
+
+testGlobalVariableDefinition
+    | global  |
+    
+    global:= RGGlobalVariableDefinition named:  #Transcript.
+    self assert: (global isGlobalVariable).
+    self assert: (global parent = Smalltalk globals).
+!
+
+testPoolDefinition
+    | pool newClass |
+    pool := RGClassDefinition createSharedPoolNamed: #TextConstants.
+    self assert: pool isPool.
+    self assert: pool users isEmpty.
+    self assert: pool parent equals: Smalltalk globals.
+    newClass := RGClassDefinition named: #OrderedCollection.
+    pool addUser: newClass.
+    self assert: pool users size equals: 1.
+    self assert: (pool includesUser: newClass).
+    self assert: (newClass sharedPoolNamed: #TextConstants) isPoolVariable.
+    pool := RGClassDefinition named: #TextConstants.
+    pool superclassName: #SharedPool.
+    self assert: pool isPool.
+    self assert: pool users isEmpty
+! !
+
+!RGGlobalDefinitionTest class methodsFor:'documentation'!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/RGMetaclassDefinitionTest.st	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,28 @@
+"{ Package: 'stx:goodies/ring/tests' }"
+
+"{ NameSpace: Smalltalk }"
+
+TestCase subclass:#RGMetaclassDefinitionTest
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Ring-Core-Kernel-Tests'
+!
+
+RGMetaclassDefinitionTest comment:'SUnit tests for Ring metaclass definitions'
+!
+
+!RGMetaclassDefinitionTest methodsFor:'testing'!
+
+testAsMetaclassDefinition
+    | rgClass class |
+    class := Class class.
+    rgClass:= class asRingDefinition.
+    
+    self assert: (rgClass isRingObject).
+    self assert: (rgClass isClass).  
+    self assert: (rgClass name == #'Class class').  
+    self assert: (rgClass category == class category).
+    self assert: (rgClass theMetaClass == rgClass).
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/RGMetatraitDefinitionTest.st	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,27 @@
+"{ Package: 'stx:goodies/ring/tests' }"
+
+"{ NameSpace: Smalltalk }"
+
+TestCase subclass:#RGMetatraitDefinitionTest
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Ring-Core-Kernel-Tests'
+!
+
+RGMetatraitDefinitionTest comment:'SUnit tests for Ring classtrait definitions'
+!
+
+!RGMetatraitDefinitionTest methodsFor:'testing'!
+
+testAsClassTraitfinition
+    | rgCTrait cTrait |
+    cTrait := TClass classTrait.
+    rgCTrait := cTrait asRingDefinition.
+    self assert: rgCTrait isRingObject.
+    self assert: rgCTrait isTrait.
+    self assert: rgCTrait name == #'TClass classTrait'.
+    self assert: rgCTrait category == cTrait category.
+    self assert: rgCTrait theMetaClass == rgCTrait
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/RGMethodDefinitionTest.st	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,320 @@
+"{ Package: 'stx:goodies/ring/tests' }"
+
+"{ NameSpace: Smalltalk }"
+
+TestCase subclass:#RGMethodDefinitionTest
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Ring-Core-Kernel-Tests'
+!
+
+RGMethodDefinitionTest comment:'SUnit tests for method definitions'
+!
+
+!RGMethodDefinitionTest methodsFor:'* As yet uncategorized *'!
+
+foo	^ 'second version'
+! !
+
+!RGMethodDefinitionTest methodsFor:'testing'!
+
+testAsActive
+    | newMethod |
+
+    RGMethodDefinitionTest compile: 'foo	^ ''first version'''.
+    newMethod := (RGMethodDefinitionTest >> #foo) asActiveRingDefinition.
+    self assert: newMethod isActive.	
+    self assert: newMethod sourcePointer isNil.
+    self assert: newMethod sourceCode = newMethod compiledMethod sourceCode.
+
+    RGMethodDefinitionTest compile: 'foo	^ ''second version'''.
+    self assert: newMethod sourceCode = newMethod compiledMethod sourceCode.
+    
+    newMethod := (Trait >> #asRingDefinition) asActiveRingDefinition.
+    newMethod fromActiveToPassive.
+    self assert: newMethod isPassive.
+    self assert: newMethod sourceCode = (Trait >> #asRingDefinition) sourceCode.
+    newMethod sourceCode: 'asRingDefinition   ^true'.
+    self assert: newMethod sourceCode ~= (Trait >> #asRingDefinition) sourceCode.
+    
+    newMethod := (Trait >> #asRingDefinition) asActiveRingDefinition.
+    newMethod fromActiveToHistorical.
+    self assert: newMethod isHistorical.
+    self assert: newMethod sourcePointer notNil.
+!
+
+testAsHistorical
+    | firstVersion secondVersion |
+
+    RGMethodDefinitionTest compile: 'foo	^ ''first version'''.
+    firstVersion := (RGMethodDefinitionTest >> #foo) asHistoricalRingDefinition.
+    self assert: firstVersion isHistorical.
+    self assert: firstVersion sourceCode = firstVersion compiledMethod sourceCode.
+    self assert: firstVersion stamp = firstVersion compiledMethod timeStamp.
+
+    RGMethodDefinitionTest compile: 'foo	^ ''second version'''.
+    secondVersion := (RGMethodDefinitionTest >> #foo) asHistoricalRingDefinition.
+    self assert: secondVersion isHistorical.
+    self assert: secondVersion sourceCode = secondVersion compiledMethod sourceCode.
+    self assert: secondVersion stamp = secondVersion compiledMethod timeStamp.
+
+    self deny: firstVersion sourcePointer = secondVersion sourcePointer.
+    self deny: firstVersion sourceCode = secondVersion sourceCode.
+!
+
+testAsMethodDefinition
+    | newMethod |
+
+    newMethod:= (OrderedCollection >> #size) asRingDefinition.
+    
+    self assert: (newMethod isRingObject).
+    self assert: newMethod parent isNil.
+    self assert: (newMethod isMethod).  
+    self assert: (newMethod selector == #size).  
+    self assert: (newMethod protocol notNil).
+    self assert: (newMethod stamp notNil).
+!
+
+testAsMethodDefinition2
+    "self debug: #testAsMethodDefinition2"
+    
+    | newMethod |
+    newMethod := (Object >> #printOn:) asRingDefinition.
+    self assert:  newMethod protocol = 'printing'.
+    
+    newMethod := (TCloneTest >> #testCopyEmpty) asRingDefinition.
+    self assert:  newMethod protocol = 'tests - copy - clone'.
+
+    newMethod := (ArrayTest >> #testCopyEmpty) asRingDefinition.
+    self assert:  newMethod protocol = 'tests - copy - clone'.
+
+    "Modified (format): / 28-08-2015 / 12:18:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+testAsPassive
+    | newMethod |
+
+    RGMethodDefinitionTest compile: 'foo	^ ''first version'''.
+    newMethod := (RGMethodDefinitionTest >> #foo) asPassiveRingDefinition.
+    self assert: newMethod isPassive.
+    self assert: newMethod sourceCode = newMethod compiledMethod sourceCode.
+
+    RGMethodDefinitionTest compile: 'foo	^ ''second version'''.
+    self assert: newMethod sourceCode = 'foo	^ ''first version'''.		
+    self assert: newMethod compiledMethod sourceCode = 'foo	^ ''second version'''.
+!
+
+testClassNameSelectorIsMetaSide
+    "self debug: #testClassNameSelectorIsMetaSide"
+    
+    | rg |
+    rg := RGMethodDefinition className: 'Point' selector: #x  isMetaSide: false. 	
+    self assert: (rg parentName = 'Point').
+    self assert: (rg parent isKindOf:RGClassDefinition).
+    self assert: (rg selector = #x).
+    self assert: (rg isMetaSide not).
+!
+
+testCreatingMethodsWithoutFactory
+    | newMethod newClass |
+
+    newMethod := RGMethodDefinition realClass: OrderedCollection selector: 'size'.
+    self assert: (newMethod isMethod).  
+    self assert: (newMethod selector == #size).  
+    self assert: (newMethod protocol notNil).
+    self assert: (newMethod sourceCode notEmpty).
+    self assert: (newMethod stamp notNil).
+    
+    newClass := RGClassDefinition named: #OrderedCollection.
+    newMethod := RGMethodDefinition class: newClass selector: 'size'.
+    self assert: (newMethod isMethod).  
+    self assert: (newMethod selector == #size).  
+    self assert: (newMethod protocol isNil).
+    self assert: (newMethod sourceCode isNil).
+    self assert: (newMethod stamp isNil).
+    
+    newMethod := RGMethodDefinition realClass: OrderedCollection theMetaClass selector: #arrayType.
+    self assert: (newMethod isMethod).  
+    self assert: (newMethod selector == #arrayType).  
+    self assert: (newMethod protocol notNil).
+    self assert: (newMethod sourceCode notEmpty).
+    self assert: (newMethod stamp notNil).
+!
+
+testDifferentObjectButSameMethodInSet
+    "self debug: #testDifferentObjectButSameMethodInSet"
+
+    | s rgmethod rgmethod2 |
+    s := Set new.
+    rgmethod := (OrderedCollection >> #size) asRingDefinition.
+    s add: rgmethod. 
+    rgmethod2 := (OrderedCollection >> #size) asRingDefinition.
+    s add: rgmethod2.
+    
+    self assert: (s size = 1).
+    self assert: (s includes: rgmethod).
+    self assert: (s includes: rgmethod2).
+
+    "Modified (format): / 28-08-2015 / 12:18:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+testExistingMethodWithClass
+    | newMethod newClass |
+    
+    newClass:=RGClassDefinition named: #OrderedCollection.
+    newMethod:= (RGMethodDefinition named: #add:)
+                     parent: newClass;
+                    protocol: 'adding';
+                    sourceCode: 'add: newObject
+                                    ^self addLast: newObject'.
+                                    
+    self assert: (newMethod isMethod).
+    self assert: (newMethod selector == #add:).
+    self assert: (newMethod isMetaSide not).
+    
+    self assert: (newMethod parent = newClass).
+    self assert: (newMethod parentName == newClass name).
+    
+    self assert: (newMethod parent parent == Smalltalk globals).
+    self assert: (newMethod realClass = OrderedCollection).
+    self assert: (newMethod compiledMethod = (OrderedCollection compiledMethodAt: #add:)).
+!
+
+testExistingMethodWithPointer
+    | newMethod |
+    
+    newMethod:= (OrderedCollection >> #size) asActiveRingDefinition.
+                                    
+    self assert: (newMethod parent isNil).
+    self assert: (newMethod parentName == #OrderedCollection).
+    self assert: (newMethod sourceCode notNil).
+    self assert: (newMethod protocol notNil).
+    self assert: (newMethod stamp notNil).
+    self assert: (newMethod isExtension not)
+
+    "Modified (format): / 28-08-2015 / 12:18:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+testExistingMethodWithoutClass
+    "its parent class is not assigned only its name"
+    | newMethod |
+    
+    newMethod:= (RGMethodDefinition named: #add:)
+                    parentName: #OrderedCollection;
+                    selector: #add:; 
+                    isMetaSide: false;
+                    protocol: 'adding'; 
+                    sourceCode: 'add: newObject
+                                    ^self addLast: newObject'.
+    
+    self assert: (newMethod isMethod).
+    self assert: (newMethod selector == #add:).
+    self assert: (newMethod isMetaSide not).
+    self assert: (newMethod protocol = #adding).
+    self assert: (newMethod fullName = 'OrderedCollection>>add:').
+    self assert: (newMethod sourceCode = 'add: newObject
+                                    ^self addLast: newObject').
+    self assert: (newMethod hasStamp not).
+    self assert: (newMethod parent isNil).
+    self assert: (newMethod parentName == #OrderedCollection).
+    
+    self assert: (newMethod environment == Smalltalk globals).
+    self assert: (newMethod realClass = OrderedCollection).
+    self assert: (newMethod compiledMethod = (OrderedCollection compiledMethodAt: #add:))
+!
+
+testExtensionMethod
+    | newMethod newClass newPackage newPackageExt |
+
+    newMethod:= (RGMethodDefinition named: #+)
+                    isExtension: true.
+    self assert: (newMethod protocol isNil).
+    self assert: (newMethod isExtension).
+
+    newMethod:= (Collection >> #+) asRingDefinition.	
+    self assert: (newMethod isMethod).  
+    self assert: (newMethod protocol = '*Collections-arithmetic').
+    self assert: (newMethod isExtension).
+    
+    newPackage := RGPackage named: #Package.
+    newPackageExt := RGPackage named:  #PackageExtensions.
+    newClass := RGClassDefinition named: #Class.
+    newMethod := (RGMethodDefinition named: #foo) parent: newClass.
+    newPackage addClass: newClass.
+    newMethod package: newPackageExt.
+    self assert: (newMethod isExtension).
+!
+
+testMethodEquality
+
+    | newMethod newClass |
+    self assert: (OrderedCollection >> #size) asRingDefinition = (OrderedCollection >> #size) asRingDefinition.
+    
+    newMethod := ((OrderedCollection >> #size) asRingDefinition)
+                    sourceCode: 'size
+                        ^0'.
+    self assert: ((OrderedCollection >> #size) asRingDefinition = newMethod).
+    
+    newClass:= RGClassDefinition named: #OrderedCollection.
+    newMethod:= (RGMethodDefinition named: #size) parent: newClass.
+    self assert: ((OrderedCollection >> #size) asRingDefinition = newMethod).
+    
+    newMethod:= (RGMethodDefinition named: #size) parent: (SortedCollection asRingDefinition).
+    self deny: ((OrderedCollection >> #size) asRingDefinition = newMethod).
+
+    "Modified (format): / 28-08-2015 / 12:19:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+testNonExistingMethodWithClass
+    "method does not exist in OrderedCollection"
+    | newMethod newClass |
+    
+    newClass:= RGClassDefinition named: #OrderedCollection.
+    newClass withMetaclass.
+    
+    newMethod:= (RGMethodDefinition named: #foo) parent: newClass theMetaClass.
+    newMethod sourceCode: 'foo
+                                    ^true'.
+                                    
+    self assert: (newMethod isMethod).
+    self assert: (newMethod selector == #foo).
+    self assert: (newMethod isMetaSide).
+    self assert: (newMethod protocol = nil).
+    
+    self assert: (newMethod parent = newClass theMetaClass).
+    self assert: (newMethod parentName = newClass theMetaClass name).
+    
+    self assert: (newMethod environment == Smalltalk globals).
+    self assert: (newMethod realClass = OrderedCollection class).
+    self assert: (newMethod compiledMethod isNil).
+!
+
+testSameMethodInSet
+    "self debug: #testSameMethodInSet"
+
+    | s rgmethod |
+    s := Set new.
+    rgmethod := (OrderedCollection >> #size) asRingDefinition.
+    s add: rgmethod. 
+    self assert: (s includes: rgmethod).
+    
+    s add: rgmethod. 
+    self assert: (s size = 1).
+    self assert: (s includes: rgmethod).
+
+    "Modified (format): / 28-08-2015 / 12:19:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+testSorting
+
+    | rgMethod1 rgMethod2 |
+    rgMethod1 := RGMethodDefinition realClass: RGInstanceVariableDefinition selector: #isInstanceVariable.
+    rgMethod2 := RGMethodDefinition realClass: RGElementDefinition selector: #isMetaSide.
+    self assert: rgMethod2 <= rgMethod1.
+    
+    rgMethod1 := RGMethodDefinition realClass: RGElementDefinition selector: #parentName.
+    self assert: rgMethod2 <= rgMethod1. 
+    
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/RGNamespaceTest.st	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,38 @@
+"{ Package: 'stx:goodies/ring/tests' }"
+
+"{ NameSpace: Smalltalk }"
+
+TestCase subclass:#RGNamespaceTest
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Ring-Core-Containers-Tests'
+!
+
+RGNamespaceTest comment:'SUnit tests for namespaces'
+!
+
+!RGNamespaceTest methodsFor:'testing'!
+
+testCreatingNamespace
+    | newNamespace newPackage newClass |
+    
+    newNamespace := RGNamespace named: #'RingNamespace'.
+    newPackage := RGPackage named:  #'Collections-Sequenceable'.
+    newClass:= RGClassDefinition named: #OrderedCollection.
+    newPackage addClass: newClass.
+    newNamespace addPackage: newPackage;
+        addClass: newClass.
+    
+    self assert: (newNamespace isNamespace).
+    self assert: ((newNamespace packageNamed: #'Collections-Sequenceable') == newPackage).
+    self assert: ((newNamespace classNamed: #OrderedCollection) == newClass).
+    self assert: (newNamespace methods isEmpty).
+    self assert: (newNamespace pools isEmpty).
+    self assert: (newNamespace globalVariables isEmpty).
+    
+    newNamespace removeClass: newClass.
+    self assert: ((newNamespace classNamed: #OrderedCollection) isNil).
+    self assert: ((newPackage classNamed: #OrderedCollection) notNil).
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/RGPackageTest.st	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,56 @@
+"{ Package: 'stx:goodies/ring/tests' }"
+
+"{ NameSpace: Smalltalk }"
+
+TestCase subclass:#RGPackageTest
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Ring-Core-Containers-Tests'
+!
+
+RGPackageTest comment:'SUnit tests for packages'
+!
+
+!RGPackageTest methodsFor:'testing'!
+
+testAddingClass
+    | newPackage newClass |
+    
+    newPackage:= RGPackage named: #'Collections-Sequenceable'.
+    newClass:= RGClassDefinition named: #OrderedCollection.
+    newPackage addClass: newClass.
+    
+    self assert: (newPackage hasClasses).
+    self assert: (newClass package == newPackage).
+    self assert: ((newPackage classNamed: #OrderedCollection) == newClass)
+!
+
+testAddingPackage
+    | newPackage childPackage |
+    
+    newPackage:= RGPackage named: #'Collections'.
+    newPackage addPackageNamed: #'Collections-Sequenceable'.
+        
+    self assert: (newPackage includesPackageNamed: #'Collections-Sequenceable').
+    self assert: (newPackage packages size = 1).
+    
+    childPackage:= newPackage packageNamed: #'Collections-Sequenceable'.
+    self assert: (childPackage parent = newPackage parent).
+    self assert: (childPackage package = newPackage).
+!
+
+testNewPackage
+    | newPackage |
+    
+    newPackage:= RGPackage named: 'Collections-Sequenceable'.
+    
+    self assert: (newPackage isPackage).
+    self assert: (newPackage name = 'Collections-Sequenceable').
+    self assert: (newPackage classes isEmpty).
+    self assert: (newPackage traits isEmpty).
+    self assert: (newPackage packages isEmpty).
+    self assert: (newPackage package isNil).
+    self assert: (newPackage parent == Smalltalk globals).
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/RGSliceTest.st	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,70 @@
+"{ Package: 'stx:goodies/ring/tests' }"
+
+"{ NameSpace: Smalltalk }"
+
+TestCase subclass:#RGSliceTest
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Ring-Core-Containers-Tests'
+!
+
+RGSliceTest comment:'SUnit tests for slices'
+!
+
+!RGSliceTest methodsFor:'testing'!
+
+testAddingClasses
+    | newSlice newClass newTrait  |
+    
+    newSlice:= RGSlice named: 'Foo'.
+    newClass:= RGClassDefinition named: #OrderedCollection.
+    newTrait:=  RGTraitDefinition named: #TSortable.
+    
+    newSlice addClassNamed: #SortedCollection;
+             addClass: newClass;
+             addTrait: newTrait.
+    
+    self assert: (newSlice classes size = 3).
+    self assert: (newSlice traits size = 1).
+    self assert: (newSlice includesClassNamed: #OrderedCollection).
+    self assert: ((newSlice classNamed: #OrderedCollection) == newClass).
+    self assert: ((newSlice traitNamed: #TSortable) == newTrait).
+    self assert: (newClass isIncludedInContainer: newSlice).
+    self assert: (newTrait isIncludedInContainer: newSlice).
+    self assert: (newSlice allClasses size = 3).
+    self assert: (newSlice allTraits size = 1).
+    self assert: (newClass parent = newSlice).
+    self assert: (newClass rootEnvironment = newSlice environment)
+!
+
+testNestingContainers
+    | newSlice newSlice2 newClass newTrait newClass2 |
+    
+    newSlice:= RGSlice named: #Root.
+    newSlice2:= RGSlice named: #Child.
+    newSlice2 environment: newSlice.
+    
+    newSlice addClassNamed: #OrderedCollection.
+    newClass:= newSlice classNamed: #OrderedCollection.
+    newSlice addTraitNamed: #TSortable.
+    newTrait:= newSlice traitNamed: #TSortable.
+    newSlice2 addClassNamed: #SortedCollection.
+    newClass2:= newSlice classNamed: #SortedCollection.
+    
+    self assert: (newSlice classes size = 2).
+    self assert: (newSlice2 classes size = 1).
+    self assert: (newSlice2 environment = newSlice).
+    self assert: (newSlice2 rootEnvironment = newSlice environment)
+!
+
+testNewSlice
+    | newSlice |
+    
+    newSlice:= RGSlice named: 'Foo'.
+    
+    self assert: (newSlice isSlice).
+    self assert: (newSlice classes isEmpty).
+    self assert: (newSlice environment == Smalltalk globals)
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/RGTraitDefinitionTest.st	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,129 @@
+"{ Package: 'stx:goodies/ring/tests' }"
+
+"{ NameSpace: Smalltalk }"
+
+TestCase subclass:#RGTraitDefinitionTest
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Ring-Core-Kernel-Tests'
+!
+
+RGTraitDefinitionTest comment:'SUnit tests for trait definitions'
+!
+
+!RGTraitDefinitionTest methodsFor:'testing'!
+
+testAddingMethods
+    | newMethod newClass |
+    
+    newClass:= RGTraitDefinition named:  #TSortable.
+    newMethod:= (RGMethodDefinition named: #sort) parent: newClass;
+                    protocol: 'sorting'; 
+                    sourceCode: 'sort
+                                    self sort: [:a :b | a <= b]'.
+    
+    self assert: (newMethod isMetaSide not).
+    self assert: (newClass hasMethods not).
+
+    newClass addMethod: newMethod.
+    newClass addSelector: #size 
+               classified: 'accessing' 
+               sourced: 'foo
+                            ^lastIndex - firstIndex + 1'.
+    
+    self assert: (newClass hasMethods).
+    self assert: (newClass selectors = #(sort size)).
+    self assert: (newClass includesSelector: #sort).
+    self assert: ((newClass methodNamed: #sort) = newMethod).
+    self assert: (newClass methods size = 2).
+    self assert: (newClass selectors size = 2).
+    self assert: (newClass allSelectors size = 2).  "no hierarchy"
+
+    newMethod:= newClass methodNamed: #size.
+    self assert: (newMethod parent = newClass).
+    
+    self assert: ((newClass compiledMethodNamed: #sort) notNil).
+    self assert: ((newClass compiledMethodNamed: #foo) isNil)
+!
+
+testAsTraitDefinition
+
+    | newTrait |
+    newTrait:= TBehavior asRingDefinition.
+    self assert: (newTrait isRingObject).
+    self assert: (newTrait isTrait).  
+    self assert: (newTrait name == #TBehavior).  
+    self assert: (newTrait category notNil).
+    self assert: (newTrait superclassName notNil).
+    
+    
+    self assert: (newTrait theMetaClass isRingObject).
+    self assert: (newTrait theMetaClass isTrait).
+    self assert: (newTrait theMetaClass traitCompositionSource = '{}').
+!
+
+testAsTraitDefinition2
+
+    | newTrait newClass newSlice |
+    newClass := Trait asRingDefinitionWithMethods: false withSuperclasses: false withSubclasses: true withPackages: false.
+    newSlice := newClass environment.
+    self assert: (newClass allSubclasses size = Smalltalk globals environment allTraits size).
+    self assert: newClass traitNames size = 1.
+    self assert: newClass traits first = (newSlice traitNamed: #TClass).
+    
+    newTrait := TBehaviorCategorization asRingDefinitionWithMethods: true withSuperclasses: true withSubclasses: false withPackages: true.
+    newSlice := newTrait environment.
+    self assert: newTrait superclass = (newSlice classNamed: #Trait).
+    self assert: newTrait methods size < newSlice methods size.
+    self assert: newTrait category = #'Traits-Kernel-Traits'.
+    self assert: newTrait package = (newSlice packageNamed: #Traits).
+    self assert: newTrait subclasses isEmpty.
+!
+
+testExistingTrait
+    | newClass metaClass |
+    
+    newClass:= RGTraitDefinition named:  #TSortable.
+    self assert: (newClass isTrait).
+    self assert: (newClass isDefined).
+    self assert: (newClass realClass = TSortable).
+    self assert: (newClass isMeta not).
+    
+    newClass withMetaclass.
+    self assert: (newClass hasMetaclass).
+    metaClass:= newClass theMetaClass.
+    self assert: (metaClass isMeta).
+    self assert: (metaClass name = 'TSortable classTrait').
+    self assert: (metaClass theNonMetaClass = newClass).
+    self assert: (metaClass realClass = TSortable theMetaClass).
+!
+
+testNonExistingClass
+    | newClass |
+    
+    newClass:= RGTraitDefinition named:  #TConnection.
+    self assert: (newClass isTrait).
+    self assert: (newClass hasMetaclass not).
+    self assert: (newClass hasComment not).
+    self assert: (newClass hasStamp not).
+    self assert: (newClass parent = Smalltalk globals).
+    self assert: (newClass package isNil).
+    self assert: (newClass category isNil).
+    self assert: (newClass hasMethods not).
+    self assert: (newClass hasSuperclass not).
+    self assert: (newClass hasTraitComposition not).
+    self assert: (newClass isDefined not).
+    self assert: (newClass hasProtocols not).
+!
+
+testTraitEquality
+
+    | newClass |
+    self assert: TSortable asRingDefinition = TSortable asRingDefinition.
+    
+    newClass := (TSortable asRingDefinition)
+        category: #Kernel.
+    self assert: (TSortable asRingDefinition = newClass) 
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/RGVariableDefinitionTest.st	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,110 @@
+"{ Package: 'stx:goodies/ring/tests' }"
+
+"{ NameSpace: Smalltalk }"
+
+TestCase subclass:#RGVariableDefinitionTest
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Ring-Core-Kernel-Tests'
+!
+
+RGVariableDefinitionTest comment:'SUnit tests for variable definitions'
+!
+
+!RGVariableDefinitionTest methodsFor:'testing'!
+
+testClassInstanceVariable
+    | instVar newClass metaClass |
+    
+    instVar:= RGClassInstanceVariableDefinition named: 'sizes'.
+    
+    self assert: (instVar isClassInstanceVariable).
+    self assert: (instVar isVariable).
+    self assert: (instVar name = 'sizes').
+    self assert: (instVar parent isNil).
+    self assert: (instVar isMetaSide).
+    
+    newClass:= RGClassDefinition named: #OrderedCollection.
+    newClass withMetaclass.
+    metaClass:= newClass theMetaClass.
+    instVar:= metaClass addInstVarNamed: 'sizes'.
+    self assert: (instVar parent = metaClass).	
+    self assert: (metaClass instanceVariables size = 1).
+!
+
+testClassVariable
+    | instVar newClass |
+    
+    instVar:= RGClassVariableDefinition named: 'DependentsFields'.
+    
+    self assert: (instVar isClassVariable).
+    self assert: (instVar isVariable).
+    self assert: (instVar name = 'DependentsFields').
+    self assert: (instVar parent isNil).
+    self assert: (instVar isMetaSide not).   
+    
+    newClass:= RGClassDefinition named: #Object.
+    instVar:= (RGClassVariableDefinition named: 'DependentsFields') parent: newClass.
+    
+    self assert: (instVar parent = newClass).
+    self assert: (newClass classVariables isEmpty).
+    
+    newClass classVariables add: instVar.
+    self assert: (newClass classVariables size = 1).
+!
+
+testInstanceVariable
+    | instVar newClass |
+    
+    instVar:= RGInstanceVariableDefinition named: 'size'.
+    
+    self assert: (instVar isInstanceVariable).
+    self assert: (instVar isVariable).
+    self assert: (instVar name = 'size').
+    self assert: (instVar parent isNil).
+    self assert: (instVar isMetaSide not).
+    
+    newClass:= RGClassDefinition named: #OrderedCollection.
+    instVar:= newClass addInstVarNamed: 'array'.
+    self assert: (instVar parent = newClass).
+    self assert: (newClass instanceVariables size = 1).
+!
+
+testPoolVariable
+    | poolVar newClass |
+    
+    poolVar:= RGPoolVariableDefinition named: 'TextConstants'.
+    
+    self assert: (poolVar isPoolVariable).
+    self assert: (poolVar isVariable).
+    self assert: (poolVar name = 'TextConstants').
+    self assert: (poolVar parent isNil).
+    self assert: (poolVar isMetaSide not).
+    
+    newClass:= RGClassDefinition named: #OrderedCollection.
+    poolVar:= (RGPoolVariableDefinition named:  'TextConstants' ) parent: newClass.
+    self assert: (poolVar parent = newClass).
+    self assert: (newClass sharedPools isEmpty).
+    
+    newClass sharedPools add: poolVar.
+    self assert: (newClass sharedPools size = 1).
+!
+
+testVariableEquality
+
+    | variable1 variable2|
+    
+    variable1 := (OrderedCollection asRingDefinition) instanceVariableNamed: #array.
+    variable2 := (OrderedCollection asRingDefinition) instanceVariableNamed: #array.
+    self assert: variable1 = variable2.
+
+    variable1 := (RGClassVariableDefinition named:  #Foo) parentName: #Test.
+    variable2 := (RGClassVariableDefinition named:  #Foo) parentName: #Test.
+    self assert: variable1 = variable2.
+    
+    variable2 := (RGClassVariableDefinition named:  #Foo) parentName: #Test2.
+    self deny: variable1 = variable2.
+    
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/abbrev.stc	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,16 @@
+# automagically generated by the project definition
+# this file is needed for stc to be able to compile modules independently.
+# it provides information about a classes filename, category and especially namespace.
+RGClassDefinitionTest RGClassDefinitionTest stx:goodies/ring/tests 'Ring-Core-Kernel-Tests' 1
+RGCommentDefinitionTest RGCommentDefinitionTest stx:goodies/ring/tests 'Ring-Core-Kernel-Tests' 1
+RGContainerTest RGContainerTest stx:goodies/ring/tests 'Ring-Core-Containers-Tests' 1
+RGGlobalDefinitionTest RGGlobalDefinitionTest stx:goodies/ring/tests 'Ring-Core-Kernel-Tests' 1
+RGMetaclassDefinitionTest RGMetaclassDefinitionTest stx:goodies/ring/tests 'Ring-Core-Kernel-Tests' 1
+RGMetatraitDefinitionTest RGMetatraitDefinitionTest stx:goodies/ring/tests 'Ring-Core-Kernel-Tests' 1
+RGMethodDefinitionTest RGMethodDefinitionTest stx:goodies/ring/tests 'Ring-Core-Kernel-Tests' 1
+RGNamespaceTest RGNamespaceTest stx:goodies/ring/tests 'Ring-Core-Containers-Tests' 1
+RGPackageTest RGPackageTest stx:goodies/ring/tests 'Ring-Core-Containers-Tests' 1
+RGSliceTest RGSliceTest stx:goodies/ring/tests 'Ring-Core-Containers-Tests' 1
+RGTraitDefinitionTest RGTraitDefinitionTest stx:goodies/ring/tests 'Ring-Core-Kernel-Tests' 1
+RGVariableDefinitionTest RGVariableDefinitionTest stx:goodies/ring/tests 'Ring-Core-Kernel-Tests' 1
+stx_goodies_ring_tests stx_goodies_ring_tests stx:goodies/ring/tests '* Projects & Packages *' 3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/bc.mak	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,98 @@
+# $Header$
+#
+# DO NOT EDIT
+# automagically generated from the projectDefinition: stx_goodies_ring_tests.
+#
+# Warning: once you modify this file, do not rerun
+# stmkmp or projectDefinition-build again - otherwise, your changes are lost.
+#
+# Notice, that the name bc.mak is historical (from times, when only borland c was supported).
+# This file contains make rules for the win32 platform using either borland-bcc or visual-c.
+# It shares common definitions with the unix-make in Make.spec.
+# The bc.mak supports the following targets:
+#    bmake         - compile all st-files to a classLib (dll)
+#    bmake clean   - clean all temp files
+#    bmake clobber - clean all
+#
+# Historic Note:
+#  this used to contain only rules to make with borland
+#    (called via bmake, by "make.exe -f bc.mak")
+#  this has changed; it is now also possible to build using microsoft visual c
+#    (called via vcmake, by "make.exe -f bc.mak -DUSEVC")
+#
+TOP=..\..\..
+INCLUDE_TOP=$(TOP)\..
+
+
+
+!INCLUDE $(TOP)\rules\stdHeader_bc
+
+!INCLUDE Make.spec
+
+LIBNAME=libstx_goodies_ring_tests
+MODULE_PATH=goodies\ring\tests
+RESFILES=tests.$(RES)
+
+
+
+LOCALINCLUDES= -I$(INCLUDE_TOP)\jv\tea\compiler -I$(INCLUDE_TOP)\stx\goodies\ring -I$(INCLUDE_TOP)\stx\goodies\sunit -I$(INCLUDE_TOP)\stx\libbasic -I$(INCLUDE_TOP)\stx\libbasic2
+LOCALDEFINES=
+
+STCLOCALOPT=-package=$(PACKAGE) -I. $(LOCALINCLUDES) -headerDir=. $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES)  -varPrefix=$(LIBNAME)
+LOCALLIBS=
+
+OBJS= $(COMMON_OBJS) $(WIN32_OBJS)
+
+ALL::  classLibRule
+
+classLibRule: $(OUTDIR) $(OUTDIR)$(LIBNAME).dll
+
+!INCLUDE $(TOP)\rules\stdRules_bc
+
+# build all mandatory prerequisite packages (containing superclasses) for this package
+prereq:
+	pushd ..\..\..\libbasic & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+	pushd ..\..\..\libbasic2 & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+	pushd ..\..\..\libview & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+	pushd ..\..\..\libview2 & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+	pushd ..\..\sunit & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+
+
+
+
+
+
+
+test: $(TOP)\goodies\builder\reports\NUL
+	pushd $(TOP)\goodies\builder\reports & $(MAKE_BAT)
+	$(TOP)\goodies\builder\reports\report-runner.bat -D . -r Builder::TestReport -p $(PACKAGE)
+        
+clean::
+	del *.$(CSUFFIX)
+
+
+# BEGINMAKEDEPEND --- do not remove this line; make depend needs it
+$(OUTDIR)RGClassDefinitionTest.$(O) RGClassDefinitionTest.$(H): RGClassDefinitionTest.st $(INCLUDE_TOP)\stx\goodies\sunit\TestAsserter.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestCase.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)RGCommentDefinitionTest.$(O) RGCommentDefinitionTest.$(H): RGCommentDefinitionTest.st $(INCLUDE_TOP)\stx\goodies\sunit\TestAsserter.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestCase.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)RGContainerTest.$(O) RGContainerTest.$(H): RGContainerTest.st $(INCLUDE_TOP)\stx\goodies\sunit\TestAsserter.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestCase.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)RGGlobalDefinitionTest.$(O) RGGlobalDefinitionTest.$(H): RGGlobalDefinitionTest.st $(INCLUDE_TOP)\stx\goodies\sunit\TestAsserter.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestCase.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)RGMetaclassDefinitionTest.$(O) RGMetaclassDefinitionTest.$(H): RGMetaclassDefinitionTest.st $(INCLUDE_TOP)\stx\goodies\sunit\TestAsserter.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestCase.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)RGMetatraitDefinitionTest.$(O) RGMetatraitDefinitionTest.$(H): RGMetatraitDefinitionTest.st $(INCLUDE_TOP)\stx\goodies\sunit\TestAsserter.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestCase.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)RGMethodDefinitionTest.$(O) RGMethodDefinitionTest.$(H): RGMethodDefinitionTest.st $(INCLUDE_TOP)\stx\goodies\sunit\TestAsserter.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestCase.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)RGNamespaceTest.$(O) RGNamespaceTest.$(H): RGNamespaceTest.st $(INCLUDE_TOP)\stx\goodies\sunit\TestAsserter.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestCase.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)RGPackageTest.$(O) RGPackageTest.$(H): RGPackageTest.st $(INCLUDE_TOP)\stx\goodies\sunit\TestAsserter.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestCase.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)RGSliceTest.$(O) RGSliceTest.$(H): RGSliceTest.st $(INCLUDE_TOP)\stx\goodies\sunit\TestAsserter.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestCase.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)RGTraitDefinitionTest.$(O) RGTraitDefinitionTest.$(H): RGTraitDefinitionTest.st $(INCLUDE_TOP)\stx\goodies\sunit\TestAsserter.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestCase.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)RGVariableDefinitionTest.$(O) RGVariableDefinitionTest.$(H): RGVariableDefinitionTest.st $(INCLUDE_TOP)\stx\goodies\sunit\TestAsserter.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestCase.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)stx_goodies_ring_tests.$(O) stx_goodies_ring_tests.$(H): stx_goodies_ring_tests.st $(INCLUDE_TOP)\stx\libbasic\LibraryDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\ProjectDefinition.$(H) $(STCHDR)
+
+# ENDMAKEDEPEND --- do not remove this line
+
+# **Must be at end**
+
+# Enforce recompilation of package definition class if Mercurial working
+# copy state changes. Together with --guessVersion it ensures that package
+# definition class always contains correct binary revision string.
+!IFDEF HGROOT
+$(OUTDIR)stx_goodies_ring_tests.$(O): $(HGROOT)\.hg\dirstate
+!ENDIF
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/bmake.bat	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,10 @@
+@REM -------
+@REM make using Borland bcc32
+@REM type bmake, and wait...
+@REM do not edit - automatically generated from ProjectDefinition
+@REM -------
+@SET DEFINES=
+
+make.exe -N -f bc.mak  %DEFINES% %*
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/libInit.cc	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,46 @@
+/*
+ * $Header$
+ *
+ * DO NOT EDIT
+ * automagically generated from the projectDefinition: stx_goodies_ring_tests.
+ */
+#define __INDIRECTVMINITCALLS__
+#include <stc.h>
+
+#ifdef WIN32
+# pragma codeseg INITCODE "INITCODE"
+#endif
+
+#if defined(INIT_TEXT_SECTION) || defined(DLL_EXPORT)
+DLL_EXPORT void _libstx_goodies_ring_tests_Init() INIT_TEXT_SECTION;
+DLL_EXPORT void _libstx_goodies_ring_tests_InitDefinition() INIT_TEXT_SECTION;
+#endif
+
+void _libstx_goodies_ring_tests_InitDefinition(pass, __pRT__, snd)
+OBJ snd; struct __vmData__ *__pRT__; {
+__BEGIN_PACKAGE2__("libstx_goodies_ring_tests__DFN", _libstx_goodies_ring_tests_InitDefinition, "stx:goodies/ring/tests");
+_stx_137goodies_137ring_137tests_Init(pass,__pRT__,snd);
+
+__END_PACKAGE__();
+}
+
+void _libstx_goodies_ring_tests_Init(pass, __pRT__, snd)
+OBJ snd; struct __vmData__ *__pRT__; {
+__BEGIN_PACKAGE2__("libstx_goodies_ring_tests", _libstx_goodies_ring_tests_Init, "stx:goodies/ring/tests");
+_RGClassDefinitionTest_Init(pass,__pRT__,snd);
+_RGCommentDefinitionTest_Init(pass,__pRT__,snd);
+_RGContainerTest_Init(pass,__pRT__,snd);
+_RGGlobalDefinitionTest_Init(pass,__pRT__,snd);
+_RGMetaclassDefinitionTest_Init(pass,__pRT__,snd);
+_RGMetatraitDefinitionTest_Init(pass,__pRT__,snd);
+_RGMethodDefinitionTest_Init(pass,__pRT__,snd);
+_RGNamespaceTest_Init(pass,__pRT__,snd);
+_RGPackageTest_Init(pass,__pRT__,snd);
+_RGSliceTest_Init(pass,__pRT__,snd);
+_RGTraitDefinitionTest_Init(pass,__pRT__,snd);
+_RGVariableDefinitionTest_Init(pass,__pRT__,snd);
+_stx_137goodies_137ring_137tests_Init(pass,__pRT__,snd);
+
+
+__END_PACKAGE__();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/mingwmake.bat	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,13 @@
+@REM -------
+@REM make using mingw gnu compiler
+@REM type mingwmake, and wait...
+@REM do not edit - automatically generated from ProjectDefinition
+@REM -------
+@SET DEFINES=
+
+@pushd ..\..\..\rules
+@call find_mingw.bat
+@popd
+make.exe -N -f bc.mak %DEFINES% %USEMINGW_ARG% %*
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/stx_goodies_ring_tests.st	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,134 @@
+"{ Package: 'stx:goodies/ring/tests' }"
+
+"{ NameSpace: Smalltalk }"
+
+LibraryDefinition subclass:#stx_goodies_ring_tests
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'* Projects & Packages *'
+!
+
+
+!stx_goodies_ring_tests class methodsFor:'description'!
+
+excludedFromPreRequisites
+    "list packages which are to be explicitely excluded from the automatic constructed
+     prerequisites list. If empty, everything that is found along the inheritance of any of
+     my classes is considered to be a prerequisite package."
+
+    ^ #(
+    )
+!
+
+mandatoryPreRequisites
+    "list packages which are mandatory as a prerequisite.
+     This are packages containing superclasses of my classes and classes which
+     are extended by myself.
+     They are mandatory, because we need these packages as a prerequisite for loading and compiling.
+     This method is generated automatically,
+     by searching along the inheritance chain of all of my classes."
+
+    ^ #(
+        #'stx:goodies/sunit'    "TestAsserter - superclass of RGClassDefinitionTest"
+        #'stx:libbasic'    "LibraryDefinition - superclass of stx_goodies_ring_tests"
+    )
+!
+
+referencedPreRequisites
+    "list packages which are a prerequisite, because they contain
+     classes which are referenced by my classes.
+     We do not need these packages as a prerequisite for compiling or loading,
+     however, a class from it may be referenced during execution and having it
+     unloaded then may lead to a runtime doesNotUnderstand error, unless the caller
+     includes explicit checks for the package being present.
+     This method is generated automatically,
+     by searching all classes (and their packages) which are referenced by my classes."
+
+    ^ #(
+        #'jv:tea/compiler'    "TClass - referenced by RGMetatraitDefinitionTest>>testAsClassTraitfinition"
+        #'stx:goodies/ring'    "RGClassDefinition - referenced by RGClassDefinitionTest>>testAddingMethods"
+        #'stx:libbasic2'    "Text - referenced by RGClassDefinitionTest>>testWithPoolDictionaries"
+    )
+!
+
+subProjects
+    "list packages which are known as subprojects.
+     The generated makefile will enter those and make there as well.
+     However: they are not forced to be loaded when a package is loaded;
+     for those, redefine requiredPrerequisites."
+
+    ^ #(
+    )
+! !
+
+!stx_goodies_ring_tests class methodsFor:'description - contents'!
+
+classNamesAndAttributes
+    "lists the classes which are to be included in the project.
+     Each entry in the list may be: a single class-name (symbol),
+     or an array-literal consisting of class name and attributes.
+     Attributes are: #autoload or #<os> where os is one of win32, unix,..."
+
+    ^ #(
+        "<className> or (<className> attributes...) in load order"
+        RGClassDefinitionTest
+        RGCommentDefinitionTest
+        RGContainerTest
+        RGGlobalDefinitionTest
+        RGMetaclassDefinitionTest
+        RGMetatraitDefinitionTest
+        RGMethodDefinitionTest
+        RGNamespaceTest
+        RGPackageTest
+        RGSliceTest
+        RGTraitDefinitionTest
+        RGVariableDefinitionTest
+        #'stx_goodies_ring_tests'
+    )
+!
+
+extensionMethodNames
+    "list class/selector pairs of extensions.
+     A correponding method with real names must be present in my concrete subclasses"
+
+    ^ #(
+    )
+! !
+
+!stx_goodies_ring_tests class methodsFor:'description - project information'!
+
+companyName
+    "Returns a company string which will appear in <lib>.rc.
+     Under win32, this is placed into the dlls file-info"
+
+    ^ 'eXept Software AG'
+!
+
+description
+    "Returns a description string which will appear in nt.def / bc.def"
+
+    ^ 'Smalltalk/X Class library'
+!
+
+legalCopyright
+    "Returns a copyright string which will appear in <lib>.rc.
+     Under win32, this is placed into the dlls file-info"
+
+    ^ 'Copyright Claus Gittinger 1988-2015\nCopyright eXept Software AG 2015'
+!
+
+productName
+    "Returns a product name which will appear in <lib>.rc.
+     Under win32, this is placed into the dlls file-info.
+     This method is usually redefined in a concrete application definition"
+
+    ^ 'Smalltalk/X'
+! !
+
+!stx_goodies_ring_tests class methodsFor:'documentation'!
+
+version_HG
+    ^ '$Changeset: <not expanded> $'
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/tests.rc	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,37 @@
+//
+// DO NOT EDIT
+// automagically generated from the projectDefinition: stx_goodies_ring_tests.
+//
+VS_VERSION_INFO VERSIONINFO
+  FILEVERSION     6,2,0,1
+  PRODUCTVERSION  6,2,5,0
+#if (__BORLANDC__)
+  FILEFLAGSMASK   VS_FF_DEBUG | VS_FF_PRERELEASE
+  FILEFLAGS       VS_FF_PRERELEASE | VS_FF_SPECIALBUILD
+  FILEOS          VOS_NT_WINDOWS32
+  FILETYPE        VFT_DLL
+  FILESUBTYPE     VS_USER_DEFINED
+#endif
+
+BEGIN
+  BLOCK "StringFileInfo"
+  BEGIN
+    BLOCK "040904E4"
+    BEGIN
+      VALUE "CompanyName", "eXept Software AG\0"
+      VALUE "FileDescription", "Smalltalk/X Class library (LIB)\0"
+      VALUE "FileVersion", "6.2.0.1\0"
+      VALUE "InternalName", "stx:goodies/ring/tests\0"
+      VALUE "LegalCopyright", "Copyright Claus Gittinger 1988-2015\nCopyright eXept Software AG 2015\0"
+      VALUE "ProductName", "Smalltalk/X\0"
+      VALUE "ProductVersion", "6.2.5.0\0"
+      VALUE "ProductDate", "Fri, 28 Aug 2015 11:19:31 GMT\0"
+    END
+
+  END
+
+  BLOCK "VarFileInfo"
+  BEGIN                               //  Language   |    Translation
+    VALUE "Translation", 0x409, 0x4E4 // U.S. English, Windows Multilingual
+  END
+END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/vcmake.bat	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,17 @@
+@REM -------
+@REM make using Microsoft Visual C compiler
+@REM type vcmake, and wait...
+@REM do not edit - automatically generated from ProjectDefinition
+@REM -------
+
+@if not defined VSINSTALLDIR (
+    pushd ..\..\..\rules
+    call vcsetup.bat
+    popd
+)
+@SET DEFINES=
+
+make.exe -N -f bc.mak -DUSEVC=1 %DEFINES% %*
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vcmake.bat	Fri Aug 28 12:21:13 2015 +0100
@@ -0,0 +1,17 @@
+@REM -------
+@REM make using Microsoft Visual C compiler
+@REM type vcmake, and wait...
+@REM do not edit - automatically generated from ProjectDefinition
+@REM -------
+
+@if not defined VSINSTALLDIR (
+    pushd ..\..\rules
+    call vcsetup.bat
+    popd
+)
+@SET DEFINES=
+
+make.exe -N -f bc.mak -DUSEVC=1 %DEFINES% %*
+
+
+