Board logo

Subject: [feature idea] jump to next compile error [Print This Page]

Author: klemm    Time: 2007-1-19 15:09     Subject: [feature idea] jump to next compile error

Hello!

When compiling a project we some-times get errors. These errors are put in compile messages tool-window. After compiling, the ide code editor jumps to first error.
Once the first error is resolved, i have to double-click on the next error in messages or press ctrl+f9 to compile again and jump to next error. Trouble is, that i don't want to pick up the mouse and compiling just to jump to next error is: 1. kind of stupid and 2. some-times takes too long.

Would it be possible to have a keyboard shortcut to navigate the errors in compile-messages window?

Thanks!
Author: Passion    Time: 2007-1-20 00:18

Thanks for your good suggesion. It should be an useful requirment. We'll do some research for its implementation possibility.
Author: Passion    Time: 2007-1-23 22:20

Hi, In Delphi 5/6/7 and C++Builder 5/6, it's possible to jump to the next compile error, for the messge view control is TTreeview, we can get it's selected index.

But in BDS, the message view control is virtual tree. And its selected index is hidden to us. It's hard to obtain it.

What's your comments about it?
Author: Passion    Time: 2007-1-24 23:21

Now we think though the Virtual Tree can not raise its selectindex, we can also post VK_DOWN message to it to let it move to next item.

In our latest nightly-build version 284, this function has been added into Editor Wizard's submenu. Please check it.

http://www.cnpack.org/downbuilds.php
Author: klemm    Time: 2007-1-24 23:52     Subject: Reply #3 Passion's post

Thanks for looking into this.

I'm still using Delphi 7. Not going to move to BDS for some time.

But what is the problem with virtual tree?
I seem to remember that they used Mike Lischkes virtual string tree (http://www.lischke-online.de/VirtualTreeview/) in many places (project manager, structure pane, message view, refactoring window).

I'm somewhat familiar with the component. TBaseVirtualTree.GetSortedSelection will return all selected nodes.
It returns a TNodeArray.
TNodeArray = array of PVirtualNode;
PVirtualNode = ^TVirtualNode;
TVirtualNode = packed record
    Index,                   // index of node with regard to its parent
    ChildCount: Cardinal;    // number of child nodes
    NodeHeight: Word;        // height in pixels
    States: TVirtualNodeStates; // states describing various properties of the node (expanded, initialized etc.)
    Align: Byte;             // line/button alignment
    CheckState: TCheckState; // indicates the current check state (e.g. checked, pressed etc.)
    CheckType: TCheckType;   // indicates which check type shall be used for this node
    Dummy: Byte;             // dummy value to fill DWORD boundary
    TotalCount,              // sum of this node, all of its child nodes and their child nodes etc.
    TotalHeight: Cardinal;   // height in pixels this node covers on screen including the height of all of its
                             // children
    // Note: Some copy routines require that all pointers (as well as the data area) in a node are
    //       located at the end of the node! Hence if you want to add new member fields (except pointers to internal
    //       data) then put them before field Parent.
    Parent,                  // reference to the node's parent (for the root this contains the treeview)
    PrevSibling,             // link to the node's previous sibling or nil if it is the first node
    NextSibling,             // link to the node's next sibling or nil if it is the last node
    FirstChild,              // link to the node's first child...
    LastChild: PVirtualNode; // link to the node's last child...
    Data: record end;        // this is a placeholder, each node gets extra data determined by NodeDataSize
  end;


Hope that helps!
Author: klemm    Time: 2007-1-24 23:55

Oh.. i guess i should click refresh before posting next time.

Will check the build right now!
Author: klemm    Time: 2007-1-25 00:40

I assigned Ctrl+Alt+Down as shortcut in delphi 7. It worked. Very nice!

I tried with BDS also - ctrl+alt+down/up are assigned by ide to jump to next/previous function. So i assigned ctrl+< for testing. It does not work. When i press the shortcut i will be moved to currently selected message postition in editor. When i double-click on next message then the shortcut location changes. It seems VK_DOWN is not handled as it should be.

Please make "previous message line tool" too
Author: Passion    Time: 2007-1-25 10:29

OK. Thanks your hint.
We'll try to fix the problem in BDS. BTW, what's your BDS Version? 2005 or 2006?

For "previous message line tool", maybe we can provide a PascalScript to do this. It should work the same way.
Author: klemm    Time: 2007-1-25 12:34

BDS is 2006.
Author: Passion    Time: 2007-1-25 22:32

Hi, during our investigation, In BDS, Virtual tree will capture Ctrl and do some othe work. So if we define the shortcut contains Ctrl, it will be uses in VirtualTree, not in shortcut,

If you define the shortcut as an Alt+xxxx, it should works.
Author: klemm    Time: 2007-1-26 01:18

Confirmed.
It's working with Alt+key in BDS2006.
Author: Passion    Time: 2007-1-26 09:21

In 285 we've add a "previous " tool in the same way. Please check it.
Author: Passion    Time: 2007-1-26 19:53

In 286, we use a hook way and resolve this problem, now Ctrl can be used. Please test it once it comes out for download.
Author: klemm    Time: 2007-1-27 04:37

Hello!

286 installer is incomplete.
File size is 1,2mb while others are around 11,7mb.
Author: Passion    Time: 2007-1-27 11:18

Oh. yes. My network crashed last night.

Now I re-upload it.
Author: klemm    Time: 2007-1-27 11:59

Hey, where did 286 go now? It disappeared mid-download (a very slow download.. about 2kB/s).
Author: Passion    Time: 2007-1-27 12:30

Now it should be OK.
I just re-upload it again.

Our poor network......
Author: klemm    Time: 2007-1-27 13:41

I'm sorry to report that the shortcuts you assigned don't work. When i press Ctrl+del, it will just delete a character in source. Ctrl+Sysrq does nothing.
However Ctrl + , and Ctrl + . work nicely in BDS2006.

I'm already accustomed to this tool and have saved at least 10 minutes thanks to it
But seriously speaking - i feel the workflow is greatly improved.
Thanks!

[ Last edited by  klemm at 2007-1-27 07:50 ]
Author: Passion    Time: 2007-1-27 23:17

The shortcut problem maybe comes from the keyboard layout. Actually I use Ctrl +,. to do the previous/next message line in my workstation, not Ctrl+del/sysrq, which is shown on others.

I'll do some shortcut conversion on next new build.
Author: Passion    Time: 2007-1-28 00:10

Hi, klemm, Would you like to download 287 to test it again? I modified the shortcut convert routine to use Ctrl+, and Ctrl + .
Author: klemm    Time: 2007-1-30 08:15

I don't understand what you changed.
287 is still working fine with ctrl+alt+down/up in D7 and with ctrl+,/. in BDS2006.
I can not test ctrl+del or ctrl+sysrq because i'm unable to assign these keys with shortcut selector.
Author: Passion    Time: 2007-1-30 08:54

I mean now in 287 we use Ctrl,/. as the DEFAULT shortcuts of prev/next message line tool.

But if other shortcuts were  assigned in previous CnWizards and were kept, the DEFAULT shortcuts are overrided and maybe can not be tested, except restoring default settings of CnWizards.

The shortcuts ctrl+del or ctrl+sysrq are not our purpose, if these 2 appears in default settings, it should be a bug, which is in 286.
Author: klemm    Time: 2007-1-30 10:45

Ok. Thanks for explaining.

I'll now go and create a new thread -- i have another new feature idea




Welcome to CnPack Forum (http://bbs.cnpack.org/) Powered by Discuz! 5.0.0