Sign in Join

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

Mailing lists / lazarus / 2013-09

New feature: Find references of a used unit

20 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

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

Mattias Gaertner

Hi all,

When you now right click on unit in a uses section to get the popup menu, click on "Find / Find references of used unit" to find all references in the current unit to the used unit.

Mattias

Reply by email

Daniel Gaspary
to Mattias Gaertner
Mattias Gaertner wrote
When you now right click on unit in a uses section to get the popup menu, click on "Find / Find references of used unit" to find all references in the current unit to the used unit.

Is already possible to do the same to variables and types ?

Nice feature, thanks.

Reply by email

Mattias Gaertner
to Daniel Gaspary
Show quoted text 11 lines
Daniel Gaspary hat am 10. September 2013 um 22:32 geschrieben: On Tue, Sep 10, 2013 at 5:17 PM, Mattias Gaertner wrote: > When you now right click on unit in a uses section to get the popup > menu, click on "Find / Find references of used unit" to find all > references in the current unit to the used unit. Is already possible to do the same to variables and types ?

Do you mean all variables in a unit?

Mattias

Reply by email

Martin
to Mattias Gaertner: When you now right click on unit in a uses section to get the popup menu, click on "Find…
Mattias Gaertner wrote 6 lines
Hi all, When you now right click on unit in a uses section to get the popup menu, click on "Find / Find references of used unit" to find all references in the current unit to the used unit.

Ok, didnt find it right away, since you need the compiler error to trigger it.

Also first time I tried, I had the unit dependencies win open before, and it did not jump to the unit. Even closing the window and calling it again from the poup menu wouldn't fix that

only after an IDE restart it worked

Reply by email

Daniel Gaspary
to Mattias Gaertner: Do you mean all variables in a unit? Mattias
Mattias Gaertner wrote 14 lines
> Daniel Gaspary hat am 10. September 2013 um 22:32 > geschrieben: > > > On Tue, Sep 10, 2013 at 5:17 PM, Mattias Gaertner > wrote: > > When you now right click on unit in a uses section to get the popup > > menu, click on "Find / Find references of used unit" to find all > > references in the current unit to the used unit. > > Is already possible to do the same to variables and types ? Do you mean all variables in a unit?

No, to find uses of a variable (or a type) in all files of a project.

Reply by email

Martin
to Daniel Gaspary: On Tue, Sep 10, 2013 at 5:17 PM, Mattias Gaertner Is already possible to do the same to…
Daniel Gaspary wrote 7 lines
On Tue, Sep 10, 2013 at 5:17 PM, Mattias Gaertner wrote: > When you now right click on unit in a uses section to get the popup > menu, click on "Find / Find references of used unit" to find all > references in the current unit to the used unit. Is already possible to do the same to variables and types ?

Do you mean "Find identifier references"?

e.g select a variable, and find all places where it is used? (same for types)

That has been there for a long time.

Some reading, I do highly recommend:
http://wiki.lazarus.freepascal.org/Lazarus_IDE_Tools http://wiki.lazarus.freepascal.org/New_IDE_features_since

Reply by email

Mattias Gaertner
to Martin: Ok, didnt find it right away, since you need the compiler error to trigger it. Also first…
Show quoted text 10 lines
On 10/09/2013 21:17, Mattias Gaertner wrote: > Hi all, > > When you now right click on unit in a uses section to get the popup > menu, click on "Find / Find references of used unit" to find all > references in the current unit to the used unit. > Ok, didnt find it right away, since you need the compiler error to trigger it.

Maybe you confuse two things here?

The Find / Find references does not need a compiler error. It just need the source editor caret on an identifier.

The new feature for "circular unit reference" require a compiler error.

Also first time I tried, I had the unit dependencies win open before, and it did not jump to the unit.

Fixed.

Even closing the window and calling it again from the poup menu wouldn't fix that

That only hides and shows it.

only after an IDE restart it worked

Mattias

Reply by email

