comp.lang.ada
 help / color / mirror / Atom feed
* how do do with IDE ? Do they really suck or do I do not know how to handle GPS ?
@ 2018-03-14 22:53 Mehdi Saada
  2018-03-14 23:32 ` Mehdi Saada
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Mehdi Saada @ 2018-03-14 22:53 UTC (permalink / raw)


Hello.

First time I work for real (way to talk... small work, yet on a programmer's program), with many files, many entities, etc.
Is it me, or is it stupidly hard to have GPS find the original definition of a type ? Said otherwise: why doesn't "goto file spec<->body seem to work on constants ? What I want to trace back a constant declaration ?
I study Sparforte, the shell from Ken Burtch. There's this type, "identifier".
I can't find "type identifier" anywhere, except a mention in a comment, but type definition.
Is it that don't know how to use GPS... isn't it meant to be straight-forward, you type next to "default" and it's searched in all your source, or the same with control-f ? What the F$c% ?

For those who do not use modern IDE and DO NOT USE EMACS, who do you do ?

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: how do do with IDE ? Do they really suck or do I do not know how to handle GPS ?
  2018-03-14 22:53 how do do with IDE ? Do they really suck or do I do not know how to handle GPS ? Mehdi Saada
@ 2018-03-14 23:32 ` Mehdi Saada
  2018-03-15  7:57   ` Jacob Sparre Andersen
  2018-03-15  7:56 ` Jacob Sparre Andersen
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 12+ messages in thread
From: Mehdi Saada @ 2018-03-14 23:32 UTC (permalink / raw)


Sorry, it was a rant for nothing. Some files have a suffix .orig, and the IDE naturally has to be told of their special suffix beforehand.

But my last question still holds :-)

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: how do do with IDE ? Do they really suck or do I do not know how to handle GPS ?
  2018-03-14 22:53 how do do with IDE ? Do they really suck or do I do not know how to handle GPS ? Mehdi Saada
  2018-03-14 23:32 ` Mehdi Saada
@ 2018-03-15  7:56 ` Jacob Sparre Andersen
  2018-03-15  8:51   ` gautier_niouzes
  2018-03-15  8:55   ` Dmitry A. Kazakov
  2018-03-15  9:43 ` Björn Lundin
  2018-03-15 17:37 ` Jeffrey R. Carter
  3 siblings, 2 replies; 12+ messages in thread
From: Jacob Sparre Andersen @ 2018-03-15  7:56 UTC (permalink / raw)


Mehdi Saada wrote:

> For those who do not use modern IDE and DO NOT USE EMACS, who do you
> do?

When I work in vi, I simply remember where things are declared.

For projects too big for that I use Emacs or GPR.

GPS *can* take you from an object name to its declaration, and then from
the type name in the object declaration to the type declaration.  But
this only works if you compile your source text, so GPS knows which
names match which declarations.

If your source text doesn't compile, the meaning of the identifiers
isn't really well-defined.  (I have heard that developers working on GPS
at AdaCore are looking into expanding the cases, where GPS can make
sensible guesses about the meaning of identifiers, but that's not
available yet.)

Greetings,

Jacob
-- 
"Being an absolute ruler today was not as simple as people
 thought.  At least, it was not simple if your ambitions
 included being an absolute ruler tomorrow."

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: how do do with IDE ? Do they really suck or do I do not know how to handle GPS ?
  2018-03-14 23:32 ` Mehdi Saada
@ 2018-03-15  7:57   ` Jacob Sparre Andersen
  0 siblings, 0 replies; 12+ messages in thread
From: Jacob Sparre Andersen @ 2018-03-15  7:57 UTC (permalink / raw)


Mehdi Saada wrote:

> Sorry, it was a rant for nothing. Some files have a suffix .orig, and
> the IDE naturally has to be told of their special suffix beforehand.

That is in my experience a backup file from a version control system,
and *not* files you want to load into your IDE.

Greetings,

