def __call__(self, source):
     super(PackageSyncer, self).__call__(source)
     if (IClass.providedBy(source) or IInterface.providedBy(source)) \
       and IDirectory.providedBy(self.anchor) \
       and (source.parent.stereotype('pyegg:pypackage') is not None \
       or source.parent.stereotype('pyegg:pyegg') is not None):
         modulename = '%s.py' % IModuleNameChooser(source)()
         self.anchor[modulename] = Module()
         self.anchor = self.anchor[modulename]
     elif (IClass.providedBy(source) or IInterface.providedBy(source)) \
       and IModule.providedBy(self.anchor) \
       and (source.parent.stereotype('pyegg:pypackage') is not None \
       or source.parent.stereotype('pyegg:pyegg') is not None):
         modulename = '%s.py' % IModuleNameChooser(source)()
         container = self.anchor.parent
         container[modulename] = Module()
         self.anchor = container[modulename]
     else:
         if source.parent is None:
             return
         target_node = read_target_node(source.parent, self.target)
         if not target_node:
             super(PackageSyncer, self).__call__(source)
             return
         if len(target_node.path) < len(self.anchor.path):
             self.anchor = target_node
 def __call__(self, node):
     if not (IClass.providedBy(node) or IInterface.providedBy(node)): 
         return False
     return node.stereotype('plone:view') or \
         node.stereotype('plone:dynamic_view') is not None
 def __call__(self, node):
     if not (IClass.providedBy(node) or IInterface.providedBy(node)):
         return False
     return node.stereotype('plone:view') or \
         node.stereotype('plone:dynamic_view') is not None