Skip to content

Commit

Permalink
Remove unused action
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackson Kearl committed Feb 14, 2020
1 parent e2bc025 commit 4c9161a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { FileEditorInput } from 'vs/workbench/contrib/files/common/editors/fileE
import * as SearchConstants from 'vs/workbench/contrib/search/common/constants';
import * as SearchEditorConstants from 'vs/workbench/contrib/searchEditor/browser/constants';
import { SearchEditor } from 'vs/workbench/contrib/searchEditor/browser/searchEditor';
import { OpenResultsInEditorAction, OpenSearchEditorAction, ReRunSearchEditorSearchAction, toggleSearchEditorCaseSensitiveCommand, toggleSearchEditorContextLinesCommand, toggleSearchEditorRegexCommand, toggleSearchEditorWholeWordCommand } from 'vs/workbench/contrib/searchEditor/browser/searchEditorActions';
import { OpenResultsInEditorAction, OpenSearchEditorAction, toggleSearchEditorCaseSensitiveCommand, toggleSearchEditorContextLinesCommand, toggleSearchEditorRegexCommand, toggleSearchEditorWholeWordCommand } from 'vs/workbench/contrib/searchEditor/browser/searchEditorActions';
import { getOrMakeSearchEditorInput, SearchEditorInput } from 'vs/workbench/contrib/searchEditor/browser/searchEditorInput';
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
import { ISearchConfigurationProperties } from 'vs/workbench/services/search/common/search';
Expand Down Expand Up @@ -164,10 +164,6 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
const registry = Registry.as<IWorkbenchActionRegistry>(ActionExtensions.WorkbenchActions);
const category = localize('search', "Search Editor");

registry.registerWorkbenchAction(
SyncActionDescriptor.create(ReRunSearchEditorSearchAction, ReRunSearchEditorSearchAction.ID, ReRunSearchEditorSearchAction.LABEL),
'Search Editor: Rerun search', category, ContextKeyExpr.and(SearchEditorConstants.InSearchEditor));

registry.registerWorkbenchAction(
SyncActionDescriptor.create(OpenResultsInEditorAction, OpenResultsInEditorAction.ID, OpenResultsInEditorAction.LABEL,
{ mac: { primary: KeyMod.CtrlCmd | KeyCode.Enter } },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,25 +112,6 @@ export class OpenResultsInEditorAction extends Action {
}
}


export class ReRunSearchEditorSearchAction extends Action {

static readonly ID = 'searchEditor.rerunSerach';
static readonly LABEL = localize('search.rerunSearch', "Rerun Search in Editor");

constructor(id: string, label: string,
@IEditorService private readonly editorService: IEditorService) {
super(id, label);
}

async run() {
const input = this.editorService.activeEditor;
if (input instanceof SearchEditorInput) {
await (this.editorService.activeControl as SearchEditor).runSearch(false, true);
}
}
}

const openNewSearchEditor =
async (accessor: ServicesAccessor) => {
const editorService = accessor.get(IEditorService);
Expand Down

0 comments on commit 4c9161a

Please sign in to comment.