---
title: "Plugin Development Basics"
canonical: "https://wiki.yellowfinbi.com/space/user80/1541271/Plugin%20Development%20Basics"
format: markdown
---
> Macro (anchor)



> Macro (toc)


## Overview

This guide provides essential tips and steps to help developers set up their IDE to help them code Yellowfin supported plugins, widgets, advanced functions, and more.


## Setting up your IDE

Here's a step-by-step tutorial to help you set up your development environment. 

1. Download and set up Eclipse for EE developers. **Note:** This is Yellowfin's recommendation, but you can use your preferred IDE.
2. Install the [Tomcat plugin](https://marketplace.eclipse.org/content/eclipse-tomcat-plugin), if it isn't already bundled with the installation.
3. Install the version of Yellowfin to be used for development. **Note:** We suggest getting the latest version for increased productivity.
4. Start up Yellowfin to extract the WAR file.


### Create a Plugin Project

These steps will help you to create a new project for your Java plugin.

1. On starting Eclipse, create a new Java project.
  1. Enter the project name and ensure you select a JRE compatible with your version of Yellowfin.
  2. Click **Next** and change the default output folder to **<project-name>/ROOT/WEB-INF/classes**.  
  
> Macro (inline-media-image)
  3. Click **Finish**.
2. Import files from the installed Yellowfin instance:
  1. Right-click on the project and select **Import**.  
  
> Macro (inline-media-image)
  2. Select **File System** and click **Next**.  
  
> Macro (inline-media-image)
  3. Navigate to **appserver/webapps/ROOT** in the Yellowfin install directory. Select **ROOT** and click **OK**.  
  
> Macro (inline-media-image)
  4. Select everything under **ROOT** and in the **Advanced** section, select the **Create** **links in workspace **checkbox.  
  
> Macro (inline-media-image)
  5. Click **Finish**. Files from the installed Yellowfin will be linked to this project.

---

### Configure the Project

Follow these steps to configure your project.


1. Right-click on the project and select **Build Path **>** Configure Build Path** from the menu. Then select the **Libraries** tab.
  
2. Click the **Add JARs** button and type "**i4**" into the search bar. From the results, select **i4-core.jar** and** i4-mi.jar** from your plugin project.
  
3. Click **OK** to save this and **OK** again in the build path config window.
4. Under the **WEB-INF/src** folder, create a new folder and call it **META-INF**. Create a new folder called **services** within this one.
  
5. Depending on which plugin is being developed, create a file with the fully qualified name of the plugin interface in the **services** directory. See the table below for all available plugin options:
  
  1. For instance, if creating a Data Transformation Step, name your file '**com.hof.mi.etl.step.ETLStep**'.
    
6. Create the plugin class by implementing one of the interfaces given above. The fully qualified classname should be added to the services file corresponding to the interface.  
So, for our Data Transformation Step example, add its fully qualified classname to **META-INF/services/com.hof.etl.step.ETLStep**.  
  
> Macro (inline-media-image)

  
You can add further transformation steps below this line, if required.


---

### Configure Tomcat

The next step is to set up your Tomcat configuration. 


1. Select **Window ** **> Preferences** and go to the section for **Tomcat**.
  
2. Set **Tomcat home** to *<Yellowfin Install directory>/appserver* and **Contexts directory** to *<Yellowfin Install directory>/appserver/conf/Catalina/localhost.*
3. Expand the **Tomcat** section in the left-side menu and click on **Advanced**. Add the plugin project to Tomcat's classpath.
  
4. Adjust JVM Settings, if necessary (through the **JVM Settings** option on the left side). **Tip:** You could use this to increase the memory available for Tomcat.
5. Select **Source Path** (in the left side menu) and add the plugin project.
  
6. Click **OK** to save.
7. Start up Tomcat from Eclipse using the buttons in the toolbar.
  
8. The plugin will be now be available in Yellowfin.

 

> ✅ Changes to code get reflected instantly, except when:
> ✅ 
> ✅ - a method's signature is changed,
> ✅ - new methods/members are are added to the class,
> ✅ - new classes are added to the plugin package.
> ✅ 
> ✅ In these cases, Tomcat must be restarted to apply changes.



---

## Packaging the Plugin

Once you've created your plugin, you will need to package it will all of its dependencies. The file extension should be in a specific file format that is supported in Yellowfin.


1. Right-click on the project and select **Export > JAR file**.
2. Select only the package(s) to be exported and nothing else.
  
3. If the project has dependent JARs, put all of them and the Plugin JAR into one directory, zip into one archive, and give it the extension "**yfp**".



---

## Debugging

Debugging is easy as the Eclipse Tomcat plugin starts Tomcat in the debug mode. Simply add breakpoints in code and ensure they are active.

![image](media://c28ca5dc-55e8-4d6d-b094-cb0d4e28ca3b)