Getting Started

This sections provides information about the steps required to get started with IntelliJ AEM including installation of the plugin and initial project setup.

Installing the Plugin

Installation of IntelliJ AEM is done through IntelliJ IDEA's integrated plugin manager. From within the application, open the Settings dialog and select Plugins from the list on the left-hand side. This will show you the list of currently installed plugins.

Next, click the Browse Repositories... button, which allows you to browse through Jetbrains' repository of third-party plugins. Enter "AEM" into the search field in the top left corner and select IntelliJ AEM from the list. Finally, click the green Install button and restart the application. The plugin should now be installed and you can setup your project.

Adding Framework Support

First thing you need to do after installation is to enable the AEM Support framework for your modules, as most of IntelliJ AEM's functionality is only available when it's activated. When creating a new project, you can select additional frameworks to enable in the New Project... wizard.

For existing projects, right-click a module in the Project tool window and select the Add Framework Support... menu entry. Then search for AEM Support in the list and enable it. Note that these steps need to be repeated for all modules where you want to use IntelliJ AEM's functionality.

Finally, re-open the project for all changes to take effect.

Configuring AEM Instances

For auto-completion to properly work, you need to have an instance of AEM running that can be indexed by IntelliJ AEM. After the AEM Support framework has been added to at least one module and the project was re-opened, a new tool window for configuring your AEM instances is available on the right-hand side of the application.

Open the tool window and click the plus icon to add a new instance to the list. In addition to a display name and the instance's URL (e.g. http://localhost:4502), a username and password are required. Please be aware that if you're not using the admin user, access will be limited to information that is visible to your user.

As indicated by the little star icon, the instance added first will be automatically used for indexing. However, this setting can be changed at any time using the corresponding toolbar action.

Feature Documentation

Some of the features provided by the plugin may not be self-explanatory, so this section provides some extra documentation for them.

Adding deployed OSGi bundles as external libraries

In version 0.7, IntelliJ AEM introduced a new feature that adds the OSGi bundles that are deployed to your AEM instances as external libraries to your projects. This has a number of advantages. Most importantly, it allows you to debug code that is not available as public libraries, for example via Maven repositories, and helps with troubleshooting problems that are not directly originating from your code. In addition to that, IntelliJ IDEA will index them and you can also benefit from code completion that is based on private classes such as OSGi components provided by AEM.

For this feature to work, you need file system access to the directory where your AEM instance is stored. Select your preferred instance in the AEM Instances tool window and open the properties dialog. Now enter your instance's base directory, i.e. the directory that contains the crx-quickstart, into the Path and confirm by pressing the OK button. IntelliJ AEM will now automatically search for all OSGi bundle JARs and add them as external libraries to your project. To see those libraries, open the Project tool window and expand the External Libraries node at the bottom. Additionally, a file system watcher is setup to make sure the list of OSGi bundles is always up-to-date when new bundles are installed.

If you don't want to use this feature, you can disable it in the Preferences under Other Settings -> AEM Support.

Compatibility

Since 0.6.2, IntelliJ AEM is compatible with all major Jetbrains IDEs with version 2017.2 and higher.

Feedback and Bug Reports

IntelliJ AEM benefits a lot from bug reports and general user feedback, so please get in touch using one of the channels below. I'm looking forward to hear from you.

Errors reported by IDE

In many cases, when you run into a bug, an exception is thrown and you'll get IntelliJ IDEA's error report popup. When clicking the link in the popup, you'll see the error that occurred and you can enter additional information that may help resolving the issue. Please provide as much information as you can.

When you finally click the Report by email button, IntelliJ AEM's custom error reporter will send an email containing the stacktrace and any additional information you provided. It will also include IntelliJ IDEA's and the plugin's version.

Email

If something is not working, but no error is reported by IntelliJ IDEA, or if you simply want to give feedback, please send an email. Please also include any steps necessary to reproduce the issue and your IntelliJ IDEA's and the plugin's version.

Gitter

There is also a community on Gitter now where you can ask questions, discuss features or suggest improvements.