1

I'm trying to use GPS (version 19.1) as an external editor for Greenhills AdaMULTI.

I entered -P<myproject.gpr> +%LINE %FILE0 %FILES into the "command line arguments" and also the correct path to GPS for "AdaMULTI Other Editor Configuration".

So far this works as expected, i.e. when pressing CTRL+E in the AdaMULTI Project Manager GPS opens with the file to be edited. Also, when a bug is encountered while compiling GPS opens at the proper line and file.

But ... when configured this way, always a new instance of GPS is opened, which is some kind of annoying because you'll have several instances running all with a single file opened after a while. Is there a way (option, environment variable or whatever) to tell GPS to use an already running instance?

I have read both the AdaMULTI documentation and GPS User'S Guide to find anything relevant, but to no avail.

Thoran
  • 163
  • 1
  • 9

2 Answers2

0

you can write some Python plugin for GPS to watch some file for changes, then read a "command" from it to open a file at a given position. Or some other kind of IPC.

What OS do you use? Windows?

Maxim Reznik
  • 1,216
  • 9
  • 12
  • Yes, that's on Windows. But AdaMULTI puts its compile output to an own window and then automatically opens the erroneous file using whatever external editor has been configured. So, there is no file to watch for changes. – Thoran Apr 03 '19 at 15:42
0

I wonder whether you could treat the GPS system as "running on a remote server", see GPS documentation chapter 14, Using GPS for Remote Development, where the "remote" server is in fact the local machine.

Simon Wright
  • 25,108
  • 2
  • 35
  • 62
  • Nice idea, wouldn't have thought of this. Alas, tried it, but this does not help. I'm still getting a new instance every time either I try to open a file manually from AdaMULTIs project view or the compiler automatically opens a file with a compilation error. – Thoran Apr 04 '19 at 09:07