Bug Report B146873
Visible to All Users
Duplicate

We have closed this ticket because another page addresses its subject:

CodeGen - Add options to specify code generation rules

XML elements are being expanded

created 15 years ago

When CodeRush.Language.GenerateXmlCode() is called, it's expanding elements with no children. XML items normally end with "/>" when they have no children, expecially if they're XmlAttribute items. The attached simple plugin shows the issue. Run it, stick your caret in the XML comment above the PreparePreivew and choose 'Example' for the refactor. In the preview window you'll see that the <see> tag is modified.
Steps to Reproduce:
Get an XmlDocComment and run it through the generate routine.
Actual Results:
Things like "<see cref="foo" />" are being turned into "<see cref="foo"></see>"
Expected Results:
Leave it as: <see cref="foo" />

Comments (1)
DevExpress Support Team 15 years ago

    Hi Scott,
    Thank you for the report, and for providing the sample plug-in.
    This is a limitation of our current CodeGen engine: right now it is impossible to select how a certain element should be generated. We're aware of this problem, and are planning to address it in the context of the following suggestion:
    ID: S19229, CodeGen - Add options to specify code generation rules
    I've added the corresponding note to this item.
    Thanks,
    Vito

    Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

    Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.