mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-13 01:54:52 +08:00
Many of the license headers were incorrect or corrupted. To prepare for a check that verifies correct license headers are added to source code, we should fix up the existing license headers to use the correct format. The license headers that include non-Google/non-Chromium authors are left as-is. Change-Id: Iab9bdc41d815ac7ab07ccacf44818f3b56a75230 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2016745 Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
53 lines
1.3 KiB
JavaScript
53 lines
1.3 KiB
JavaScript
// Copyright 2012 The Chromium Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
import {FilteredUISourceCodeListProvider} from './FilteredUISourceCodeListProvider.js';
|
|
import {SourcesView} from './SourcesView.js';
|
|
|
|
export class OpenFileQuickOpen extends FilteredUISourceCodeListProvider {
|
|
/**
|
|
* @override
|
|
*/
|
|
attach() {
|
|
this.setDefaultScores(SourcesView.defaultUISourceCodeScores());
|
|
super.attach();
|
|
}
|
|
|
|
/**
|
|
* @override
|
|
* @param {?Workspace.UISourceCode} uiSourceCode
|
|
* @param {number=} lineNumber
|
|
* @param {number=} columnNumber
|
|
*/
|
|
uiSourceCodeSelected(uiSourceCode, lineNumber, columnNumber) {
|
|
Host.userMetrics.actionTaken(Host.UserMetrics.Action.SelectFileFromFilePicker);
|
|
|
|
if (!uiSourceCode) {
|
|
return;
|
|
}
|
|
if (typeof lineNumber === 'number') {
|
|
Common.Revealer.reveal(uiSourceCode.uiLocation(lineNumber, columnNumber));
|
|
} else {
|
|
Common.Revealer.reveal(uiSourceCode);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* @override
|
|
* @param {!Workspace.Project} project
|
|
* @return {boolean}
|
|
*/
|
|
filterProject(project) {
|
|
return !project.isServiceProject();
|
|
}
|
|
|
|
/**
|
|
* @override
|
|
* @return {boolean}
|
|
*/
|
|
renderAsTwoRows() {
|
|
return true;
|
|
}
|
|
}
|