Working with GemStone features

To allow newer GT versions to work with older gt4gemstone versions, gt4gemstone comes with support for defining features on the GemStone side. These features are used by local tools to enable/disable certaint behaviour.

Features are instances of GtGemStoneSessionFeature Object subclass: #GtGemStoneSessionFeature instanceVariableNames: 'enabled featureId' classVariableNames: '' package: 'GToolkit-GemStone' and are created on the class side of GtGemStoneSessionFeatures Object subclass: #GtGemStoneSessionFeatures instanceVariableNames: 'featuresById' classVariableNames: '' package: 'GToolkit-GemStone' by methods annotated with gtGemStoneFeature. An example feature is defined by GtGemStoneSessionFeatures>>#exampleFeatureV1 exampleFeatureV1 <gtGemStoneFeature> ^ (GtGemStoneSessionFeature withId: #exampleFeatureV1) enable .

The list of features for a session is stored in the current SessionTemps Object subclass: #SessionTemps instanceVariableNames: '' classVariableNames: '' package: 'GToolkit-GemStone-Pharo-Stubs' instance.

In the GT image the list of GemStone features can be accessed using the Features view of a session.

GtGemStoneSessionRegistry defaultSession
  
GtGemStoneSessionFeatures currentFeatures
  
GtGemStoneSessionFeatures currentFeatures
	disableFeatureWithId: #exampleFeatureV1 
  
GtGemStoneSessionFeatures currentFeatures
	enableFeatureWithId: #exampleFeatureV1 
  
GtGemStoneSessionRegistry defaultSession currentFeatures
  
GtGemStoneSessionRegistry defaultSession currentFeatures 
	isFeatureEnabledWithId: #exampleFeatureV1
  
GtGemStoneSessionRegistry defaultSession currentFeatures 
	disableFeatureWithId: #exampleFeatureV1
  
GtGemStoneSessionRegistry defaultSession currentFeatures 
	enableFeatureWithId: #exampleFeatureV1