Skip to content

Building Vis From Source

Paweł Pastuszak edited this page Mar 11, 2016 · 16 revisions

NOTE: We are migrating to Gradle build system now, those instructions will be updated soon!

Just import VisParent project via Maven integration in your IDE (pom.xml in root repository directory). Your IDE should automatically import dependent project: (VisUI, VisRuntime, VisEditor etc.) If that won't happen just import projects one by one.

Intellij IDEA

Intellij IDEA is recommend IDE for Vis development. This section will explain how to setup Vis development environment.

Project Setup
  1. Clone repository using Git.
  2. Select File -> Open... then navigate to directory where you cloned repository.
  3. Select pom.xml in root directory and click OK. IDEA will open project and automatically import all dependent projects. If you don't see projects in File Explorer, just wait. IDEA didn't finished downloading everything. You can check progress at the bottom of the screen.
Launching Editor
  1. Create new Application launch configuration.
  2. Set main class to com.kotcrab.vis.editor.ui.EditorFrame.
  3. Set VM options to -Dfile.encoding=UTF-8.
  4. In field Use classpath of module select vis-editor
  5. Save configuration and launch, use this configuration for future launches.
Launching Editor for built-in plugin development

Plugin development requires to put plugins jars in root/Editor/target/plugins before launching editor. Maven can be used to automatize this process for built-in plugins.

Side note: If you are creating custom plugin you can create Maven task that will copy plugin jar to target location and execute it before launch in similar way as described here. Instead of Maven you can use Ant, Gradle or whatever other build system you prefer.

  1. Clone normal VisEditor launch configuration.
  2. Find Before launch section click green plus icon, select Run Maven Goal.
  3. Set Working directory to repository root (very important!)
  4. Set goal to package -Dmaven.test.skip=true -Peditor-plugin-jar
  5. Save configuration and launch, use this configuration for future launches.
Launching VisUI demo
  1. Create new Application launch configuration.
  2. Set main class to com.kotcrab.vis.ui.test.manual.TestLauncher.
  3. In field Use classpath of module select vis-ui
  4. Save configuration and launch, use this configuration for future launches.

Launching VisEditor from command line

VisEditor uses Maven for its build system. If you want to run editor without IDE you will need Maven. Command mvn must be available from command line.

Start by cloning repository or by downloading zip file.

Launching for the first time:

E:\SomeFolder\VisEditor> mvn install -Peditor-plugin-jar
E:\SomeFolder\VisEditor> cd Editor
E:\SomeFolder\VisEditor\Editor> mvn exec:java

First launch will take more time, Maven will have to download all required dependencies.

Launching if nothing outside editor folder was modified: (editor source can be modified between launches but if you change something in runtime, ui or plugins you will have to execute same commands as during first launch)

E:\SomeFolder\VisEditor\Editor> mvn exec:java