Jacob
-- 
"How may I be honest with you today?"

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: how do do with IDE ? Do they really suck or do I do not know how to handle GPS ?
  2018-03-15  7:56 ` Jacob Sparre Andersen
@ 2018-03-15  8:51   ` gautier_niouzes
  2018-03-15  8:55   ` Dmitry A. Kazakov
  1 sibling, 0 replies; 12+ messages in thread
From: gautier_niouzes @ 2018-03-15  8:51 UTC (permalink / raw)


Since the v.GPL 2016, GPS makes guesses about new typed code, without compilation.
Just type things like "type x is new integer; y:x;" : you can navigate from y to x in the unsaved file.
The context menu says "Goto declaration of y (best guess)".

BTW v.GPL 2017 is much better for such navigation in general (guessing or not).
_________________________ 
Gautier's Ada programming 
http://sf.net/users/gdemont/

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: how do do with IDE ? Do they really suck or do I do not know how to handle GPS ?
  2018-03-15  7:56 ` Jacob Sparre Andersen
  2018-03-15  8:51   ` gautier_niouzes
@ 2018-03-15  8:55   ` Dmitry A. Kazakov
  1 sibling, 0 replies; 12+ messages in thread
From: Dmitry A. Kazakov @ 2018-03-15  8:55 UTC (permalink / raw)


On 15/03/2018 08:56, Jacob Sparre Andersen wrote:

> If your source text doesn't compile, the meaning of the identifiers
> isn't really well-defined.

Right, but specifically a type declaration is very easy to find by plain 
search. Mark type name, CTRL-F, add "type " in front of it, select 
"files from projects".

> (I have heard that developers working on GPS
> at AdaCore are looking into expanding the cases, where GPS can make
> sensible guesses about the meaning of identifiers, but that's not
> available yet.)

Would be nice to have "goto spec <-> body" always working and other 
things related to the compilation units. They are all known from the 
project and need not to depend on the compilation progress.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: how do do with IDE ? Do they really suck or do I do not know how to handle GPS ?
  2018-03-14 22:53 how do do with IDE ? Do they really suck or do I do not know how to handle GPS ? Mehdi Saada
  2018-03-14 23:32 ` Mehdi Saada
  2018-03-15  7:56 ` Jacob Sparre Andersen
@ 2018-03-15  9:43 ` Björn Lundin
  2018-03-15 16:53   ` Mehdi Saada
  2018-03-15 17:37 ` Jeffrey R. Carter
  3 siblings, 1 reply; 12+ messages in thread
From: Björn Lundin @ 2018-03-15  9:43 UTC (permalink / raw)


On 2018-03-14 23:53, Mehdi Saada wrote:
> Hello.
> 

> Is it me, or is it stupidly hard to have GPS find the original definition of a type ? 

You could also press crtl and then click a function or a varible or a
type to go to its declaration.
But it has to be compiled once (I think) first.


-- 
--
Björn

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: how do do with IDE ? Do they really suck or do I do not know how to handle GPS ?
  2018-03-15  9:43 ` Björn Lundin
@ 2018-03-15 16:53   ` Mehdi Saada
  2018-03-15 21:45     ` Randy Brukardt
  0 siblings, 1 reply; 12+ messages in thread
From: Mehdi Saada @ 2018-03-15 16:53 UTC (permalink / raw)


Once it's compiled, all's easier, understood. IF the program is made with a correct project file, which is not the case here. Doesn't make things easier to work with him, since several files has more than one version. I actually don't know how he does it.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: how do do with IDE ? Do they really suck or do I do not know how to handle GPS ?
  2018-03-14 22:53 how do do with IDE ? Do they really suck or do I do not know how to handle GPS ? Mehdi Saada
                   ` (2 preceding siblings ...)
  2018-03-15  9:43 ` Björn Lundin
@ 2018-03-15 17:37 ` Jeffrey R. Carter
  3 siblings, 0 replies; 12+ messages in thread
From: Jeffrey R. Carter @ 2018-03-15 17:37 UTC (permalink / raw)


On 03/14/2018 11:53 PM, Mehdi Saada wrote:
> 
> Is it me, or is it stupidly hard to have GPS find the original definition of a type ? Said otherwise: why doesn't "goto file spec<->body seem to work on constants ? What I want to trace back a constant declaration ?

"Goto file spec<->body" just goes to the file containing the other part of the 
unit in the current file. It's not for going to a specific declaration. For 
that, put the cursor in the identifier of interest, right click, and click on 
"Goto declaration of X" (sometimes followed by "(best guess)"). This will 
usually take you to the declaration of the identifier.

If you want to know the type of a constant object, that will be all you need. If 
you want to know the declaration of the type, you'll have to do that again on 
the type name.

-- 
Jeff Carter
"Beyond 100,000 lines of code you
should probably be coding in Ada."
P. J. Plauger
26


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: how do do with IDE ? Do they really suck or do I do not know how to handle GPS ?
  2018-03-15 16:53   ` Mehdi Saada
