r13536 - in ArchGenXML/trunk: . src/archgenxml
"JS" <[email protected]> Mon, 28 Mar 2011 13:47:36 +0000
| Newsgroups | gmane.comp.web.zope.plone.archetypes.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: jihaisse
Date: Mon Mar 28 13:47:36 2011
New Revision: 13536
Modified:
ArchGenXML/trunk/CHANGES.txt
ArchGenXML/trunk/src/archgenxml/ArchetypesGenerator.py
ArchGenXML/trunk/src/archgenxml/codesnippets.py
Log:
deleted changes about portal_tool
Modified: ArchGenXML/trunk/CHANGES.txt
==============================================================================
--- ArchGenXML/trunk/CHANGES.txt (original)
+++ ArchGenXML/trunk/CHANGES.txt Mon Mar 28 13:47:36 2011
@@ -4,9 +4,6 @@
2.7 (unreleased)
----------------
-- portal_tool depends now form UniqueObject and SimpleItem. A tool is not anymore a content type,
- so it not appear in the portal_catalog.
- [jihaisse]
- Fixed inconstancy between template name and portlet class by removing .pt in the generation
[jihaisse]
- Added method generation for portlet class.
Modified: ArchGenXML/trunk/src/archgenxml/ArchetypesGenerator.py
==============================================================================
--- ArchGenXML/trunk/src/archgenxml/ArchetypesGenerator.py (original)
+++ ArchGenXML/trunk/src/archgenxml/ArchetypesGenerator.py Mon Mar 28 13:47:36 2011
@@ -260,8 +260,7 @@
res = BaseGenerator.generateDependentImports(self, element)
print >> out, res
- if not element.hasStereoType(self.adapter_stereotypes,umlprofile=self.uml_profile) and \
- not element.hasStereoType(self.portal_tools, umlprofile=self.uml_profile):
+ if not element.hasStereoType(self.adapter_stereotypes,umlprofile=self.uml_profile):
print >> out, TEMPLATE_CMFDYNAMICVIEWFTI_IMPORT
generate_expression_validator = False
@@ -1153,8 +1152,7 @@
umlprofile=self.uml_profile):
print >> outfile, EXTENDER_SCHEMA_START
else:
- if not element.hasStereoType(self.portal_tools, umlprofile=self.uml_profile):
- print >> outfile, SCHEMA_START
+ print >> outfile, SCHEMA_START
print >> outfile, fieldsformatted.encode('utf8')
marshaller = element.getTaggedValue('marshaller')
@@ -1165,8 +1163,7 @@
umlprofile=self.uml_profile):
print >> outfile, ' ]\n'
else:
- if not element.hasStereoType(self.portal_tools, umlprofile=self.uml_profile):
- print >> outfile, '),\n)\n'
+ print >> outfile, '),\n)\n'
if asString:
return outfile.getvalue()
@@ -1625,15 +1622,13 @@
if not parent_is_archetype and \
self.getOption('use_dynamic_view', element, True) and \
not element.hasStereoType(self.atct_stereotype,
- umlprofile=self.uml_profile) and \
- not element.hasStereoType(self.portal_tools, umlprofile=self.uml_profile):
+ umlprofile=self.uml_profile):
parentnames.append('BrowserDefaultMixin')
# if a parent is already an archetype we dont need a baseschema!
if parent_is_archetype:
baseclass = None
- if element.hasStereoType(self.portal_tools, umlprofile=self.uml_profile):
- baseclass = None
+
# remember support
if element.hasStereoType(self.remember_stereotype,
umlprofile=self.uml_profile):
@@ -1799,7 +1794,7 @@
# a tool needs to be a unique object
if element.hasStereoType(self.portal_tools, umlprofile=self.uml_profile):
print >> outfile, TEMPL_TOOL_HEADER
- parentnames.insert(0, 'UniqueObject, SimpleItem')
+ parentnames.insert(0, 'UniqueObject')
# protected section
self.generateProtectedSection(outfile, element, 'module-header')
@@ -1843,16 +1838,15 @@
schema += ['schema']
schemaName = '%s_schema' % name
- if not element.hasStereoType(self.portal_tools, umlprofile=self.uml_profile):
- print >> outfile, utils.indent(schemaName + ' = ' + \
+ print >> outfile, utils.indent(schemaName + ' = ' + \
' + \\\n '.join(['%s.copy()' % s\
for s in schema]), 0)
- # move fields based on move: tagged values
- self.generateFieldMoves(outfile, schemaName, field_specs)
+ # move fields based on move: tagged values
+ self.generateFieldMoves(outfile, schemaName, field_specs)
- # protected section
- self.generateProtectedSection(outfile, element, 'after-schema')
+ # protected section
+ self.generateProtectedSection(outfile, element, 'after-schema')
# [optilude] It's possible parents may become empty now...
parents = ', '.join(parentnames)
@@ -1957,8 +1951,7 @@
wrt(utils.indent('return self.schema',2) + '\n\n')
else:
# schema attribute
- if not element.hasStereoType(self.portal_tools, umlprofile=self.uml_profile):
- wrt(utils.indent('schema = %s' % schemaName, 1) + '\n\n')
+ wrt(utils.indent('schema = %s' % schemaName, 1) + '\n\n')
# Set base_archetype for remember
if element.hasStereoType(self.remember_stereotype,
@@ -1995,8 +1988,7 @@
# [optilude] Don't register type for abstract classes or tools or for schema extenders
if not element.isAbstract() and \
not element.hasStereoType('mixin',umlprofile=self.uml_profile) and \
- not element.hasStereoType(self.adapter_stereotypes,umlprofile=self.uml_profile) and \
- not element.hasStereoType(self.portal_tools,umlprofile=self.uml_profile):
+ not element.hasStereoType(self.adapter_stereotypes,umlprofile=self.uml_profile):
wrt(REGISTER_ARCHTYPE % name)
# ATVocabularyManager: registration of class
@@ -4212,7 +4204,6 @@
if pclass.hasStereoType(self.flavor_stereotypes,umlprofile=self.uml_profile) \
or pclass.hasStereoType(self.adapter_stereotypes,umlprofile=self.uml_profile) \
- or pclass.hasStereoType(self.portal_tools,umlprofile=self.uml_profile) \
or pclass.hasStereoType(['interface']):
continue
Modified: ArchGenXML/trunk/src/archgenxml/codesnippets.py
==============================================================================
--- ArchGenXML/trunk/src/archgenxml/codesnippets.py (original)
+++ ArchGenXML/trunk/src/archgenxml/codesnippets.py Mon Mar 28 13:47:36 2011
@@ -89,7 +89,6 @@
TEMPL_TOOL_HEADER=u"""
from Products.CMFCore.utils import UniqueObject
-from OFS.SimpleItem import SimpleItem
"""
@@ -258,15 +257,13 @@
# tool-constructors have no id argument, the id is fixed
def __init__(self, id=None):
%s.__init__(self,'%s')
- #There is no more title
- #self.setTitle('%s')
+ self.setTitle('%s')
"""
TEMPL_POST_EDIT_METHOD_TOOL = u"""
# tool should not appear in portal_catalog
def at_post_edit_script(self):
- # Not needed anymore
- #self.unindexObject()
+ self.unindexObject()
"""
TEMPLATE_HEADER = u"""\
------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software
be a part of the solution? Download the Intel(R) Manageability Checker
today! http://p.sf.net/sfu/intel-dev2devmar