Re: (PHP) Resolving Lost Scanned Includes

Eric Ludlam <[email protected]> Mon, 10 Aug 2015 22:10:14 -0400
Newsgroups gmane.emacs.semantic
Message-ID <[email protected]>
On 08/10/2015 04:22 PM, Andrea Turso wrote:
> Dear Eric,
>
> I figured that clicking on the include tag in the buffer doesn't work,
> perhaps I was remembering this wrong, or did I break something?
>
> The tags in the ECB Methods Buffer do work and the correct file is
> opened when I click them.
>
> Sorry if I had you looking for no reason, using just the original
> snippet shown below.
>
> (define-mode-local-override semantic-tag-include-filename php-mode (tag)
>    "Maps a PHP qualified class name to a file."
>    (ede-php-autoload-find-class-def-file (ede-current-project)
> (semantic-tag-name tag)))

Glad you got it working.  If you enabled the tag decoration mode (which 
turns includes yellow if they haven't been parsed yet) then you can get 
a context menu on the includes which you can use to jump to the correct 
file.

It also have options for listing various details about finding headers 
you might find useful for debugging.

> One last question if I may, I noticed that certain PHP buffers are fully
> parsed despite my grammar only containing rules for 'use' and 'new' and
> 'class' with no body. Could this be some undesired interaction with
> java-tags?

It always parses the whole buffer, but large chunks of your buffer were 
probably marked as bad syntax.  You can use

M-x semantic-show-unmatched-syntax-mode RET

in one buffer to highlight unmatched syntax red.  Handy when you are 
working on a grammar.   It doesn't clean itself up very well though. 
You'll need to force a full refresh to be sure it is highlighting things 
correctly.

Eric

------------------------------------------------------------------------------