Hey :), On vie, 2012-03-30 at 09:07 -0700, Ehsan Akhgari wrote: > On Fri, Mar 30, 2012 at 8:46 AM, Carlos Garnacho <[email protected]> wrote: > > > On miƩ, 2012-03-28 at 12:23 -0700, Ehsan Akhgari wrote: > > > > > Hmm, for example clicking on eTypedBR here < > > > > > http://dxr.lanedo.com/mozilla-central/editor/libeditor/text/nsPlaintextEditor.h.html#l77 > > > > > > doesn't work... > > > > Right... that's something that deserves linking, I was mostly hesitant > > about enabling this for parts of the language syntax (eg. searching for > > "while" won't give you anything really meaningful), comments and such. > > > > I agree that searching on language keywords is not useful, but comments and > strings could contain potentially useful things to search for: > > // The logic here should match that of AwesomeClass::DoWonders > NS_ASSERTION(condition, "Make sure AwesomeClass::mMember is initialized");
That's a good point, I guess the HTMLifier could notice strings and comments and set some ID so clicking on non-boilerplate only applies to those. > > > > > > > > > > > > 5) Searching for a file name should first returns the file if a perfect > > > > match exists > > > > + Upon investigation, it appears that implementing this would way a lot > > > > easier if the html was dynamic. We suggest investigating the switch to > > > > mod_python or to Django before implementing this feature (Django is > > > > proposed here : https://wiki.mozilla.org/DXR_Future_Work_Plan > > > > > > > > > > Can you please explain why? > > > > The html pages for source code are generated at index time and served > > statically, yet we need something dynamic for the "did you mean...?" > > box. I guess we can do this in a div loading another page, although it > > would be more feasible if that content were generated dynamically, the > > figures from the performance work keeps me optimistic about that :) > > > > I think the best way to solve this is to stick something in the URL like: > > http://dxr.mozilla.org/path/to/file.cpp.html?searchterm=nsFooBar > > And having a static script which tries to find "searchterm" in the query > string, and if it does, showing the "did you mean?" text. This has the > advantage of being more efficient to serve (no dynamic pages) and would not > affect the indexing speed (since the script can go in an external file > which will be linked to from the template. > > How does this sound? Nice suggestion, certainly requires less changes. I've went ahead and implemented this for types/functions/filenames, it's now live in dxr.lanedo.com :) Carlos _______________________________________________ dev-static-analysis mailing list [email protected] https://lists.mozilla.org/listinfo/dev-static-analysis
