當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript ReplaceAction.getElementToFocusAfterRemoved方法代碼示例

本文整理匯總了TypeScript中vs/workbench/parts/search/browser/searchActions.ReplaceAction.getElementToFocusAfterRemoved方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript ReplaceAction.getElementToFocusAfterRemoved方法的具體用法?TypeScript ReplaceAction.getElementToFocusAfterRemoved怎麽用?TypeScript ReplaceAction.getElementToFocusAfterRemoved使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在vs/workbench/parts/search/browser/searchActions.ReplaceAction的用法示例。


在下文中一共展示了ReplaceAction.getElementToFocusAfterRemoved方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: test

	test('get next element to focus after removing a match when it is the only match', function () {
		const fileMatch1 = aFileMatch();
		const data = [fileMatch1, aMatch(fileMatch1)];
		const tree = aTree(data);
		const target = data[1];
		const testObject: ReplaceAction = instantiationService.createInstance(ReplaceAction, tree, target, null);

		const actual = testObject.getElementToFocusAfterRemoved(tree, target);
		assert.equal(undefined, actual);
	});
開發者ID:VishalMadhvani,項目名稱:vscode,代碼行數:10,代碼來源:searchActions.test.ts

示例2: test

	test('get next element to focus after removing a match when it has next sibling file', function () {
		let fileMatch1 = aFileMatch();
		let fileMatch2 = aFileMatch();
		let data = [fileMatch1, aMatch(fileMatch1), aMatch(fileMatch1), fileMatch2, aMatch(fileMatch2), aMatch(fileMatch2)];
		let tree = aTree(data);
		let target = data[2];
		let testObject: ReplaceAction = instantiationService.createInstance(ReplaceAction, tree, target, null);

		let actual = testObject.getElementToFocusAfterRemoved(tree, target);

		assert.equal(data[4], actual);
	});
開發者ID:burhandodhy,項目名稱:azuredatastudio,代碼行數:12,代碼來源:searchActions.test.ts


注:本文中的vs/workbench/parts/search/browser/searchActions.ReplaceAction.getElementToFocusAfterRemoved方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。