Author Topic: So a new Slickedit version is out, how is the Ada/gprbuild support?  (Read 514 times)

fritzeflink

  • Community Member
  • Posts: 55
  • Hero Points: 2
Re: So a new Slickedit version is out, how is the Ada/gprbuild support?
« Reply #15 on: February 13, 2020, 10:20:45 pm »
Right now yes since I am learning and sometimes want to go to the implementation to see how it's done. But I guess normally you need to tag only ads

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 5052
  • Hero Points: 418
Re: So a new Slickedit version is out, how is the Ada/gprbuild support?
« Reply #16 on: February 13, 2020, 10:25:15 pm »
Seems reasonable.

fritzeflink

  • Community Member
  • Posts: 55
  • Hero Points: 2
Re: So a new Slickedit version is out, how is the Ada/gprbuild support?
« Reply #17 on: February 14, 2020, 04:47:18 pm »
I am trying to copy your project settings into my original project and I run into some problems, whatever I do my project behaves different. I examined your gprbuild-sampe.vpj file and I see that it is different from my original one in ways I don't understand. For instance you have

TemplateName="Ada gprbuild">

while I have

TemplateName="Adacore GPS"
Customized="1"

nevermind the different name but it looks to me like you have prepared a template from which you made your project while I used some customization from the "other" template, is that right? And if so can you post the template here and explain how I can install it and further modify?




Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 5052
  • Hero Points: 418
Re: So a new Slickedit version is out, how is the Ada/gprbuild support?
« Reply #18 on: February 14, 2020, 05:12:12 pm »
I didn’t create this project from a template. I just made up a name. The template name shouldn’t effect this.

What doesn’t work?

fritzeflink

  • Community Member
  • Posts: 55
  • Hero Points: 2
Re: So a new Slickedit version is out, how is the Ada/gprbuild support?
« Reply #19 on: February 14, 2020, 06:35:47 pm »
For instance the debugger behaves differently. I copied your code changed into my main function and set a breakpoint on the first line
some_int := 456;
In your program when I debug the dbugger halts on that line and shows an arrow. In my version the debugger halts but shows no error. When I click on the "Set over next statement", in your project it works as expected, in mine it shows the down arrow on that line but then runs on without ever halting again as ig I had clicked the "continue" button. So I assume somehow you must have implicit options in your project that I don't have.

How did you create your project? Did you start from "other" and just added everything in the project optinos window by hand?

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 5052
  • Hero Points: 418
Re: So a new Slickedit version is out, how is the Ada/gprbuild support?
« Reply #20 on: February 14, 2020, 07:13:14 pm »
Try deleting your vpwhist file.

I created the ada project and modified it.

fritzeflink

  • Community Member
  • Posts: 55
  • Hero Points: 2
Re: So a new Slickedit version is out, how is the Ada/gprbuild support?
« Reply #21 on: February 15, 2020, 04:00:21 am »
OK, I tried just about everything and I could not get the debugger to run correctly with my project yet in yours it works. Then I deleted my vpwhist file and copied yours over and renamed it to fit my program and now my project debugs correctly.

What is this file and what is it in this file that determines whether the debugger works correctly or not?

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 5052
  • Hero Points: 418
Re: So a new Slickedit version is out, how is the Ada/gprbuild support?
« Reply #22 on: February 15, 2020, 04:15:36 am »
I don't know the specifics. It becomes unhappy when you change the debugger in the vpj file and becomes very lost. I think I had a problem with this too. I just created a new project which didn't already have a vpwhist and the problem went away. I'm still not sure if the problem was some debugger setting in the vpwhist file or if it was something stored elsewhere about the project. If the debugger is confused due to the vpwhist file, I would think exiting SlickEdit and deleting the vpwhist would do the trick. If you didn't exit SlickEdit, closing the workspace would recreate the vpwhist file.

Once we create a template for this, no one will run into this.

fritzeflink

  • Community Member
  • Posts: 55
  • Hero Points: 2
Re: So a new Slickedit version is out, how is the Ada/gprbuild support?
« Reply #23 on: February 15, 2020, 04:59:39 pm »
Cool. I will work a bit on creating some more GPS conform entries in the Build menu and post it here

fritzeflink

  • Community Member
  • Posts: 55
  • Hero Points: 2
Re: So a new Slickedit version is out, how is the Ada/gprbuild support?
« Reply #24 on: February 15, 2020, 09:37:57 pm »



I added several more commands to the build menu based on the syntax Adacore's GPS gives in it's output window. Compile and Pretty print work only when the respective adb file is open in SE. Of course you could add way more, but then you would have to dig deeper in the gprbuild options and add lot's of new windows to SE to basically replace all the settings that you can set in GPS with corresponding windows in SE which is a lot of work.

