Re: Bugs introduced that affected jde-import-all (patch for last import has comment bug)

"Jeff Peck" <[email protected]>
Newsgroups gmane.emacs.jdee.devel
Message-ID <F09F8413C930487FAD97617A7500E4B2@blue>
Eric, thanks for the info.

Given that it fails in/after the jde-import-all; which is basically: (insert 
(concat "import " new-import ";\n"))
And that it seems to work on the old grammar and fails with the new grammar
(but works invoked in a separate command)

I'm guessing that the condition-case has disabled the after-hooks... ?
Or it is simply that the tags are not being marked?

semantic-highlight-edits-mode does *not* indicate any changes when 
jde-import-all does the insert.
[but again: semantic does not appear to have any tag/region/overlays in that 
area...
 can the apparent loss of the import-tag be a result of some after-hook not 
running?]

And that is the question:
  Why does it not see the tag/region when jde-import does its thing,
  But it apparently *does* see a region and reparse when invoked as a 
separate command.


----- Original Message ----- 
From: "Eric M. Ludlam" <[email protected]>
To: "Jeff Peck" <[email protected]>
Cc: "JDEE Development" <[email protected]>
Sent: Friday, January 08, 2010 3:06 PM
Subject: Re: [jdee-devel] Bugs introduced that affected jde-import-all 
(patch for last import has comment bug)


> Hi
>
> Jeff Peck wrote:
>> But! If I try to run (semantic-parse-changes) using advice around/after 
>> jde-import-all,
>> (or even directly putting it into the end of 
>> jde-import-insert-imports-into-buffer)
>> it has no beneficial effect; it apparently sees no changes and makes no 
>> updates.
>>  Maybe someone who understands how semantic reparse really works can 
>> explain...?
>
> Semantic tracks changes as a buffer is edited.  If you enable 
> semantic-highlight-edits-mode, and then edit code, you can watch how it 
> tracks what you edit, and how it periodically will re-parse everything 
> highlighted.  This is the incremental parser in action.
>
> It works by coalescing edits into groups defined by tag boundaries. Those 
> tags are then reparsed.  If you ever looked inside tags, you would see a 
> 'reparse-symbol' attribute.  It uses this to jump back into the grammar at 
> the right place for that tag.
>
> Based on your loose description, I would guess that the edits are not 
> being tracked, or the edits are not coalescing to the right tags because 
> the tag boundaries are incorrect.  Either of those might be due to a 
> non-local exit which was hidden by a condition-case or some-such.
>
> Since semantic uses after-change-functions, and that is documented as 
> getting cleared if an error is thrown, this is another possibility.
>
> Lastly, the change hooks can be inhibited by inhibit-modification-hooks, 
> which is something that SRecode uses when making big changes, and which 
> also provides a big speed improvement, since there are a lot of minor 
> modes that use change hooks.  See srecode-insert-fcn for an example on how 
> to use it safely with Semantic.
>
> If there is a test case I can examine that doesn't include a successful 
> JDEE install I can probably help, though I have never delved into that 
> specific code before.  Since the JDEE has a lot of code generators, it 
> would be good for a JDEE developer to be familiar with some of the tricks 
> too, similar to what SRecode uses.
>
> If the JDEE ever implements some unit tests, I'd like to know, as I would 
> set it up to run when I test CEDET releases.
>
> Thanks
> Eric 


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.