OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). | 3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). |
4 * Copyright (C) 2009 Joseph Pecoraro | 4 * Copyright (C) 2009 Joseph Pecoraro |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * | 9 * |
10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 UI.inspectorView = UI.InspectorView.instance(); | 156 UI.inspectorView = UI.InspectorView.instance(); |
157 UI.ContextMenu.initialize(); | 157 UI.ContextMenu.initialize(); |
158 UI.ContextMenu.installHandler(document); | 158 UI.ContextMenu.installHandler(document); |
159 UI.Tooltip.installHandler(document); | 159 UI.Tooltip.installHandler(document); |
160 Components.dockController = new Components.DockController(canDock); | 160 Components.dockController = new Components.DockController(canDock); |
161 SDK.multitargetConsoleModel = new SDK.MultitargetConsoleModel(); | 161 SDK.multitargetConsoleModel = new SDK.MultitargetConsoleModel(); |
162 SDK.multitargetNetworkManager = new SDK.MultitargetNetworkManager(); | 162 SDK.multitargetNetworkManager = new SDK.MultitargetNetworkManager(); |
163 SDK.targetManager.addEventListener( | 163 SDK.targetManager.addEventListener( |
164 SDK.TargetManager.Events.SuspendStateChanged, this._onSuspendStateChange
d.bind(this)); | 164 SDK.TargetManager.Events.SuspendStateChanged, this._onSuspendStateChange
d.bind(this)); |
165 | 165 |
166 Components.shortcutsScreen = new Components.ShortcutsScreen(); | 166 UI.shortcutsScreen = new UI.ShortcutsScreen(); |
167 // set order of some sections explicitly | 167 // set order of some sections explicitly |
168 Components.shortcutsScreen.section(Common.UIString('Elements Panel')); | 168 UI.shortcutsScreen.section(Common.UIString('Elements Panel')); |
169 Components.shortcutsScreen.section(Common.UIString('Styles Pane')); | 169 UI.shortcutsScreen.section(Common.UIString('Styles Pane')); |
170 Components.shortcutsScreen.section(Common.UIString('Debugger')); | 170 UI.shortcutsScreen.section(Common.UIString('Debugger')); |
171 Components.shortcutsScreen.section(Common.UIString('Console')); | 171 UI.shortcutsScreen.section(Common.UIString('Console')); |
172 | 172 |
173 Workspace.fileManager = new Workspace.FileManager(); | 173 Workspace.fileManager = new Workspace.FileManager(); |
174 Workspace.workspace = new Workspace.Workspace(); | 174 Workspace.workspace = new Workspace.Workspace(); |
175 Common.formatterWorkerPool = new Common.FormatterWorkerPool(); | 175 Common.formatterWorkerPool = new Common.FormatterWorkerPool(); |
176 Workspace.fileSystemMapping = new Workspace.FileSystemMapping(Workspace.isol
atedFileSystemManager); | 176 Workspace.fileSystemMapping = new Workspace.FileSystemMapping(Workspace.isol
atedFileSystemManager); |
177 | 177 |
178 Main.networkProjectManager = new Bindings.NetworkProjectManager(SDK.targetMa
nager, Workspace.workspace); | 178 Main.networkProjectManager = new Bindings.NetworkProjectManager(SDK.targetMa
nager, Workspace.workspace); |
179 Bindings.presentationConsoleMessageHelper = new Bindings.PresentationConsole
MessageHelper(Workspace.workspace); | 179 Bindings.presentationConsoleMessageHelper = new Bindings.PresentationConsole
MessageHelper(Workspace.workspace); |
180 Bindings.cssWorkspaceBinding = new Bindings.CSSWorkspaceBinding(SDK.targetMa
nager, Workspace.workspace); | 180 Bindings.cssWorkspaceBinding = new Bindings.CSSWorkspaceBinding(SDK.targetMa
nager, Workspace.workspace); |
181 Bindings.debuggerWorkspaceBinding = new Bindings.DebuggerWorkspaceBinding(SD
K.targetManager, Workspace.workspace); | 181 Bindings.debuggerWorkspaceBinding = new Bindings.DebuggerWorkspaceBinding(SD
K.targetManager, Workspace.workspace); |
182 Bindings.breakpointManager = | 182 Bindings.breakpointManager = |
183 new Bindings.BreakpointManager(null, Workspace.workspace, SDK.targetMana
ger, Bindings.debuggerWorkspaceBinding); | 183 new Bindings.BreakpointManager(null, Workspace.workspace, SDK.targetMana
ger, Bindings.debuggerWorkspaceBinding); |
184 Extensions.extensionServer = new Extensions.ExtensionServer(); | 184 Extensions.extensionServer = new Extensions.ExtensionServer(); |
185 | 185 |
186 new Persistence.FileSystemWorkspaceBinding(Workspace.isolatedFileSystemManag
er, Workspace.workspace); | 186 new Persistence.FileSystemWorkspaceBinding(Workspace.isolatedFileSystemManag
er, Workspace.workspace); |
187 Persistence.persistence = | 187 Persistence.persistence = |
188 new Persistence.Persistence(Workspace.workspace, Bindings.breakpointMana
ger, Workspace.fileSystemMapping); | 188 new Persistence.Persistence(Workspace.workspace, Bindings.breakpointMana
ger, Workspace.fileSystemMapping); |
189 | 189 |
190 new Main.OverlayController(); | 190 new Main.OverlayController(); |
191 new Components.ExecutionContextSelector(SDK.targetManager, UI.context); | 191 new Main.ExecutionContextSelector(SDK.targetManager, UI.context); |
192 Bindings.blackboxManager = new Bindings.BlackboxManager(Bindings.debuggerWor
kspaceBinding); | 192 Bindings.blackboxManager = new Bindings.BlackboxManager(Bindings.debuggerWor
kspaceBinding); |
193 | 193 |
194 new Main.Main.PauseListener(); | 194 new Main.Main.PauseListener(); |
195 new Main.Main.InspectedNodeRevealer(); | 195 new Main.Main.InspectedNodeRevealer(); |
196 new Main.NetworkPanelIndicator(); | 196 new Main.NetworkPanelIndicator(); |
197 new Main.SourcesPanelIndicator(); | 197 new Main.SourcesPanelIndicator(); |
198 new Main.BackendSettingsSync(); | 198 new Main.BackendSettingsSync(); |
199 Components.domBreakpointsSidebarPane = new Components.DOMBreakpointsSidebarP
ane(); | 199 Components.domBreakpointsSidebarPane = new Components.DOMBreakpointsSidebarP
ane(); |
200 | 200 |
201 UI.actionRegistry = new UI.ActionRegistry(); | 201 UI.actionRegistry = new UI.ActionRegistry(); |
202 UI.shortcutRegistry = new UI.ShortcutRegistry(UI.actionRegistry, document); | 202 UI.shortcutRegistry = new UI.ShortcutRegistry(UI.actionRegistry, document); |
203 Components.ShortcutsScreen.registerShortcuts(); | 203 UI.ShortcutsScreen.registerShortcuts(); |
204 this._registerForwardedShortcuts(); | 204 this._registerForwardedShortcuts(); |
205 this._registerMessageSinkListener(); | 205 this._registerMessageSinkListener(); |
206 new Main.Main.InspectorDomainObserver(); | 206 new Main.Main.InspectorDomainObserver(); |
207 | 207 |
208 self.runtime.extension(Common.AppProvider).instance().then(this._showAppUI.b
ind(this)); | 208 self.runtime.extension(Common.AppProvider).instance().then(this._showAppUI.b
ind(this)); |
209 console.timeEnd('Main._createAppUI'); | 209 console.timeEnd('Main._createAppUI'); |
210 } | 210 } |
211 | 211 |
212 /** | 212 /** |
213 * @param {!Object} appProvider | 213 * @param {!Object} appProvider |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 Common.Revealer.reveal(uiSourceCode.uiLocation(lineNumber, columnNumber)
); | 321 Common.Revealer.reveal(uiSourceCode.uiLocation(lineNumber, columnNumber)
); |
322 Workspace.workspace.removeEventListener(Workspace.Workspace.Events.UISou
rceCodeAdded, listener); | 322 Workspace.workspace.removeEventListener(Workspace.Workspace.Events.UISou
rceCodeAdded, listener); |
323 } | 323 } |
324 } | 324 } |
325 | 325 |
326 Workspace.workspace.addEventListener(Workspace.Workspace.Events.UISourceCode
Added, listener); | 326 Workspace.workspace.addEventListener(Workspace.Workspace.Events.UISourceCode
Added, listener); |
327 } | 327 } |
328 | 328 |
329 _registerShortcuts() { | 329 _registerShortcuts() { |
330 var shortcut = UI.KeyboardShortcut; | 330 var shortcut = UI.KeyboardShortcut; |
331 var section = Components.shortcutsScreen.section(Common.UIString('All Panels
')); | 331 var section = UI.shortcutsScreen.section(Common.UIString('All Panels')); |
332 var keys = [ | 332 var keys = [ |
333 shortcut.makeDescriptor('[', shortcut.Modifiers.CtrlOrMeta), | 333 shortcut.makeDescriptor('[', shortcut.Modifiers.CtrlOrMeta), |
334 shortcut.makeDescriptor(']', shortcut.Modifiers.CtrlOrMeta) | 334 shortcut.makeDescriptor(']', shortcut.Modifiers.CtrlOrMeta) |
335 ]; | 335 ]; |
336 section.addRelatedKeys(keys, Common.UIString('Go to the panel to the left/ri
ght')); | 336 section.addRelatedKeys(keys, Common.UIString('Go to the panel to the left/ri
ght')); |
337 | 337 |
338 keys = [ | 338 keys = [ |
339 shortcut.makeDescriptor('[', shortcut.Modifiers.CtrlOrMeta | shortcut.Modi
fiers.Alt), | 339 shortcut.makeDescriptor('[', shortcut.Modifiers.CtrlOrMeta | shortcut.Modi
fiers.Alt), |
340 shortcut.makeDescriptor(']', shortcut.Modifiers.CtrlOrMeta | shortcut.Modi
fiers.Alt) | 340 shortcut.makeDescriptor(']', shortcut.Modifiers.CtrlOrMeta | shortcut.Modi
fiers.Alt) |
341 ]; | 341 ]; |
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
982 * @override | 982 * @override |
983 * @return {?Element} | 983 * @return {?Element} |
984 */ | 984 */ |
985 settingElement() { | 985 settingElement() { |
986 return UI.SettingsUI.createSettingCheckbox( | 986 return UI.SettingsUI.createSettingCheckbox( |
987 Common.UIString('Show rulers'), Common.moduleSetting('showMetricsRulers'
)); | 987 Common.UIString('Show rulers'), Common.moduleSetting('showMetricsRulers'
)); |
988 } | 988 } |
989 }; | 989 }; |
990 | 990 |
991 new Main.Main(); | 991 new Main.Main(); |
OLD | NEW |