Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2010-07

Jump to implementation (inspired by Bernd Kreuss Codetool ideas "what is an "identifier"")

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Martin

I am making this a separate thread, because it got nothing to do with the old subject "[Lazarus] CodeTools: what is an "identifier""

The idea discussed there, fails due to the fact that "ObjectOfClass_BaseFoo.SomeMethod" can only be resolved to that base class's SomeMethod.

One case where this is annoying is:

procedure TSpecialFoo.OtherMethod;
begin
   BaseOnlyMethod();
end;
procedure TBaseFoo.OtherMethod;
begin
   SomeMethod();
end;

And SomeMethod exists in both => base and specialised class.

You (the human reader) knows you started in TSpecialFoo => but codetool doesn't know.

Yet codetool could know.

Codetool could remeber when a "implementation jump happens:
- FROM which class (and even method) it started (if it comes from a method in a class)
- TO which method

If there:
- was no editing (not even a requirement)
- the next jump starts from within the last "TO"
then the chain is continued

The whole chain needs to be kept => since it go through more than one method in the base class

Just an idea. (one of many)....
May yet need some fine tuning

Martin

Reply by email

Martin
to Martin
Martin wrote 15 lines
I am making this a separate thread, because it got nothing to do with the old subject "[Lazarus] CodeTools: what is an "identifier"" The idea discussed there, fails due to the fact that "ObjectOfClass_BaseFoo.SomeMethod" can only be resolved to that base class's SomeMethod. One case where this is annoying is: procedure TSpecialFoo.OtherMethod; begin BaseOnlyMethod(); end; procedure TBaseFoo.OtherMethod;
should be : procedure TBaseFoo.BaseOnlyMethod;
Show quoted text 12 lines
begin SomeMethod(); end; And SomeMethod exists in both => base and specialised class. You (the human reader) knows you started in TSpecialFoo => but codetool doesn't know. Yet codetool could know. Codetool could remeber when a "implementation jump happens:

....

Reply by email

Mattias Gaertner
to Martin
Show quoted text 29 lines
On 28/07/2010 19:27, Martin wrote: > I am making this a separate thread, because it got nothing to do with > the old subject "[Lazarus] CodeTools: what is an "identifier"" > > The idea discussed there, fails due to the fact that > "ObjectOfClass_BaseFoo.SomeMethod" can only be resolved to that base > class's SomeMethod. > > One case where this is annoying is: > > procedure TSpecialFoo.OtherMethod; > begin > BaseOnlyMethod(); > end; > > procedure TBaseFoo.OtherMethod; should be : procedure TBaseFoo.BaseOnlyMethod; > begin > SomeMethod(); > end; > > And SomeMethod exists in both => base and specialised class. > > You (the human reader) knows you started in TSpecialFoo => but > codetool doesn't know. > > Yet codetool could know. > > Codetool could remeber when a "implementation jump happens:

Just to clarify: The IDE jumps, not the codetools. The find declaration function is not only called to jump. The IDE must remember.

The above can be annoying if not intended or confusing if the user does not know/understand the feature.

I intend to use the history for the sort of the overrides.

Mattias

Reply by email