This bug is more than just that. None of geany's special features, such
as the goto declaration/definition that you mentioned, nor its
color-coding, will work properly if the included files are not already
open.

For example, in this line:
class NPC_Human : public NPC {

NPC_Human will be blue (by default). NPC will be black, unless the file
that declares it is open, in which case it is blue. NPC will be blue
even if the open file is from an unrelated project, and the file that
NPC_Human is in doesn't have any include files. In the same respect, if
you had stdio.h open when you clicked on Goto tag declaration on
printf(), it would take you to the appropriate place.

So, the problem, really, is that geany doesn't open files for you; you
have to open them yourself. It would be nice if geany scanned the
appropriate directories and opened the necessary files for goto
commands. It would also be nice if geany properly color-coded your
code, according to #include files.

The way I see it, there are three ways to figure out which directories
to search for header files. 1) built in and fixed, such
as /usr/include, ., and ./include. 2) parse from "compile line." 3) the
one I recommend: Have a special include line in the "Set Includes and
Arguments" window. This line can double as the include lines used
during compiling, and the directories searched when clicking "Goto
Definition." Make sure that backticks `` can be used on this line.

I hope you found this informative, and not just a senseless ramble. I,
for one, think that "Goto Definition/Declaration" would be a really
useful feature for debugging packages if I didn't have to open every
file I might need beforehand. I didn't understand why the color codes
were unreliable, until I saw this bug report, and looked into it.

-Brandon



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to