Author: mmior
Date: Tue Feb 20 02:58:14 2018
New Revision: 1824830

URL: http://svn.apache.org/viewvc?rev=1824830&view=rev
Log:
[CALCITE-2172] Document IDE setup for project contribution (Edmon Begoli)

Modified:
    calcite/site/develop/index.html
    calcite/site/docs/howto.html

Modified: calcite/site/develop/index.html
URL: 
http://svn.apache.org/viewvc/calcite/site/develop/index.html?rev=1824830&r1=1824829&r2=1824830&view=diff
==============================================================================
--- calcite/site/develop/index.html (original)
+++ calcite/site/develop/index.html Tue Feb 20 02:58:14 2018
@@ -122,6 +122,7 @@ then build using maven:</p>
 
 <p>The HOWTO describes how to
 <a href="/docs/howto.html#building-from-a-source-distribution">build from a 
source distribution</a>,
+<a href="/docs/howto.html#setting-up-an-ide-for-contributing">set up an IDE 
for contributing</a>,
 <a href="/docs/howto.html#running-tests">run more or fewer tests</a> and
 <a href="/docs/howto.html#running-integration-tests">run integration 
tests</a>.</p>
 

Modified: calcite/site/docs/howto.html
URL: 
http://svn.apache.org/viewvc/calcite/site/docs/howto.html?rev=1824830&r1=1824829&r2=1824830&view=diff
==============================================================================
--- calcite/site/docs/howto.html (original)
+++ calcite/site/docs/howto.html Tue Feb 20 02:58:14 2018
@@ -120,6 +120,11 @@ adapters.</p>
   </li>
   <li><a href="#contributing" 
id="markdown-toc-contributing">Contributing</a></li>
   <li><a href="#getting-started" id="markdown-toc-getting-started">Getting 
started</a></li>
+  <li><a href="#setting-up-an-ide-for-contributing" 
id="markdown-toc-setting-up-an-ide-for-contributing">Setting up an IDE for 
contributing</a>    <ul>
+      <li><a href="#setting-up-intellij-idea" 
id="markdown-toc-setting-up-intellij-idea">Setting up IntelliJ IDEA</a></li>
+      <li><a href="#setting-up-netbeans" 
id="markdown-toc-setting-up-netbeans">Setting up NetBeans</a></li>
+    </ul>
+  </li>
   <li><a href="#tracing" id="markdown-toc-tracing">Tracing</a></li>
   <li><a href="#csv-adapter" id="markdown-toc-csv-adapter">CSV adapter</a></li>
   <li><a href="#mongodb-adapter" id="markdown-toc-mongodb-adapter">MongoDB 
adapter</a></li>
@@ -294,6 +299,48 @@ Integration tests should be named <code
 
 <p>See the <a href="/develop/#getting-started">developers guide</a>.</p>
 
+<h2 id="setting-up-an-ide-for-contributing">Setting up an IDE for 
contributing</h2>
+
+<h3 id="setting-up-intellij-idea">Setting up IntelliJ IDEA</h3>
+
+<p>To setup <a href="https://www.jetbrains.com/idea/";>IntelliJ IDEA</a>, 
follow the standard steps for the installation of IDEA and set up one of the 
JDK versions currently supported by Calcite.</p>
+
+<p>Start with <a href="#building-from-a-source-distribution">building Calcite 
from the command line</a>.</p>
+
+<p>Go to <em>File &gt; Open…</em> and open up Calcite’s <code 
class="highlighter-rouge">pom.xml</code> file.
+When IntelliJ asks if you want to open it as a project or a file, select 
project.
+Also, say yes when it asks if you want a new window.
+IntelliJ’s Maven project importer should handle the rest.</p>
+
+<p>There is a partially implemented IntelliJ code style configuration that you 
can import located <a 
href="https://gist.github.com/gianm/27a4e3cad99d7b9b6513b6885d3cfcc9";>on 
GitHub</a>.
+It does not do everything needed to make Calcite’s style checker happy, but
+it does a decent amount of it.
+To import, go to <em>Preferences &gt; Editor &gt; Code Style</em>, click the 
gear next to “scheme”,
+then <em>Import Scheme &gt; IntelliJ IDEA Code Style XML</em>.</p>
+
+<p>Once the importer is finished, test the project setup.
+For example, navigate to the method <code 
class="highlighter-rouge">JdbcTest.testWinAgg</code> with
+<em>Navigate &gt; Symbol</em> and enter <code 
class="highlighter-rouge">testWinAgg</code>. Run <code 
class="highlighter-rouge">testWinAgg</code> by right-clicking and selecting 
<em>Run</em> (or the equivalent keyboard shortcut).</p>
+
+<p>If you encounter an error while running the <code 
class="highlighter-rouge">JdbcTest.testWinAgg</code> , run the following Maven 
command from the command line:</p>
+
+<p><code class="highlighter-rouge">$ mvn -DskipTests clean install</code></p>
+
+<p>You should see <code class="highlighter-rouge">"BUILD SUCCESS"</code>.</p>
+
+<p>Once that is complete, proceed with running <code 
class="highlighter-rouge">JdbcTest.testWinAgg</code>.</p>
+
+<h3 id="setting-up-netbeans">Setting up NetBeans</h3>
+
+<p>From the main menu, select <em>File &gt; Open Project</em> and navigate to 
a name of the project (Calcite) with a small Maven icon, and choose to open.
+(See <a 
href="https://www.packtpub.com/mapt/book/application_development/9781785286124/2/ch02lvl1sec23/importing-an-existing-maven-project-in-netbeans";>this
 tutorial</a> for an example of how to open a Maven project)
+Wait for NetBeans to finish importing all dependencies.</p>
+
+<p>To ensure that the project is configured successfully, navigate to the 
method <code class="highlighter-rouge">testWinAgg</code> in <code 
class="highlighter-rouge">org.apache.calcite.test.JdbcTest</code>.
+Right-click on the method and select to <em>Run Focused Test Method</em>.
+NetBeans will run a Maven process, and you should see in the command output 
window a line with
+ <code class="highlighter-rouge">Running 
org.apache.calcite.test.JdbcTest</code> followed by <code 
class="highlighter-rouge">"BUILD SUCCESS"</code>.</p>
+
 <h2 id="tracing">Tracing</h2>
 
 <p>To enable tracing, add the following flags to the java command line:</p>


Reply via email to