-
Notifications
You must be signed in to change notification settings - Fork 781
Fix for issue 294 (definitions search displays comment lines) #681
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
Conversation
… of functions/variables/macros/etc are found
Displaying just the defs when doing defs search makes sense to me. I like the way how you presented the explanation, very concise. BTW you can upload the pictures to this site as well (drag-n-drop). |
Ah, will remember that for next time. And thanks for the kind words :) |
@@ -202,8 +202,9 @@ public static void prettyPrint(Writer out, SearchHelper sh, int start, | |||
FileReader r = genre == Genre.PLAIN | |||
? new FileReader(new File(sh.sourceRoot, rpath)) | |||
: null; | |||
boolean isDefSearch = (sh.builder.getDefs() != null) ? true : false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is basically the only problem I have with this patch
suppose I want to search for "foo and defs:bar"
with above in place it will just show me bar ...
so I'd relax this to IF ONLY def field is filled in ...
still it won't be a proper solution, but until we have lucene highlighter in place ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good point; we very rarely use more elaborate searches like this, so for our own personal case this issue has never come up.
Will restrict it to ONLY defs field.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After much delay due to work busy-ness, fixed in latest commit.
Fair warning: The logic to check for only the def field being populated currently lives in QueryBuilder.java since it made more sense to me. Can easily be moved/reformatted/etc if anyone has concerns with that.
…is populated, as per tarzanek's concerns
OK, looks fine to me |
I had to re-submit my OCA a few days ago, so it's still being processed. In the interest of getting this pushed in more quickly: I hereby agree with the Oracle Contributor Agreement (OCA) on an individual basis for this patch. Just so we're all legally squared away 👍 |
Fix for issue 294 (definitions search displays comment lines)
Thank you sir! ;) |
;) and now I see you didn't compile tests ... |
Whoops, I knew I was forgetting something...my mistake. Sorry! |
well you were not the only one, looking at the code I wrote ... I could have saved one if ... will rewrite ;) |
Issue 294: #294
Example screenshots of this change in action: http://imgur.com/a/nuwxE#0
I signed and returned a personal Oracle Contributor Agreement, but have not yet heard a response back. Unsure of what the turnaround time on those requests is normally like. Here is the pull request in preparation.