@ 2018-03-15 21:45     ` Randy Brukardt
  2018-03-15 23:16       ` Mehdi Saada
  0 siblings, 1 reply; 12+ messages in thread
From: Randy Brukardt @ 2018-03-15 21:45 UTC (permalink / raw)


"Mehdi Saada" <00120260a@gmail.com> wrote in message 
news:0603b78c-bac3-4eec-96d4-b084470b233a@googlegroups.com...
> Once it's compiled, all's easier, understood. IF the program is made with
> a correct project file, which is not the case here. Doesn't make things
> easier to work with him, since several files has more than one version.
> I actually don't know how he does it.

Ever heard of Grep? (Find on MS-DOS/Windows.) It's the last resort for 
finding stuff if you can't remember (or never knew) where it is. Editors are 
for editing. ;-)

                             Randy.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: how do do with IDE ? Do they really suck or do I do not know how to handle GPS ?
  2018-03-15 21:45     ` Randy Brukardt
@ 2018-03-15 23:16       ` Mehdi Saada
  2018-03-16 10:26         ` Björn Lundin
  0 siblings, 1 reply; 12+ messages in thread
From: Mehdi Saada @ 2018-03-15 23:16 UTC (permalink / raw)


It's not that I can't find things, but I would like it to be easily available in the IDE. Which it is. My true problem is about adding files to the project that are not in .adb or .ads. I thought I had to "add complex naming scheme", I put "*.origin", but it only remove all files in the outline view. I don't get it. I tried to do the same in project -> properties, to no avail either. I could yesterday, then many config files disappeared (yeah, it's not called "unstable" debian for nothing I suppose) and I can't do it again. See:
project Sparforte is
   for Source_Dirs use ("SparForte/src/**");
   for Languages use ("Ada");
   package Naming renames Sparforte_Naming.Naming;
   for Main use ("spar.adb");
end Sparforte;

Does it seem ok ?
NOTHING appears in the project view, besides "Sparforte" and a folder with a "o" inside (meaning "object" ?)... These tools are too cumbersome for the moment, for me. If only there was the same on-the-fly auto-indentation in my favorite editor (or any auto-indentation by the way). Anyone using "micro" here ? Or anything except emacs, vi and GPS ?


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: how do do with IDE ? Do they really suck or do I do not know how to handle GPS ?
  2018-03-15 23:16       ` Mehdi Saada
@ 2018-03-16 10:26         ` Björn Lundin
  0 siblings, 0 replies; 12+ messages in thread
From: Björn Lundin @ 2018-03-16 10:26 UTC (permalink / raw)


On 2018-03-16 00:16, Mehdi Saada wrote:
> It's not that I can't find things, but I would like it to be easily available in the IDE. Which it is. My true problem is about adding files to the project that are not in .adb or .ads. I thought I had to "add complex naming scheme", I put "*.origin", but it only remove all files in the outline view. I don't get it. I tried to do the same in project -> properties, to no avail either. I could yesterday, then many config files disappeared (yeah, it's not called "unstable" debian for nothing I suppose) and I can't do it again. See:
> project Sparforte is
>    for Source_Dirs use ("SparForte/src/**");
>    for Languages use ("Ada");
>    package Naming renames Sparforte_Naming.Naming;
>    for Main use ("spar.adb");
> end Sparforte;
> 
> Does it seem ok ?

I miss a with "Sparforte_Naming";
and the contents of Sparforte_Naming.gpr



-- 
--
Björn

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2018-03-16 10:26 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-14 22:53 how do do with IDE ? Do they really suck or do I do not know how to handle GPS ? Mehdi Saada
2018-03-14 23:32 ` Mehdi Saada
2018-03-15  7:57   ` Jacob Sparre Andersen
2018-03-15  7:56 ` Jacob Sparre Andersen
2018-03-15  8:51   ` gautier_niouzes
2018-03-15  8:55   ` Dmitry A. Kazakov
2018-03-15  9:43 ` Björn Lundin
2018-03-15 16:53   ` Mehdi Saada
2018-03-15 21:45     ` Randy Brukardt
2018-03-15 23:16       ` Mehdi Saada
2018-03-16 10:26         ` Björn Lundin
2018-03-15 17:37 ` Jeffrey R. Carter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox