Skip to content

Latest commit

 

History

History
51 lines (40 loc) · 4.59 KB

goland.md

File metadata and controls

51 lines (40 loc) · 4.59 KB
title
GoLand Plugin Development

Introduction

GoLand is an IntelliJ Platform-based product. Plugin projects for GoLand can be developed using IntelliJ IDEA with the gradle-intellij-plugin.

TIP Qualifying Open Source projects can apply for free licenses of JetBrains products.

Configuring Plugin Projects Targeting GoLand

The configuration of GoLand plugin projects follows the methods described in Configuring Plugin Projects using the IntelliJ IDEA Product Attribute, and Configuring the plugin.xml File.

The table below summarizes the gradle-intellij-plugin attributes to set in the plugin project's build.gradle file. Click on an entry in the table's Attribute column to go to the documentation about that attribute. To see how these attributes appear in a similar build.gradle file for PhpStorm, see Configuring build.gradle using the IntelliJ IDEA Product Attribute.

gradle-intellij-plugin Attribute Attribute Value
intellij.type IU for IntelliJ IDEA Ultimate. The Go plugin isn't compatible with IntelliJ IDEA Community Edition.
intellij.version Set to the same IU BRANCH.BUILD as the GoLand target version, e.g. 193.5233.102.
intellij.plugins org.jetbrains.plugins.go:193.5233.102.83 for the Go plugin.
See below for Go plugin version information.
runIde.ideDirectory Path to locally installed target version of GoLand. For example, on macOS:
/Users/<user name>/Library/Application Support/JetBrains/Toolbox/apps/Goland/ch-0/193.5233.112/GoLand.app/Contents.

The Go plugin version is explicitly declared because it isn't bundled with IntelliJ IDEA Ultimate Edition. Select a version of the Go plugin compatible with the IntelliJ Idea Ultimate version.

The dependency on the Go plugin APIs must be declared in the plugin.xml file. As described in Modules Specific to Functionality table, the <depends> tags must declare com.intellij.modules.go. The plugin.xml file must also declare a dependency on com.intellij.modules.platform as explained in Configuring the plugin.xml File. The dependency declaration is illustrated in the plugin.xml snippet below:

  <!-- Requires the Go plugin -->
  <depends>org.jetbrains.plugins.go</depends>
  <!-- Requires the platform module to distinguish it from a legacy plugin -->
  <depends>com.intellij.modules.platform</depends>

Available GoLand APIs

Use the Exploring APIs as a Consumer process to identify the library intellij-go-<version>.jar, where <version> corresponds to the version of the Go plugin. Test your plugin with any version of GoLand you intend to support.

Open Source Plugins for GoLand

When learning new APIs, it is helpful to have some representative projects for reference: