Servoy Developer is a plugin for the Eclipse platform, so to develop the Servoy codebase an Eclipse SDK environment with Eclipse plug-in support is required.

In order to get started with development on the open source Servoy projects, the following is required:

      • A Servoy Developer installation
      • The Servoy Server libraries
      • A separate Eclipse environment with the Eclipse plugin development tools installed
      • Configuration of the Eclipse installation

Note: these instructions apply only to master branch. You can use this instructions as a guideline for other branches. For specific branch settings, please refer to the related branch documentation.

In This Chapter

Overview

Details

Installing Servoy Developer

An installation of Servoy Developer is required in order to be able to launch Servoy Developer from source code, because the source depends on the directory structure that is present in a Servoy Developer installation.

The installer for Servoy Developer can be downloaded at https://build.servoy.com/latest/servoy_master/servoy_installer.jar. Running the installer will install Servoy Developer. For a more in-depth description of installing Servoy Developer, see Download & Install Servoy Developer.

Installing Eclipse With The Eclipse Plugin Development Tools

The open source Servoy projects are all plugins for the Eclipse environment, so in order to develop on the projects an Eclipse version with plugin development support is required.

The Eclipse.org download page (http://www.eclipse.org/downloads/) lists a wide range of prepackaged Eclipse distributions. See https://www.eclipse.org/downloads/packages/ for the overview of what each Eclipse distribution contains. An up to date (2019) version containing plugin support (Git support included with eGit) is Eclipse IDE for RCP and RAP Developers.

NOTE: if you want to run the Servoy mobile client, then you also need to install the GWT Eclipse plugin.

Configuration

Start the downloaded and installed Eclipse installation and choose or create a workspace in which the development on the open source projects of Servoy will take place.

After startup, the following configuration needs to be done:

Setup a variable: Go to Window > Preferences > Run/Debug > String Substitution and create a new variable named 'servoy_install' with the value of the directory where Servoy Developer is installed.

Create a classpath variable: Go to Window > Preferences > Java > Build Path > Classpath Variables and create a new variable named 'WEBSTART' with the value of of javaws.jar in the Java installation.

Setup a connection to the Servoy source:

Download Servoy Server libraries
In order to also be able to start debug clients from Servoy Developer launched from the source code, it is required to use the correct version of several libraries of the Servoy Application Server. The latest version of these libraries can be downloaded from the Servoy build server, located at https://build.servoy.com/latest/servoy_master/. Download all the libraries from the subdirectory for a specific branch or for trunk who's name postfix matched the value of the releaseNumber variable in the ClientVersion class of the checked-out source code and place them in the 'libs_extra' directory of the 'eclipse_target' project


For example, if in the ClientVersion class we have the following lines:

      private static final int majorVersion = 2019;
      private static final int middleVersion = 6;
      private static final int minorVersion = 0;
      private static final int releaseNumber = 3500;
      private static final String versionPostfix = "rc";

then the following libraries need to be downloaded:
      j2db_documentation-2019.6.0.3500_rc.jar
      j2db_log4j-2019.6.0.3500_rc.jar
     
j2db_server-2019.6.0.3500_rc.jar

      (...)


Download Servoy Server plugin for running mobile

Please download the latest version of the mobile and mobileservice plugins; these can also be downloaded from the Servoy build server, located at https://build.servoy.com/latest/servoy_master/. Download the plugins from the subdirectory for trunk (currently) who's name postfix matches the value of the releaseNumber variable in the ClientVersion class. Copy these over to the the {servoyInstall}/application_server/plugins directory without the postfix (overwrite existing mobile and mobileservice plugins if needed). Using the same example as above the following two libraries need to be downloaded: 

mobile_2019.6.0.3500_rc.jar
mobileservice_2019.6.0.3500_rc.jar


Setup the Target Platform:


In order to successfully run servoy developer from sources, a file must be created in the maven-settings-path (c:\Users\username\.m2\): toolchains.xml. This file must contain the JDK home folder (The JDK from the class patch variable WEBSTART ).

Example of toolchains.xml:

<toolchains>
  <!-- JDK toolchains -->
  <toolchain>
       <type>jdk</type>
       <provides>
       <id>JavaSE-1.8</id>
       </provides>
       <configuration>
       <jdkHome>c:/Program Files/Java/jdk1.8.0_201</jdkHome>
       </configuration>
  </toolchain>
</toolchains>


Get sablo project's maven dependencies


NOTE: if an error message related to API baseline is displayed

the error must be ignored from the API Baseline preferences page.

Creating a Launch Configuration: Last step in the setup of the environment is the creation of a Launch Configuration. 

NOTE: when running Servoy Developer from sources it is need to compile typescript files for sablo and servoy-ngclient projects else "Form" objects will not be dislayed. From the command line this can be done using npm, by running the following commands (next to tsconfig.json file): 

When starting Servoy Developer from source code, it is most likely that a notification is shown indicating that the Servoy Application Server version should be upgraded. This message can be canceled and ignored.


When starting a debug session, Servoy Developer will launch with settings of the Launch Configuration. By default the workspace for example that is opened is set to '/workspace', relative to the Servoy Developer installation.

To edit the launch settings, open Run > Debug Configurations > Eclipse Application > Servoy Launch and edit the settings.

Ready: After completing the steps described above, the Eclipse installation is setup correctly to launch Servoy Developer in a debug session:

Optional Additional Configuration

Adding other features to the target: If additional features are required in the Servoy Developer that is launched from source code, for example an SVN Team Provider plugin, an easy way to achieve this is by adding the feature(s) to the target Definition. 

Note that a separate target file is already provided for eGit support in source-launched Servoy Developer.

Running Mobile Client From Sources