Skip to content

Commit cefb451

Browse files
committed
docs
1 parent 04ed7a8 commit cefb451

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

docs/tutorial.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ Server-side `Grid` allows you to set the `DataProvider` which will actually fetc
236236
To create a new view, all that's needed is to create a Kotlin class which is annotated with the `@Route` annotation and extends
237237
some Vaadin Component.
238238

239-
Create the `web/src/main/kotlin/com/example/vok/MyWelcomeView.kt` file and make sure it looks like follows:
239+
Create the `src/main/kotlin/com/example/vok/MyWelcomeView.kt` file and make sure it looks like follows:
240240

241241
```kotlin
242242
package com.example.vok
@@ -266,10 +266,27 @@ Open up the `WelcomeView.kt` file and change the `@Route("")` annotation to the
266266

267267
Having the `@Route("")` on `MyWelcomeView` will tell the Vaadin Route Registry to map requests to the root of the application to the `MyWelcomeView` view.
268268

269-
Launch the web server again and navigate to [http://localhost:8080](http://localhost:8080) in your browser. You'll see the "Hello, Vaadin-on-Kotlin!"
269+
Launch the app again and navigate to [http://localhost:8080](http://localhost:8080) in your browser. You'll see the "Hello, Vaadin-on-Kotlin!"
270270
message you put into the `web/src/main/kotlin/com/example/vok/MyWelcomeView.kt`, indicating
271271
that this new route is indeed going to `MyWelcomeView` and is rendering the view correctly.
272272

273+
## Setting up Intellij Community
274+
275+
To have a proper file editor, with auto-completion features and all, let's set up Intellij IDEA Community.
276+
Download and install [Intellij IDEA Community](https://www.jetbrains.com/idea/download/) if you haven't done that already.
277+
Then, select the "Open" button and open the `vok-helloworld-app` directory as a project. Please give
278+
Intellij a bit of time to open the project and download all files.
279+
280+
In your Intellij, open the `src/main/kotlin/com/example/vok/Main.kt` file. It contains just one
281+
function called `main()` which runs the entire app. There's a little green arrow to the left of the function; simply
282+
right-click the arrow and select "Debug 'Main'" from the menu. Your app is now running from your Intellij!
283+
284+
> The app may fail to start since it's already running from a command-line from previous experiments.
285+
> In such case, simply press CTRL+C in the terminal to kill the old app, then try to launch the app from Intellij again.
286+
287+
Running the app from Intellij in debug mode allows you to publish changes in your file directly to the running app easily.
288+
Simply edit the file, then press CTRL+F9 (or *Build / Build Project* from the menu) then reload the page in your browser.
289+
273290
## Getting Up and Running
274291

275292
Now that you've seen how to create a view, let's create something with a bit more substance.

0 commit comments

Comments
 (0)