diff --git a/idea-plug-in/index.html b/idea-plug-in/index.html index 4843ee0..6b01b53 100644 --- a/idea-plug-in/index.html +++ b/idea-plug-in/index.html @@ -32,6 +32,16 @@ --> + @@ -55,7 +65,13 @@

Installation

- Open the "Plugins" section of the IDEA preferences and find the "Kobalt" plug-in. Install it and restart IDEA. If the plug-in was correctly installed, you should see a new menu called "Kobalt" juste before the "Help" menu: + Open the "Plugins" section of the IDEA preferences and find the "Kobalt" plug-in. +

+

+ +

+

+ Install it and restart IDEA. If the plug-in was correctly installed, you should see a new menu called "Kobalt" juste before the "Help" menu:

@@ -65,69 +81,82 @@

The Kobalt IDEA plug-in offers the following features:

-

Auto completion

- +

Synchronization of build files

- Since Kobalt's build files are valid Kotlin files, you can leverage IDEA's auto complete feature to assist you in writing build files. There are two steps to take to enable this support: -

- -

- Now that your Build.kt file is recognized by IDEA, you can use Ctrl-space to trigger auto completion whenever you need help figuring out what functions you can invoke. However, by default, IDEA will display all the Kotlin functions available within a given scope. While all these functions are valid and will produce a valid Kotlin file, you are probably going to prever Kobalt directives over regular Kotlin functions, so the Kobalt IDEA plug-in will re-order the suggestions so that Kobalt's directives appear first. Compare the next two screen shots: -

- -

Synchronization of build files

-

- When you select the "Synchronize build file" menu item from the Kobalt main menu, the Kobalt IDEA plug-in will locate your Build.kt file and parse it. Then it will update your modules' library and dependency information to reflect all the dependencies declared in your build file. -

-

- For example, the following list of dependencies: + The plug-in will find your `Build.kt` file and it will automatically update your project's libraries and + dependencies to reflect it. For example, suppose you have the following dependencies:

+compile("org.apache.ant:ant:1.7.0",
+    "com.google.inject:guice:4.0:no_aop",
+    "com.beust:jcommander:1.48")
+
+

+ Select the menu "Kobalt / Sync build file", wait for a few seconds as the status in the lower left + corner updates: +

+

+ +

+

+ Bring up the "Project structure" window for your project and you should see the following: +

+

+ +

+

+ A new library has been created with the dependencies from your build file. If you switch to the + Module section, you should see this library added as a dependency of your modules: +

+

+ +

+

+ The plug-in understands other scopes as well (e.g. "provided", "runtime"). For example, let's + move a dependency in the "runtime" section of the build file: +

+
 dependencies {
+    runtime("com.google.inject:guice:4.0:no_aop")
     compile("org.apache.ant:ant:1.7.0",
-            "junit:junit:4.10",
-            "org.beanshell:bsh:2.0b4",
-            "com.google.inject:guice:4.0:no_aop",
-            "com.beust:jcommander:1.48",
-            "org.yaml:snakeyaml:1.15")
-}
-
-

- will update your project structure as follows: -

-

- The plug-in will honor other types of dependencies, such as provided or test. For example: -

-
-dependencies {
-    compile("org.apache.ant:ant:1.7.0")
-    test("org.testng:testng:6.9.8")
-    provided("com.beust:jcommander:1.48")
-}
-
-

- will produce the following libraries and dependencies: -

+ "com.beust:jcommander:1.48") +} +

+ The libraries are now the following: +

+

+ +

+

+ Notice that you now have two different libraries and that they have both been added with the + correct scope to your project: +

+

+ +

+

Source code and bug reports

+

+ The source code can be found on github. + If you need to report a bug, please make sure you include the log file, which you can find under + the "Help" menu: +

+

+ +

- -

Source code

-

- The source code for the Kobalt IDEA plug-in can be found on github. The license is Apache 2.0. -

+>>>>>>> IDEA plug-in doc.
+ + diff --git a/pics/auto-completion-with.png b/pics/auto-completion-with.png new file mode 100644 index 0000000..7db3d14 Binary files /dev/null and b/pics/auto-completion-with.png differ diff --git a/pics/auto-completion-without.png b/pics/auto-completion-without.png new file mode 100644 index 0000000..3b1b8ea Binary files /dev/null and b/pics/auto-completion-without.png differ diff --git a/pics/install-plugin.png b/pics/install-plugin.png new file mode 100644 index 0000000..ced16bf Binary files /dev/null and b/pics/install-plugin.png differ diff --git a/pics/show-log.png b/pics/show-log.png new file mode 100644 index 0000000..b5e4c9c Binary files /dev/null and b/pics/show-log.png differ diff --git a/pics/status.png b/pics/status.png new file mode 100644 index 0000000..1258af8 Binary files /dev/null and b/pics/status.png differ diff --git a/pics/structure-1.png b/pics/structure-1.png new file mode 100644 index 0000000..789bdad Binary files /dev/null and b/pics/structure-1.png differ diff --git a/pics/structure-2.png b/pics/structure-2.png new file mode 100644 index 0000000..3e36bc3 Binary files /dev/null and b/pics/structure-2.png differ diff --git a/pics/structure-3.png b/pics/structure-3.png new file mode 100644 index 0000000..09ec95b Binary files /dev/null and b/pics/structure-3.png differ diff --git a/pics/structure-4.png b/pics/structure-4.png new file mode 100644 index 0000000..b5a3964 Binary files /dev/null and b/pics/structure-4.png differ