IntelliJ Plugin Development introduction: PersistStateComponent

This post explains IntelliJ IDEA Plugin development. The source code explained here is uploaded in official repository as a CLion plugin, please check Single File Execution Plugin on github. Save value for IntelliJ Plugin If your plugin want to keep some configuration value and you want to save the values in storage, PersistentStateComponent can be used in IntelliJ IDEA plugin development. Ref Persisting State of Components   Make a class implments PersistentStateComponent Create new Java class, and add implements PersistentStateComponent<T>. Following hands on example, I will introduce easy quick implementation for this class. I made SingleFileExecutionConfig class which implements PersistentStateComponent<SingleFileExecutionConfig>. So the State type T is same with created class. To implement this interface PersistentStateComponent<T>, we need […]

Continue reading →

IntelliJ Plugin Development introduction: ApplicationConfigurable, ProjectConfigurable

singlefileexecutionconfigurable_setting2

[Update 2016.5.12] I uploaded Single File Execution Plugin on github. This post is for IntelliJ IDEA Plugin development. Configurable – Adding a configuration menu of Plugin to the Settings dialog If your plugin want user to allow some settings, we want to show configuration UI. We can show it on the IDEA settings dialog by implementing Configurable. This post introduces quick implementation for ApplicationConfigurable and ProjectConfigurable. I’m summarizing it because I could not find many references for IntelliJ IDEA Plugin development, and I also might have mistake. Ref:  Customizing the IDEA Settings Dialog Configurable IDEA Making class implements Configurable At first, create new java class. Here I made SingleFileExecutionConfigurable.java. Let this class implement SearchableConfigurable. SearchableConfigurable […]

Continue reading →

IntelliJ Plugin Development introduction: GUI form designing

JDesigner

This post explains IntelliJ IDEA Plugin development. GUI form and Dialog IntelliJ provides 2 types of GUI component called GUI form and Dialog. IntelliJ uses special XML format with extension .form to design GUI component. Form is similar to Android’s res/layout xml files, and it makes easy to developing GUI on IntelliJ platform. Ref Creating and Opening Forms GUI Designer Basics Creating new GUI form or Dialog can be done by right click on src → New → GUI Form or Dialog. Detail explanation for each GUI component is done later.  For both components, form file (extension .form) and bound class (extension .java) will be created.   Understanding .form What is the […]

Continue reading →

Android Studio Live Templates Introduction

live_template_1

How to use Live Templates Go to [File] → [Setting] → [Live Templates], already registered live templates are shown. We can check the Abbreviation, Description and Template text here. During the coding, typing “Abbreviation”(shorcut command) followed by pressing [Tab], “Template text” will be expanded. Live templates are very useful to eliminate to write the code which we often use. For example, Abbreviation “fbc” can be used for coding findViewById method (You definitely often use it when you want a reference to UI, right?). Type “fbc” and press Tab, it will automatically expand

and the cursor is selected to inside the first (), so that you can start typing class […]

Continue reading →