My general idea is a dual solution, use GPS to create and edit projects, set options etc and then work and edit in SE, build, run and debug in SE too. GPS can not be completely replaced by SE unless all the gbrbuild option setting facilities are supported in specialized windows

Execute: I was not able to figure out how to start a program that uses the standard console for input/output in SE so that a new window is created. The io happens in SE's build output window. Is there a way to start those programs in a separate window?


Context Tagging: Ada context tagging in SE should be changed. When you create an

"Ada" Tag Files

Entry in the list of tag files, you must enter the correct path for example D:GNAT\2019\Includes for the tag file to find the correct files. SE on the other hand deletes all the files you enter manually and replaces them with an entry that reads:

plugin:\\com_slickedit.base\sysconfig\tagging\builtins\builtins.ada

which only provides some rudimentary basic types but not the full Ada library set that comes with Adacore's distribution. I suggest either changing that or offer an alternative that does not destroy the manual setup whenever you click "retag" accidentally. The SE provided additional file is fine but when retagging the manually added files should not be deleted



Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 5052
  • Hero Points: 418
Re: So a new Slickedit version is out, how is the Ada/gprbuild support?
« Reply #25 on: February 15, 2020, 11:40:50 pm »
If your program does not run well in the process buffer, turn off "Capture output" and "Output to build window". Then SlickEdit will create a Terminal window to run your program.

For now, you should create an additional language specific tag file and not try to modify the auto generated tag file.

We will have to change the code for auto generating the runtime tag file for Ada to also add the files under c:\GNAT\2019\Includes if it can be found.

Thanks for figuring out these additional command lines.

fritzeflink

  • Community Member
  • Posts: 55
  • Hero Points: 2
Re: So a new Slickedit version is out, how is the Ada/gprbuild support?
« Reply #26 on: February 16, 2020, 02:20:31 am »
Thanks. One more question: Can I turn this project file into a template myself without going through the New Project dialog, I mean by editing a textfile either in SE directory or my SE data directory? I have been looking around but couldn't find any files that seem to repesent those templates.


Also you might want to make it more prominent that virusscanners interfere with the communication of the external programs as I have pointed out somewhere above and that either the SE install or the user data directory should be added to the virusscanner's exclude list.

fritzeflink

  • Community Member
  • Posts: 55
  • Hero Points: 2
Re: So a new Slickedit version is out, how is the Ada/gprbuild support?
« Reply #27 on: February 16, 2020, 03:03:05 am »
One other thing  regarding the standard GPS/Gnat include files. It appears that my original assumption was wrong and the main definitions used in Ada are in
d:\GNAT\2019\lib\gcc\x86_64-pc-mingw32\8.3.1\
I realized that after making some changes to the tag files. If that directry and it's subdirectories are excluded, standard IDs like "Put_Line" or even "Ada.Text_IO" are not found by SE anymore. I am not sure what kind of system they use to sort their include files but this one seems to be essential to recognize standard Ada identifiers.


fritzeflink

  • Community Member
  • Posts: 55
  • Hero Points: 2
Re: So a new Slickedit version is out, how is the Ada/gprbuild support?
« Reply #28 on: February 16, 2020, 03:15:17 am »
And one more thing I reallized just now (sorry about so many things).

When using the USE clause Slickedit does not recognize the identifiers from that package and colors them as Unknown/Red, but when they are prefixed with the complete package path they are correctly colorized. However when typing "Put_L" SE will correctly reference "Put_Line" and offers the completion as well as the parameters later on. The picture I include here shows that situation. I think they should be correctly colorized as valid identifiers even if no explicit qualifier is given. SE seems to know the correct one through the USE clause and should apply it in code.

This seems to be related to the function in the sample pic being in a package body. If you move the function above the "PACKAGE BODY InputOutput IS" line (although not correct zyntax but that is not the point) SE will correctly color the Put_line identifier as a known one. So apparently it depends on the nesting level or the package line as not recognized correctly.
« Last Edit: February 16, 2020, 03:37:40 am by fritzeflink »

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 5052
  • Hero Points: 418
Re: So a new Slickedit version is out, how is the Ada/gprbuild support?
« Reply #29 on: February 16, 2020, 03:08:51 pm »
You won't be able to create a usable template yourself without writing macro code to automatically creating a file (build.gpr at least) and create the necessary directories (obj and src). When we do this, it will probably be best for us to also automatically create a main.adb file.

I'll add a feature request for improved package support for Ada context tagging. Not sure if we can get this into v25 or not.