Skip to content

definition search displays comment lines (Bugzilla #2573) #294

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
vladak opened this issue May 22, 2013 · 5 comments
Closed

definition search displays comment lines (Bugzilla #2573) #294

vladak opened this issue May 22, 2013 · 5 comments

Comments

@vladak
Copy link
Member

vladak commented May 22, 2013

status CLOSED severity enhancement in component webapp for ---
Reported in version unspecified on platform ANY/Generic
Assigned to: Trond Norbye

On 2008-07-17 07:43:03 +0000, Vijay wrote:

Definition search in opengrok displays the matching comment lines of the source file also. It should only display definition.
e.g. In case of c/c++ files, it shows the matching lines which are in between /* ....*/.

On 2008-08-01 11:52:51 +0000, Trond Norbye wrote:

This is not a bug, but a feature. OpenGrok will just search for files containing the definition, but it will list all occurrences of the symbol in the files that contain the definition. If you look in the search result it will print "function" behind the mach for the actual definition in the file.

If you dislike this behavior, please reopen the issue and create a patch that removes the other results :-)

@acdevlin
Copy link
Contributor

Personal fix for this on my own branch. Definitions search will ONLY return actual definition statements instead of comments, etc.

acdevlin/OpenGrok@b16a600

Screenshots: http://imgur.com/a/nuwxE#0

Not sure if you want this to be merged in or not, since it fundamentally changes how one search type works...

@tarzanek tarzanek reopened this Oct 24, 2013
@kahatlen
Copy link
Contributor

This sounds useful to me. Perhaps even more useful if we added a "show all" link that could show you all the occurrences in the file if you wanted to (could probably be achieved by linking to the existing more.jsp page).

@acdevlin, would you be willing to sign the OCA - http://www.oracle.com/technetwork/goto/oca - so that your code can be incorporated?

Thanks.

@acdevlin
Copy link
Contributor

@kahatlen signed and emailed a copy to [email protected], will hopefully get approval from them soon!

Also, I like the idea of a "show all" link.

@Hlipa
Copy link

Hlipa commented Nov 6, 2013

I see also function calls. Does fix fix it as well? thx

@tarzanek
Copy link
Contributor

@Hlipa most probably not, they will still be there, it just removes the matches without any tags it seems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants