sergiogonzalez/liferay-portal — pull request #623 by jrao (2013-02-27 21:30:16+00:00)
Title: Properties converter source formatting

Hi @sergiogonzalez

I pulled in your updates from code review; I really appreciate the simplifications you made to the Section class and the new Property class; in hindsight, it's easy for me to agree that the old Section class was too confusing...

Regarding _properties and _propertiesParagraph, I think they contain slightly different pieces of information. While it's true that they contain the same properties, _propertiesParagraph contains the group of properties as it should be displayed in HTML. There is at least one case in portal.properties where a single property (include-and-override) has multiple values. In this case, a map wouldn't be able to capture all the information about it unless the value for the include-and-override key was, say, a comma-delimited list of values.

Regarding the _content attribute, I agree that it might make sense for a Section to have a _content representing the contents of the entire secton. However, I don't think the current setup (having _content belong to the Property class) is a problem; I think it's just a question of how you'd like to parse the properties file; I don't think it's necessary to change it.

I also re-added three properties to portal-impl/build.xml: properties.title, properties.toc, and properties.file.path. These properties are important since we'll need to use the converter to produce HTML versions of other properties files (such as system.properties).

So, for example, we could use ant properties-to-html -Dproperties.title="System Properties" -Dproperties.file.path="src/system.properties" to convert system.properties to HTML. Note: the converter currently doesn't handle the first section of system.properties since it's an extended description. I'll open a ticket for this.

Also, Jim suggested that I refactor the Parser's main method to use portal's ArgumentsUtil, following the example of LangBuilder.java, so I made this change too.

Other than that, I just reordered some of the variables and methods to place them in alphabetical order.

Please let me know if I need to do anything else before I can send a pull request to Brian. Since pull requests should always have an associated LPS ticket, should I create a new one or use https://issues.liferay.com/browse/LPS-14702?

Thanks for your help!