GNOME JavaScript bindings and IntelliJ IDEA Ultimate

124 Views Asked by At

I want to build a GNOME extensions. How do I integrate GNOME JavaScript (GJS) into my IDE (IntelliJ IDEA Ultimate)?

Currently, I create a new extension like described in the official developer guide:

gnome-extensions create --interactive

Opening the resulting file structure within IntelliJ leaves me with a lot of warnings. I.e. the following snippet of the automatically generated extension.js has a warning in every single line like ("Unresolved variable", "Unresolved variable or type", "Unresolved function or method"):

...
const { GObject, St } = imports.gi;

const ExtensionUtils = imports.misc.extensionUtils;
const Main = imports.ui.main;
const PanelMenu = imports.ui.panelMenu;
const PopupMenu = imports.ui.popupMenu;
const Me = ExtensionUtils.getCurrentExtension();

const _ = ExtensionUtils.gettext;

const Indicator = GObject.registerClass(
...

The official documentation comes with a chapter "Setting Up Your Application Development Environment", but it does not contain a hint on how to integrate GJS bindings into an IDE but instead refers to manually building applications in GNOME in case of IDEs other than GNOME Builder.

0

There are 0 best solutions below