Martin
to Mattias Gaertner
Mattias Gaertner wrote 13 lines
On Tue, 10 Sep 2013 22:05:02 +0100 Martin wrote: > On 10/09/2013 21:17, Mattias Gaertner wrote: >> Hi all, >> >> When you now right click on unit in a uses section to get the popup >> menu, click on "Find / Find references of used unit" to find all >> references in the current unit to the used unit. >> > Ok, didnt find it right away, since you need the compiler error to > trigger it. Maybe you confuse two things here?

Not so much confused, as had my expectation to high.

That is finding circles, before compiling, therefore seeing all circles, instead of resolving them one by one.

And maybe even seeing circles via implementation (that the compiler will be ok with)

Reply by email

Mattias Gaertner
to Martin
Show quoted text 18 lines
On 15/09/2013 13:42, Mattias Gaertner wrote: > On Tue, 10 Sep 2013 22:05:02 +0100 > Martin wrote: > >> On 10/09/2013 21:17, Mattias Gaertner wrote: >>> Hi all, >>> >>> When you now right click on unit in a uses section to get the popup >>> menu, click on "Find / Find references of used unit" to find all >>> references in the current unit to the used unit. >>> >> Ok, didnt find it right away, since you need the compiler error to >> trigger it. > Maybe you confuse two things here? Not so much confused, as had my expectation to high. That is finding circles, before compiling, therefore seeing all circles, instead of resolving them one by one.

I can add an overlay icon to all the units and uses in cycles if you provide an icon.

And maybe even seeing circles via implementation (that the compiler will be ok with)

+1
As option or as an extra icon?

Mattias

Reply by email

Martin
to Mattias Gaertner
Mattias Gaertner wrote 23 lines
On Sun, 15 Sep 2013 13:54:51 +0100 Martin wrote: > On 15/09/2013 13:42, Mattias Gaertner wrote: >> On Tue, 10 Sep 2013 22:05:02 +0100 >> Martin wrote: >> >>> On 10/09/2013 21:17, Mattias Gaertner wrote: >>>> Hi all, >>>> >>>> When you now right click on unit in a uses section to get the popup >>>> menu, click on "Find / Find references of used unit" to find all >>>> references in the current unit to the used unit. >>>> >>> Ok, didnt find it right away, since you need the compiler error to >>> trigger it. >> Maybe you confuse two things here? > Not so much confused, as had my expectation to high. > > That is finding circles, before compiling, therefore seeing all circles, > instead of resolving them one by one. I can add an overlay icon to all the units and uses in cycles if you provide an icon.

I know, you said so.

Ill scan the fam fam again...

I tried making one, but I am no gfx artist....

Show quoted text 7 lines
> And maybe even seeing circles via implementation (that the compiler will > be ok with) +1 As option or as an extra icon?

Either way..

Reply by email

Martin
to Mattias Gaertner: On Sun, 15 Sep 2013 13:54:51 +0100 I can add an overlay icon to all the units and uses in…
Mattias Gaertner wrote 15 lines
On Sun, 15 Sep 2013 13:54:51 +0100 Martin wrote: > Not so much confused, as had my expectation to high. > > That is finding circles, before compiling, therefore seeing all circles, > instead of resolving them one by one. I can add an overlay icon to all the units and uses in cycles if you provide an icon. > And maybe even seeing circles via implementation (that the compiler will > be ok with) +1 As option or as an extra icon?

Or as an alternative,

have an extra section in the tree, in which they are listed (as copies, to the normal entries),
Then if enabled, the right side, can also have such an extra node. This means that all circle members are on top, and easy to find

Of coulse, if they are listed as copies in there, then they cas still have the overlay...

Reply by email

Martin
to Mattias Gaertner: On Sun, 15 Sep 2013 13:54:51 +0100 I can add an overlay icon to all the units and uses in…
Mattias Gaertner wrote
I can add an overlay icon to all the units and uses in cycles if you provide an icon.

