r13510 - in ArchGenXML/trunk: . src/archgenxml

"Jens W. Klein" <[email protected]> Thu, 10 Mar 2011 13:07:37 +0000
Newsgroups gmane.comp.web.zope.plone.archetypes.cvs
Message-ID <[email protected]>
Author: jensens
Date: Thu Mar 10 13:07:36 2011
New Revision: 13510

Modified:
   ArchGenXML/trunk/CHANGES.txt
   ArchGenXML/trunk/src/archgenxml/BaseGenerator.py
Log:
changes

Modified: ArchGenXML/trunk/CHANGES.txt
==============================================================================
--- ArchGenXML/trunk/CHANGES.txt	(original)
+++ ArchGenXML/trunk/CHANGES.txt	Thu Mar 10 13:07:36 2011
@@ -1,13 +1,26 @@
 Changelog
 =========
 
-2.6 (Unreleased)
+2.6 (2011-03-10)
 ----------------
 
 - Use portal_type tagged-value if available instead of class name when
   generating workflows.xml.
   [vincentfretin]
 
+- remove unneccessary imports for remember/membrane, 
+  view permissions can now additionally be specified in the dependency 
+  association to the content class,
+  name of the view template can now additionally be specified in the
+  dependency relation between view class and content class,
+  pass fixed size parameter to arrayfield (i.e. 4 generates size-4) ,
+  browser views: name on dpendency determines name of view,
+  remove old generator i18n support.
+  [zworkb]
+
+- tgv for dynatree widget
+  [hpeteragitator]
+
 - Added worklist:guard_expressions tag definition.
   [vincentfretin]
 

Modified: ArchGenXML/trunk/src/archgenxml/BaseGenerator.py
==============================================================================
--- ArchGenXML/trunk/src/archgenxml/BaseGenerator.py	(original)
+++ ArchGenXML/trunk/src/archgenxml/BaseGenerator.py	Thu Mar 10 13:07:36 2011
@@ -118,8 +118,7 @@
         return self.getUMLProfile().getStereoType(self.default_class_type)
 
     def getDefaultInterfaceType(self):
-        log.debug("Default interface type is %r.", self.default_interface_type)
-        return self.getUMLProfile().getStereoType(self.default_interface_type)
+        return 'z2'
 
     def processExpression(self, value, asString=True):
         """Process the string returned by tagged values.
@@ -182,7 +181,8 @@
                       default)
             return default
         else:
-            message = "option '%s' is mandatory for element '%s'" % (option, element and element.getName())
+            message = "option '%s' is mandatory for element '%s'" % \
+                      (option, element and element.getName())
             log.error(message)
             raise ValueError, message
 
@@ -261,21 +261,17 @@
         return outfile.getvalue().strip()
     
     def getInterfaceType(self,element):
-        if element.hasStereoType('z3'):
-            return 'z3'
-        elif element.hasStereoType('z2'):
-            log.warning('Zope 2 interfaces are used! Get rid of them!')
-            return 'z2'
-        else:
-            return self.getOption('default_interface_type', element, 'z3')
+        if element.hasStereoType('z2'):
+            log.error('Zope 2 interfaces are used! Get rid of them!')
+            exit(1)
+        return 'z3'
 
     def generateImplements(self, element, parentnames):
         outfile = StringIO()
         if element.hasStereoType('extender'):
             z3reparentnames = ['ISchemaExtender']
         else:
-            reparents = element.getRealizationParents()
-            
+            reparents = element.getRealizationParents()            
             # Zope 3 interfaces
             z3reparentnames = [p.getName() for p in reparents 
                                if (self.getInterfaceType(p) == 'z3'
@@ -350,8 +346,8 @@
 
     def dispatchXMIInterface(self, element):
         log.debug("Finding suitable dispatching stereotype for element...")
-        dispatching_stereotypes = self.getUMLProfile().findStereoTypes(entities=['XMIInterface'],
-                                                                       dispatching=1)
+        dispatching_stereotypes = self.getUMLProfile().findStereoTypes(
+                                      entities=['XMIInterface'], dispatching=1)
         log.debug("Dispatching stereotypes found in our UML profile: %r.",
                   dispatching_stereotypes)
         dispatching_stereotype = None

------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d