I’ve noticed that Gedit Code Assistance Plugin misses (or it’s not easy to search) some page like that: https://live.gnome.org/Gedit/PythonPluginHowTo where you can find the steps to create a plugin for Gedit by yourself. Maybe because this plugin are still in development.
This kind of page are important to find more contributors, to auxiliary developers and document the project. So, I’ve decided to use this blog to show and describe steps that I followed during my development. I got this steps with assistance of my mentors Paolo and Ignacio. As Paolo said “Code assistance supports plugin itself – plugins of plugin”.
After you have installed JHBuild and been able to use Gedit 3.9 you can start to devel new features for Gedit Code Assistance (Gcp), such as making Gcp supports other programming languages.
First of all, you need to install Gedit-Code-Assistance. For this:
1- Clone Gcp from repository:
2- Using JHbuild enviroment, follow installation steps of README file. Pay attention with dependencies and install them using JHBuild as well.
3 – Test if your Gcp is working fine. To turn it on, you need to select on menu bar Preferences > Plugins > Gedit Code Assistance. Note that, for Gnome 3.10, Gedit Preferences are on top bar of your desktop enviroment. So, you will not find this on the Gedit Window.
After everything has occurred fine, you need to create a space to put your backend and turn it visible for Gcp:
1 – As languages already supported by plugin, create a folder in “backends” with the name of your language. In my case was backends/vala
2 – You can copy files from python folder: renaming to your language (gcpbackendpython.plugin -> gcpbackend<your_language>.plugin, modifing metadatas such as:
Loader (C is default): it is about language that you are writting your plugin.
X-Languages: this is about the new backend that you wanna implement
3 – You need to include somethings in auto tool’s configuration file:
- In backends/Makefile.am:
SUBDIRS += <folder_of_your_language>
- In backends/<your_folder_language>/Makefile.am:
If you are using vala, use C Makefile.am and change “SOURCES =”, “valapkgs =”, “plugin_DATA”, “EXTRA_DIST = ” and “GITIGNOREFILES =” as convenient.
- In configure.ac
– PKG_CHECK_MODULES: create a one related to your language packages
– AC_CONFIG_FILES: add path related to your Makefile language
Next post I will describe files where you will develop your plugin