[Gambas-user] I added "External Tools" to my gambas :)

Benoît Minisini g4mba5 at gmail.com
Thu Jan 27 22:57:16 CET 2022


Le 27/01/2022 à 06:34, Bruce Steers a écrit :
> 
> 
> Right,, now i think it is more worthy your examination.
> 
> i still have to give it a thorough debugging but the structure is now 
> complete.
> 
> What i could do with knowing (probably changing) is how i have 
> integrated it to the IDE.  I should imagine your understanding of it all 
> has a much better way to properly integrate it.
> 
> But i'm border-line offering it for a merge request soon :)
> 
> Branch.
> https://gitlab.com/bsteers4/gambas/-/tree/External-Tools 
> <https://gitlab.com/bsteers4/gambas/-/tree/External-Tools>
> 
> Snapshot.
> https://forum.gambas.one/download/file.php?id=1018 
> <https://forum.gambas.one/download/file.php?id=1018>
> 
> Respects
> BruceS
> 
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----

Hi,

I'm not against the principle, but the implementation.

I have already thought about that in the past, and I would prefer having 
IDE plugins written in Gambas, not in bash.

The plugins could be external Gambas executables / scripts, or Gambas 
libraries that would run in-process.

The former would work through an API, i.e. a class exported by the IDE. 
It is more "dangerous" for the IDE, but it would work faster, and would 
give plugins more power, that power being limited by the exported API.

Now there are different kind of plugins :

- Project-wide plugins: they modify the entire project, or some files of 
the project. For example, optimizing all the PNG files of a project, 
cleaning the project...

- Plugins that work with a specific file (source code file, form file, 
text file, image file...). Plugin that run on a text file or a source 
code file may act only on the current selection ; plugin that run on an 
image may act only on the current selection...

- Plugins that run something else, using the project as a read-only 
souce. For example, counting the number of lines of code.

A plugin library may have a specific form that would be used for 
configuring the plugin. That form may be embedded in a global IDE dialog 
with the configuration forms of all other plugins.

Project-wide plugins will be associated with an action, a icon, and a 
menu entry that will be inserted in the global toolbar and inside a 
specific global menu.

Editor-wide plugins will be associated with an action and a icon that 
would be inserted in the editor toolbar, and a menu entry that will be 
inserted in the editor specific popup-menu.

Some text file inside the plugin archive will describe the plugin 
contents for the IDE.

Note that at the moment Gambas does not know how to unload a library. So 
disabling a plugin would release the memory only on next launch.

These plugins libraries will be installed in specific directories like 
'/usr/share/gambas3/ide-plugins' or '~/.local/share/gambas3/ide-plugins'.

What do you think?

-- 
Benoît Minisini


More information about the User mailing list