blob: 635a41d98583582acb731e1ea0ae5bb56d8983df (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
import { getSelectedSource } from "./sources";
export function getSelectedPrimaryPaneTab(state) {
return state.ui.selectedPrimaryPaneTab;
}
export function getActiveSearch(state) {
return state.ui.activeSearch;
}
export function getFrameworkGroupingState(state) {
return state.ui.frameworkGroupingOn;
}
export function getPaneCollapse(state, position) {
if (position == "start") {
return state.ui.startPanelCollapsed;
}
return state.ui.endPanelCollapsed;
}
export function getHighlightedLineRangeForSelectedSource(state) {
const selectedSource = getSelectedSource(state);
if (!selectedSource) {
return null;
}
// Only return the highlighted line range if it matches the selected source
const highlightedLineRange = state.ui.highlightedLineRange;
if (
highlightedLineRange &&
selectedSource.id == highlightedLineRange.sourceId
) {
return highlightedLineRange;
}
return null;
}
export function getConditionalPanelLocation(state) {
return state.ui.conditionalPanelLocation;
}
export function getLogPointStatus(state) {
return state.ui.isLogPoint;
}
export function getOrientation(state) {
return state.ui.orientation;
}
export function getViewport(state) {
return state.ui.viewport;
}
export function getCursorPosition(state) {
return state.ui.cursorPosition;
}
export function getInlinePreview(state) {
return state.ui.inlinePreviewEnabled;
}
export function getEditorWrapping(state) {
return state.ui.editorWrappingEnabled;
}
export function getJavascriptTracingLogMethod(state) {
return state.ui.javascriptTracingLogMethod;
}
export function getSearchOptions(state, searchKey) {
return state.ui.mutableSearchOptions[searchKey];
}
export function getHideIgnoredSources(state) {
return state.ui.hideIgnoredSources;
}
export function isSourceMapIgnoreListEnabled(state) {
return state.ui.sourceMapIgnoreListEnabled;
}
|