Skip to content

Commit

Permalink
MONDRIAN: Update code formatting guidelines.
Browse files Browse the repository at this point in the history
[git-p4: depot-paths = "//open/mondrian/": change = 10337]
  • Loading branch information
julianhyde committed Dec 19, 2007
1 parent e1b16e2 commit 03dca15
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 7 deletions.
29 changes: 22 additions & 7 deletions doc/developer.html
Expand Up @@ -20,8 +20,6 @@
<div class="contentheading">Developer's Guide</div>
<!-- end page title -->

<p>By Julian Hyde; last updated April, 2007.</p>

<hr noshade size="1">

<p>There are several ways to get Mondrian running. The easiest is to download a
Expand Down Expand Up @@ -388,7 +386,23 @@ <h2>Create, deploy and start the web application</h2>
or future active ('Will collect garbage.').</li><li>When editing HTML documents, please don't use an editor which reformats
the HTML source (such as Microsoft Word).</li></ul><p>Spacing and indentation:</p><ul>
<li>Use spaces, not tabs.</li><li>Indentation 4.</li><li>Open braces on the same line as the preceding 'if', 'else', 'while'
statement, or method or 'class' declaration.</li><li>Use braces even for single-line blocks.</li><li>Try to keep lines shorter than 80 characters.</li></ul><p>The following images show my spacing and indentation settings in IntelliJ.</p><p><img border="0" alt="Code indentation" src="images/code_indentation.png" width="909" height="908"></p><p><img border="0" alt="Code spacing" src="images/code_spacing.png" width="776" height="903"></p><h2>Learning more about Mondrian<a name="Learning_more_about_Mondrian">&nbsp;</a></h2><h3>How Mondrian generates SQL<a name="How_Mondrian_generates_SQL">&nbsp;</a></h3><p>If you're feeling mystified where the various SQL statements come
statement, or method or 'class' declaration.</li><li>Use braces even for single-line blocks.</li><li>Try to keep lines shorter than 80 characters.</li></ul><p>The following images show my
code style settings in IntelliJ. If you use IntelliJ, plug in these settings; if
not, they should give you an idea of the code formatting policy.</p>

<p><img border="0" alt="Code formatting: General" src="images/code_general.png" width="1007" height="826"></p>

<p><img border="0" alt="Code formatting: Alignment and Braces" src="images/code_indentation.png" width="1007" height="866"></p>

<p><img border="0" alt="Code formatting: Wrapping" src="images/code_wrapping.png" width="1007" height="866"></p>

<p><img border="0" alt="Code formatting: Spaces" src="images/code_spacing.png"></p>

<h2>Learning more about Mondrian<a name="Learning_more_about_Mondrian">&nbsp;</a></h2>

<h3>How Mondrian generates SQL<a name="How_Mondrian_generates_SQL">&nbsp;</a></h3>

<p>If you're feeling mystified where the various SQL statements come
from, here's a good way to learn more. Give it a try, and if you have
more questions I'll be glad to answer them.</p><p>In a debugger, put a break point in the <code>
<a href="api/mondrian/rolap/RolapUtil.html#executeQuery(java.sql.Connection, java.lang.String, java.lang.String)">RolapUtil.executeQuery()</a></code>
Expand Down Expand Up @@ -427,11 +441,12 @@ <h2>Appendix A. Product installation instructions<a name="Appendix_A_Product_ins
<tbody>
<tr>
<th>Product</th><th>Required?</th><th>Version</th><th>Comment</th></tr><tr>
<td>JDK<a name="JDK">&nbsp;</a></td><td>Yes</td><td>1.4 or later (I use version 1.5.0_08.)</td><td>Available from <a href="http://developer.java.sun.com/" target="_blank">http://developer.java.sun.com/</a>.
<td>JDK<a name="JDK">&nbsp;</a></td><td>Yes</td><td>1.5 or later (1.4
support available via retroweaver)</td><td>Available from <a href="http://developer.java.sun.com/" target="_blank">http://developer.java.sun.com/</a>.
I downloaded <code>jdk-1_5_0_08-windows-i586-p.exe</code>,
and installed to <code>C:/jdk1.5.0_08</code>, and set <code>JAVA_HOME</code>
to the same.</td></tr><tr>
<td>Ant<a name="Ant">&nbsp;</a></td><td>Yes</td><td>1.5 or later&nbsp;</td><td>Available from <a
<td>Ant<a name="Ant">&nbsp;</a></td><td>Yes</td><td>1.6 or later&nbsp;</td><td>Available from <a
href="http://ant.apache.org/bindownload.cgi">http://ant.apache.org/bindownload.cgi</a>.
I downloaded <code>apache-ant-1.6.2-bin.zip</code>, extracted to <code>C:/jakarta-ant-1.6.2</code>,
and set <code>ANT_HOME</code> to the same.</td></tr><tr>
Expand Down Expand Up @@ -459,10 +474,10 @@ <h2>Appendix A. Product installation instructions<a name="Appendix_A_Product_ins

<hr noshade size="1"/>
<p>
Author: Julian Hyde; last updated November, 2006.<br/>
Author: Julian Hyde; last updated December, 2007.<br/>
Version: $Id$
(<a href="http://p4web.eigenbase.org/open/mondrian/doc/developer.html?ac=22">log&nbsp;</a>)<br/>
Copyright (C) 2005-2006 Julian Hyde
Copyright (C) 2005-2007 Julian Hyde
</p>

<br />
Expand Down
Binary file added doc/images/code_general.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/images/code_indentation.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/images/code_spacing.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/code_wrapping.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 03dca15

Please sign in to comment.