Add Code Template Library to search results#2
Open
jbeckers wants to merge 1 commit into
Open
Conversation
Author
|
Fixes #1 |
Contributor
|
(This is partially AI written w/my guidance after doing a larger refactor and backing away from that). Thanks for catching this, and good call noticing the library name is already in the One thought on the tree shape. As written, the tree ends up as: A couple of things about that:
Would you be open to splitting the String location = match.getLocation();
int sep = location.indexOf(" > ");
String libraryLabel = sep > 0 ? location.substring(0, sep) : "(No Library)";
String templateLabel = sep > 0 ? location.substring(sep + 3) : location;
DefaultMutableTreeNode libNode = findOrCreateChild(codeTemplatesNode, libraryLabel);
DefaultMutableTreeNode tmplNode = findOrCreateChild(libNode, templateLabel);
tmplNode.add(new DefaultMutableTreeNode(lineLabel));That gives: Happy to push the change to your branch if easier, or you can update the PR. Either works. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Looking at
oie-source-code-search/server/src/main/java/com/diridium/sourcecodesearch/SearchEngine.java
Line 258 in 69c518a
This PR adds the location tot the search result tree for Code Templates (just like it's done for Channels)