Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(515)

Unified Diff: editor/tools/plugins/com.google.dart.tools.search/src/com/google/dart/tools/search/internal/ui/text/FileSearchPage.java

Issue 10597004: Find/replace support across multiple files. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: editor/tools/plugins/com.google.dart.tools.search/src/com/google/dart/tools/search/internal/ui/text/FileSearchPage.java
===================================================================
--- editor/tools/plugins/com.google.dart.tools.search/src/com/google/dart/tools/search/internal/ui/text/FileSearchPage.java (revision 8941)
+++ editor/tools/plugins/com.google.dart.tools.search/src/com/google/dart/tools/search/internal/ui/text/FileSearchPage.java (working copy)
@@ -300,20 +300,26 @@
addSortActions(mgr);
fActionGroup.setContext(new ActionContext(getSite().getSelectionProvider().getSelection()));
fActionGroup.fillContextMenu(mgr);
-//refactoring support
-// FileSearchQuery query= (FileSearchQuery) getInput().getQuery();
-// if (query.getSearchString().length() > 0) {
-// IStructuredSelection selection= (IStructuredSelection) getViewer().getSelection();
-// if (!selection.isEmpty()) {
-// ReplaceAction replaceSelection= new ReplaceAction(getSite().getShell(), (FileSearchResult)getInput(), selection.toArray());
-// replaceSelection.setText(SearchMessages.ReplaceAction_label_selected);
-// mgr.appendToGroup(IContextMenuConstants.GROUP_REORGANIZE, replaceSelection);
-//
-// }
-// ReplaceAction replaceAll= new ReplaceAction(getSite().getShell(), (FileSearchResult)getInput(), null);
-// replaceAll.setText(SearchMessages.ReplaceAction_label_all);
-// mgr.appendToGroup(IContextMenuConstants.GROUP_REORGANIZE, replaceAll);
-// }
+
+ FileSearchQuery query = (FileSearchQuery) getInput().getQuery();
+ if (query.getSearchString().length() > 0) {
+ IStructuredSelection selection = (IStructuredSelection) getViewer().getSelection();
+ if (!selection.isEmpty()) {
+ ReplaceAction replaceSelection = new ReplaceAction(
+ getSite().getShell(),
+ (FileSearchResult) getInput(),
+ selection.toArray());
+ replaceSelection.setText(SearchMessages.ReplaceAction_label_selected);
+ mgr.appendToGroup(IContextMenuConstants.GROUP_REORGANIZE, replaceSelection);
+
+ }
+ ReplaceAction replaceAll = new ReplaceAction(
+ getSite().getShell(),
+ (FileSearchResult) getInput(),
+ null);
+ replaceAll.setText(SearchMessages.ReplaceAction_label_all);
+ mgr.appendToGroup(IContextMenuConstants.GROUP_REORGANIZE, replaceAll);
+ }
}
@Override

Powered by Google App Engine
This is Rietveld 408576698