Repository: calcite
Updated Branches:
  refs/heads/master 6b1d24746 -> 727f2aca4


[CALCITE-2172] Added instructions for setting up popular IDEs (Edmon Begoli)

Close apache/calcite#627


Project: http://git-wip-us.apache.org/repos/asf/calcite/repo
Commit: http://git-wip-us.apache.org/repos/asf/calcite/commit/727f2aca
Tree: http://git-wip-us.apache.org/repos/asf/calcite/tree/727f2aca
Diff: http://git-wip-us.apache.org/repos/asf/calcite/diff/727f2aca

Branch: refs/heads/master
Commit: 727f2aca421f0ab23ee4afaebc16da14c1896166
Parents: 6b1d247
Author: Edmon Begoli <ebeg...@gmail.com>
Authored: Tue Feb 13 22:09:19 2018 -0500
Committer: Michael Mior <mm...@uwaterloo.ca>
Committed: Mon Feb 19 21:47:45 2018 -0500

----------------------------------------------------------------------
 site/_docs/howto.md   | 42 ++++++++++++++++++++++++++++++++++++++++++
 site/develop/index.md |  1 +
 2 files changed, 43 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/calcite/blob/727f2aca/site/_docs/howto.md
----------------------------------------------------------------------
diff --git a/site/_docs/howto.md b/site/_docs/howto.md
index 3b299e6..513959d 100644
--- a/site/_docs/howto.md
+++ b/site/_docs/howto.md
@@ -180,6 +180,48 @@ See the [developers guide]({{ site.baseurl 
}}/develop/#contributing).
 
 See the [developers guide]({{ site.baseurl }}/develop/#getting-started).
 
+## Setting up an IDE for contributing
+
+### Setting up the IntelliJ IDEA
+
+To setup [IntelliJ IDEA](https://www.jetbrains.com/idea/), follow the standard 
steps for the installation of IDEA and set up one of the JDK versions currently 
supported by Calcite.
+
+Start with [building Calcite from the command 
line](#building-from-a-source-distribution).
+
+Go to *File > Open...* and open up Calcite's `pom.xml` 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.
+
+There is a partially implemented IntelliJ code style configuration that you 
can import located [on 
GitHub](https://gist.github.com/gianm/27a4e3cad99d7b9b6513b6885d3cfcc9).
+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 *Preferences > Editor > Code Style*, click the gear next to 
"scheme",
+then *Import Scheme > IntelliJ IDEA Code Style XML*.
+
+Once the importer is finished, test the project setup.
+For example, navigate to the method `JdbcTest.testWinAgg` with
+*Navigate > Symbol* and enter `testWinAgg`. Run `testWinAgg` by right-clicking 
and selecting *Run* (or the equivalent keyboard shortcut).
+
+If you encounter an error while running the `JdbcTest.testWinAgg` , run the 
following Maven command from the command line:
+
+`$ mvn -DskipTests clean install`
+
+You should see `"BUILD SUCCESS"`.
+
+Once that is complete, proceed with running `JdbcTest.testWinAgg`.
+
+### Setting up NetBeans
+
+From the main menu, select *File > Open Project* and navigate to a name of the 
project (Calcite) with a small Maven icon, and choose to open.
+(See [this 
tutorial](https://www.packtpub.com/mapt/book/application_development/9781785286124/2/ch02lvl1sec23/importing-an-existing-maven-project-in-netbeans)
 for an example of how to open a Maven project)
+Wait for NetBeans to finish importing all dependencies.
+
+To ensure that the project is configured successfully, navigate to the method 
`testWinAgg` in `org.apache.calcite.test.JdbcTest`.
+Right-click on the method and select to *Run Focused Test Method*.
+NetBeans will run a Maven process, and you should see in the command output 
window a line with
+ `Running org.apache.calcite.test.JdbcTest` followed by `"BUILD SUCCESS"`.
+
 ## Tracing
 
 To enable tracing, add the following flags to the java command line:

http://git-wip-us.apache.org/repos/asf/calcite/blob/727f2aca/site/develop/index.md
----------------------------------------------------------------------
diff --git a/site/develop/index.md b/site/develop/index.md
index f251bd8..e7ea318 100644
--- a/site/develop/index.md
+++ b/site/develop/index.md
@@ -54,6 +54,7 @@ $ mvn install
 
 The HOWTO describes how to
 [build from a source distribution]({{ site.baseurl 
}}/docs/howto.html#building-from-a-source-distribution),
+[set up an IDE for contributing]({{ site.baseurl 
}}/docs/howto.html#setting-up-an-ide-for-contributing),
 [run more or fewer tests]({{ site.baseurl }}/docs/howto.html#running-tests) and
 [run integration tests]({{ site.baseurl 
}}/docs/howto.html#running-integration-tests).
 

Reply via email to