from famfam, recolored, and resized
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arrow_rotate_clockwise_red1small.png
Type: image/png
Size: 411 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130915/eff4fcd6/attachment.png> -------------- next part --------------
A non-text attachment was scrubbed...
Name: arrow_rotate_clockwise_red2.png
Type: image/png
Size: 474 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130915/eff4fcd6/attachment-0001.png> -------------- next part --------------
A non-text attachment was scrubbed...
Name: arrow_rotate_clockwise_red2small.png
Type: image/png
Size: 345 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130915/eff4fcd6/attachment-0002.png> -------------- next part --------------
A non-text attachment was scrubbed...
Name: arrow_rotate_clockwise.png
Type: image/png
Size: 602 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130915/eff4fcd6/attachment-0003.png> -------------- next part --------------
A non-text attachment was scrubbed...
Name: arrow_rotate_clockwise_red1.png
Type: image/png
Size: 522 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130915/eff4fcd6/attachment-0004.png>

Reply by email

Martin
to Martin
Martin wrote 5 lines
On 15/09/2013 15:17, Mattias Gaertner wrote: > I can add an overlay icon to all the units and uses in cycles if you > provide an icon. from famfam, recolored, and resized

redone with gimp, to keep the antialiasing correct

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130915/af35ff87/attachment.html> -------------- next part --------------
A non-text attachment was scrubbed...
Name: cbaecfja.png
Type: image/png
Size: 583 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130915/af35ff87/attachment.png> -------------- next part --------------
A non-text attachment was scrubbed...
Name: jiebgcdh.png
Type: image/png
Size: 542 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130915/af35ff87/attachment-0001.png> -------------- next part --------------
A non-text attachment was scrubbed...
Name: ejgfaaeg.png
Type: image/png
Size: 544 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130915/af35ff87/attachment-0002.png>

Reply by email

Martin
to Martin
Martin wrote 7 lines
On 15/09/2013 16:12, Martin wrote: > On 15/09/2013 15:17, Mattias Gaertner wrote: >> I can add an overlay icon to all the units and uses in cycles if you >> provide an icon. > > from famfam, recolored, and resized redone with gimp, to keep the antialiasing correct

yellow for implementation ?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130915/8174b568/attachment-0001.html> -------------- next part --------------
A non-text attachment was scrubbed...
Name: jdadfbad.png
Type: image/png
Size: 530 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130915/8174b568/attachment-0002.png> -------------- next part --------------
A non-text attachment was scrubbed...
Name: arrow_rotate_clockwise_new_yellow_small2.png Type: image/png
Size: 530 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130915/8174b568/attachment-0003.png>

Reply by email

Mattias Gaertner
to Martin
Show quoted text 9 lines
On 15/09/2013 16:24, Martin wrote: > On 15/09/2013 16:12, Martin wrote: >> On 15/09/2013 15:17, Mattias Gaertner wrote: >>> I can add an overlay icon to all the units and uses in cycles if you >>> provide an icon. >> >> from famfam, recolored, and resized > redone with gimp, to keep the antialiasing correct yellow for implementation ?

Thanks. Implemented.

Mattias

Reply by email

Martin
to Martin
Martin wrote 6 lines
On 19/09/2013 19:25, Mattias Gaertner wrote: > Implemented. > Great. Thanks.

Yet something not yet working,

they show on some rtl units (win/sysutils) Which (for whatever reason) is in view, whew I open the window.
But I do not see them on other units
( I have the IDE as open project)

I switched off "Show nodes for directory "

missing:
SourceEditor > Impl: EditorFileManager > Intf: SourceEditor

Reply by email

Mattias Gaertner
to Martin
Show quoted text 14 lines
On 19/09/2013 19:56, Martin wrote: > On 19/09/2013 19:25, Mattias Gaertner wrote: >> Implemented. >> > > Great. Thanks. > Yet something not yet working, they show on some rtl units (win/sysutils) Which (for whatever reason) is in view, whew I open the window. But I do not see them on other units ( I have the IDE as open project)

Some flags were not cleared. Fixed.

I switched off "Show nodes for directory " missing: SourceEditor > Impl: EditorFileManager > Intf: SourceEditor

?
SourceEditor does not use EditorFileManager.

Mattias

Reply by email