| Summary: | Global search: clicking on a hit file should open editor with find slide out. | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | libing wang <libingw> |
| Component: | Client | Assignee: | libing wang <libingw> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | Mike_Wilson, Silenio_Quarti, susan |
| Version: | 0.4 | ||
| Target Milestone: | 0.5 RC1 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 381631 | ||
|
Description
libing wang
I like the way in the "get plugin" page. When you click on "install", it brings you to the setting page with params like below: /settings/settings.html#,category=plugins,installPlugin=http://mamacdon.github.com/orion-codemirror/codeMirrorPlugin.html So when I open editor if I can use URL like : /edit/edit.html#/file/g/local/edit/setup.js,line=45,find=FOO where the second param will trigger the find command in editor and pops the slides out. I think if we can do this, our global search and local find will integrate seamlessly. Susan, any suggestions? (In reply to comment #1) > I like the way in the "get plugin" page. When you click on "install", it brings > you to the setting page with params like below: > > /settings/settings.html#,category=plugins,installPlugin=http://mamacdon.github.com/orion-codemirror/codeMirrorPlugin.html > > So when I open editor if I can use URL like : > /edit/edit.html#/file/g/local/edit/setup.js,line=45,find=FOO > where the second param will trigger the find command in editor and pops the > slides out. > > I think if we can do this, our global search and local find will integrate > seamlessly. > Susan, any suggestions? I was thinking the same think in bug 334196 I think we should be able to use the command url binding for this as you suggest. For me, the ideal behavior is that the find/replace is opened and the file is positioned and token highlighted at the first match. It may "just work" by making a URL binding for find in the editor and then invoking that URL, I'm not sure though. fixed with http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=af20fe23c362d5265ad3667efce986a7c94c40e8. Now if you click on a file the command URL binding pops up the find&replace slide-out. It finds and highlight the first hit from line 1. If you click on a match it finds and highlight the first hit from the matching line. Currently the command URL binding does not support multiple parameters. Nor does it support the order of multiple commands. So for now I am using "find=foo@@line123" format in order to open the slide out and find foo from line 123. Talked to Susan and I will open a new bug for supporting multiple parameters and the order of multiple command URL binding. Will refactor my code once it is fixed. After fixed bug 381631, I changed the URL binding in the editor into some thing like: ,find=SEARCH_STRING@@replaceWith@@REPLACE_STRING@@atLine@@123 @@replaceWith@@ and @@atLine@@ are seperaters and optional. Say, if you search on foo and replace it with bar from line 123 then the URL will be : /edit/edit.html#/yourFIle.js,find=foo@@replaceWith@@bar@@atLine@@123 |