Yatta Checkout User Guide

Integrating Yatta Checkout in Eclipse (In-App)

Workspace configuration

Configure the target platform

The target platform specifies the set of bundles used to compile and build against within the Eclipse PDE (plugin development environment).

Add the target platform to your workspace. This can be done in two different ways:

  1. Configure your own target platform file

  2. Use the “Eclipse Target Platform Wizard” provided by Eclipse

Configuring your own target platform file

The target platform file will be located in your Eclipse IDE preferences or your plugin’s directory. An example target platform file might look like this:

Configuring with the Eclipse Target Platform Wizard

  1. Select from menu: > > >

  2. Choose your active target platform

  3. Click the button and choose

  4. In the edit view, add the update site https://cdn.yatta.de/update/marketplace/ to your target platform

  5. Wait until the data is cached on your local machine and click .

  6. Confirm by clicking on

Configure the plugin dependencies

Add the following plugins to your file in the directory:

They are thus declared as dependencies for the plugin.

You can use either of the following two methods to add the plugins:

  • Add the plugins in the Eclipse Editor

  • Add the plugins using the Eclipse Wizard

An example file might look like this:

Optional: Enable the pre-configured UI elements

Yatta Checkout offers a selection of pre-configured UI elements, like a page to show the current state of a license and an academic preferences page to manage the state of an academic license.

To enable the UI, add the following configuration to your file:

Add an implementation for a preference page by inheriting from

Then add the following code to your :

For subscription and one-time purchase licenses, different Solution IDs must be used. If your solution is available with both license types, there should be two different preference pages. A second class inheriting from should be implemented and added to .

Checkout implementation

Once the Eclipse IDE is configured, you can start implementing the Licensing Client and the In-App Checkout. The two key actions are to open the In-App Checkout as an Eclipse view (to guide a user towards a license purchase) and to query a license (to determine the license status of your solution).

Open the in-app Checkout

The following command opens the in-app Checkout:

Note: The ‘MarketplaceClient.get().openCheckout’ method does not pre-select for the preview or the live version. You have to force the choice manually. Put 'preview.' in front of the solution identifier to select the preview version. Type in your solution ID with nothing in front to select the live version.

If the user is not already signed in, the user is asked to sign in. If the user already has a license, a dialog is shown informing them that a valid license already exists.

Query a license

The following commands query the license for the user (who is currently signed in):

The following parameters can be set individually:

The validity of the LicenseResponse can be checked with the following command:

can give the following responses:

LICENSED The feature in question is licensed by the user currently logged in. Additional license requirements (concurrent quotas, etc.) are met.
UNLICENSED The user does not have a license for this feature assigned to their account.
UNAUTHORIZED_REQUEST The API key does not match the given feature.
WAIT The current validity of the requested license is unknown. Therefore a new license must be requested from the server. This call is asynchronous. Until the new license is fetched, all license requests for this feature will result in a response with validity WAIT
UNKNOWN_FEATURE You provided the wrong Solution ID to the API.

Implementation example

Here is a basic example of an implementation using the Yatta Checkout within Eclipse. The app shows a dialog that provides the state of the license and the sign-in. If the user is not signed in or if a valid license is missing, the in-app Checkout will open.

For a more elaborate example, check out the source code of our Eclipse Demo Plugin: https://www.yatta.de/download/Yatta_Checkout-Eclipse_Demo_source.zip