Re: [Lazarus] How to solve this coding problem?

2018-04-15 Thread Anthony Walter via Lazarus
A follow up. I remember Delphi 3 had an object browser and managed to get a
screen capture:

https://cache.getlazarus.org/images/object-browser.gif

It had a few useful features.

1) It listed the entire hierarchy of classes at your disposal, unlimited by
unit selection. Therefore you could look at classes and their methods,
rather than picking through unit names.

2) When a class was selected you could see all its properties and methods,
even if they were defined in a parent class. Also it would note whether
methods were virtual and display their visibility level. I can't remember
was references was, but if it listed places in code where the type was
referenced, now that would be cool.

I think this could be done for Lazarus using CodeTools. Improvements I'd
like to see would be to include method and property argument signatures in
the list on the right.

For example:

TCustomForm

[PU] procedure GetPreferredSize(var PreferredWidth, PreferredHeight:
Integer; Raw: Boolean = False; WithThemeSpace: Boolean = True);

Where [PU] would be an icon denoting it's public.

Also, a would be nice to have would be making members searchable. That is
you could type "Size", and all fields, methods, and properties of known
with the partial match "Size" in their identifying name would show up. And
clicking one that one result would take you to the entire list of members
for that type. So if you were to search for "Size", and double clicked on
the "[PU] procedure TCustomForm.GetPreferredSize" line, which was one of
may results, you'd be taken to the entire listing of TCustomForm inside the
same object browser window.

Your thoughts?
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] How to solve this coding problem?

2018-04-15 Thread Anthony Walter via Lazarus
So I am writing a tool to share with the community and found a problem with
using Lazarus and packages. I hope someone has an answer to this.

The problem is that when you are using packages, often there is no
practical way to find the methods and properties even if you have the
source code.

Here is an example of the problem:

https://cache.getlazarus.org/videos/code-tools-problem.mp4

Whats happening here is there is a VERY deep hierarchy of inherited
classes, there is no documentation, and the IDE provides no tool or way to
view the methods and properties of a type, except for what's actually
declared on the class.

This makes it near impossible to effectively make use of many things unless
you are the original author and know the methods and proeprties of the
entire hierarchy by memorization.

What we need is a tool window in the IDE that shows you a list of all
classes/interfaces/types/vars/consts in the packages loaded in a project,
and selecting said class/interface shows you all its methods and
properties. Both the methods and properties on the class, but also
inherited methods and properties in one single list, all the way down to
TObject/IInterface. Without the need to open the inherited class or method
to view them separately. It needs to be a single list, otherwise your
chasing a bunch of different windows/tree nodes jsut to figure things out.

So, we should be able to view these methods and properties in a single
window that isn't a hint window. In a window that can stay open for
browsing. In a window hopefully with the ability to be docked so it can be
used as a reference or guide while writing code.

Let me know your thoughts. Thanks.
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus