+2012-01-26 Vsevolod Vlasov <vsevik@chromium.org>
+
+ Web Inspector: Scripts panel editor container should be based on UISourceCode objects, not SourceFrames.
+ https://bugs.webkit.org/show_bug.cgi?id=77098
+
+ Reviewed by Pavel Feldman.
+
+ * inspector/front-end/ScriptsNavigator.js:
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel.prototype.setScriptSourceIsBeingEdited):
+ (WebInspector.ScriptsPanel.prototype.get visibleView):
+ (WebInspector.ScriptsPanel.prototype.viewForFile):
+ (WebInspector.ScriptsPanel.prototype._uiSourceCodeReplaced):
+ (WebInspector.EditorContainer):
+ (WebInspector.EditorContainer.prototype.get visibleView):
+ (WebInspector.EditorContainer.prototype.showFile):
+ (WebInspector.EditorContainer.prototype.setFileIsDirty):
+ (WebInspector.EditorContainer.prototype.replaceFiles):
+ (WebInspector.EditorContainer.prototype.reset):
+ (WebInspector.EditorContainerDelegate):
+ (WebInspector.EditorContainerDelegate.prototype.viewForFile):
+ (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype.replaceUISourceCodes):
+ (WebInspector.ScriptsPanel.SingleFileEditorContainer):
+ (WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.get visibleView):
+ (WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.showFile):
+ (WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.setFileIsDirty):
+ (WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.replaceFiles):
+ (WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.reset):
+ * inspector/front-end/TabbedEditorContainer.js:
+ (WebInspector.TabbedEditorContainer):
+ (WebInspector.TabbedEditorContainer.prototype.get visibleView):
+ (WebInspector.TabbedEditorContainer.prototype._titleForFile):
+ (WebInspector.TabbedEditorContainer.prototype._tooltipForFile):
+ (WebInspector.TabbedEditorContainer.prototype._appendFileTab):
+ (WebInspector.TabbedEditorContainer.prototype._tabClosed):
+ (WebInspector.TabbedEditorContainer.prototype._tabSelected):
+ (WebInspector.TabbedEditorContainer.prototype.replaceFiles.get if):
+ (WebInspector.TabbedEditorContainer.prototype.replaceFiles):
+ (WebInspector.TabbedEditorContainer.prototype.setFileIsDirty.get if):
+ (WebInspector.TabbedEditorContainer.prototype.setFileIsDirty):
+ (WebInspector.TabbedEditorContainer.prototype.reset):
+
2012-01-26 Nikolas Zimmermann <nzimmermann@rim.com>
SVG + <object> tests are flakey
/**
* @constructor
+ * @implements {WebInspector.EditorContainerDelegate}
* @extends {WebInspector.Panel}
*/
WebInspector.ScriptsPanel = function(presentationModel)
this.editorView.installResizer(this._navigatorResizeWidgetElement);
this.editorView.sidebarElement.appendChild(this._navigatorResizeWidgetElement);
- this._editorContainer = new WebInspector.TabbedEditorContainer();
+ this._editorContainer = new WebInspector.TabbedEditorContainer(this);
this._editorContainer.show(this.editorView.mainElement);
WebInspector.OpenResourceDialog.install(this, this._presentationModel, this.editorView.mainElement);
} else {
this._fileSelector = new WebInspector.ScriptsPanel.ComboBoxFileSelector(this._presentationModel);
this._fileSelector.show(this.splitView.mainElement);
- this._editorContainer = new WebInspector.ScriptsPanel.SingleFileEditorContainer();
+ this._editorContainer = new WebInspector.ScriptsPanel.SingleFileEditorContainer(this);
this._editorContainer.show(this.splitView.mainElement);
WebInspector.OpenResourceDialog.install(this, this._presentationModel, this.splitView.mainElement);
}
this._fileSelector.addEventListener(WebInspector.ScriptsPanel.FileSelector.Events.FileSelected, this._fileSelected, this);
this._fileSelector.addEventListener(WebInspector.ScriptsPanel.FileSelector.Events.ReleasedFocusAfterSelection, this._fileSelectorReleasedFocus, this);
- this._editorContainer.addEventListener(WebInspector.ScriptsPanel.EditorContainer.Events.EditorSelected, this._editorSelected, this);
+ this._editorContainer.addEventListener(WebInspector.EditorContainer.Events.EditorSelected, this._editorSelected, this);
this.splitView.mainElement.appendChild(this.debugSidebarResizeWidgetElement);
setScriptSourceIsBeingEdited: function(uiSourceCode, inEditMode)
{
this._fileSelector.setScriptSourceIsDirty(uiSourceCode, inEditMode);
- var sourceFrame = this._sourceFramesByUISourceCode.get(uiSourceCode)
- if (sourceFrame)
- this._editorContainer.setSourceFrameIsDirty(sourceFrame, inEditMode);
+ this._editorContainer.setFileIsDirty(uiSourceCode, inEditMode);
},
_consoleMessagesCleared: function()
get visibleView()
{
- return this._editorContainer.currentSourceFrame;
+ return this._editorContainer.visibleView;
},
_updateScriptViewStatusBarItems: function()
*/
_showFile: function(uiSourceCode)
{
- var sourceFrame = this._sourceFramesByUISourceCode.get(uiSourceCode) || this._createSourceFrame(uiSourceCode);
+ var sourceFrame = this._getOrCreateSourceFrame(uiSourceCode);
- this._editorContainer.showSourceFrame(uiSourceCode.displayName, sourceFrame, uiSourceCode.url);
+ this._editorContainer.showFile(uiSourceCode);
this._updateScriptViewStatusBarItems();
if (uiSourceCode.url)
/**
* @param {WebInspector.UISourceCode} uiSourceCode
+ * @return {WebInspector.SourceFrame}
*/
_createSourceFrame: function(uiSourceCode)
{
this._sourceFramesByUISourceCode.put(uiSourceCode, sourceFrame);
return sourceFrame;
},
+
+ /**
+ * @param {WebInspector.UISourceCode} uiSourceCode
+ * @return {WebInspector.SourceFrame}
+ */
+ _getOrCreateSourceFrame: function(uiSourceCode)
+ {
+ return this._sourceFramesByUISourceCode.get(uiSourceCode) || this._createSourceFrame(uiSourceCode);
+ },
+
+ /**
+ * @param {WebInspector.UISourceCode} uiSourceCode
+ * @return {WebInspector.SourceFrame}
+ */
+ viewForFile: function(uiSourceCode)
+ {
+ return this._getOrCreateSourceFrame(uiSourceCode);
+ },
/**
* @param {WebInspector.UISourceCode} uiSourceCode
var oldUISourceCodeList = /** @type {Array.<WebInspector.UISourceCode>} */ event.data.oldUISourceCodeList;
var uiSourceCodeList = /** @type {Array.<WebInspector.UISourceCode>} */ event.data.uiSourceCodeList;
- var addedToFileSelector = false;
- var sourceFrames = [];
- for (var i = 0; i < oldUISourceCodeList.length; ++i) {
- var uiSourceCode = oldUISourceCodeList[i];
- var oldSourceFrame = this._sourceFramesByUISourceCode.get(uiSourceCode);
-
- if (this._fileSelector.isScriptSourceAdded(uiSourceCode)) {
- addedToFileSelector = true;
-
- if (oldSourceFrame)
- sourceFrames.push(oldSourceFrame);
- this._removeSourceFrame(uiSourceCode);
- }
- }
-
- if (addedToFileSelector) {
- this._fileSelector.replaceUISourceCodes(oldUISourceCodeList, uiSourceCodeList);
-
- var shouldReplace = false;
- for (var i = 0; i < sourceFrames.length; ++i) {
- if (this._editorContainer.isSourceFrameOpen(sourceFrames[i])) {
- shouldReplace = true;
- break;
- }
- }
-
- if (shouldReplace) {
- var newUISourceCode = uiSourceCodeList[0];
- var sourceFrame = this._sourceFramesByUISourceCode.get(newUISourceCode) || this._createSourceFrame(newUISourceCode);
- this._editorContainer.replaceSourceFrames(sourceFrames, newUISourceCode.displayName, sourceFrame, newUISourceCode.url);
- }
- }
+ this._fileSelector.replaceUISourceCodes(oldUISourceCodeList, uiSourceCodeList);
+ this._editorContainer.replaceFiles(oldUISourceCodeList, uiSourceCodeList);
+ for (var i = 0; i < oldUISourceCodeList.length; ++i)
+ this._removeSourceFrame(oldUISourceCodeList[i]);
},
_sourceFrameLoaded: function(event)
_editorSelected: function(event)
{
- var sourceFrame = /** @type {WebInspector.SourceFrame} */ event.data;
- this._fileSelector.revealUISourceCode(sourceFrame._uiSourceCode);
+ var uiSourceCode = /** @type {WebInspector.UISourceCode} */ event.data;
+ this._fileSelector.revealUISourceCode(uiSourceCode);
},
_fileSelected: function(event)
/**
* @interface
*/
-WebInspector.ScriptsPanel.EditorContainer = function() { }
+WebInspector.EditorContainer = function() { }
-WebInspector.ScriptsPanel.EditorContainer.Events = {
+WebInspector.EditorContainer.Events = {
EditorSelected: "EditorSelected"
}
-WebInspector.ScriptsPanel.EditorContainer.prototype = {
+WebInspector.EditorContainer.prototype = {
/**
* @type {WebInspector.SourceFrame}
*/
- get currentSourceFrame() { },
+ get visibleView() { },
/**
* @param {Element} element
show: function(element) { },
/**
- * @param {string} title
- * @param {WebInspector.SourceFrame} sourceFrame
- * @param {string} tooltip
+ * @param {WebInspector.UISourceCode} uiSourceCode
*/
- showSourceFrame: function(title, sourceFrame, tooltip) { },
+ showFile: function(uiSourceCode) { },
/**
- * @param {WebInspector.SourceFrame} sourceFrame
- * @return {boolean}
+ * @param {WebInspector.UISourceCode} uiSourceCode
+ * @param {boolean} isDirty
*/
- isSourceFrameOpen: function(sourceFrame) { return false; },
+ setFileIsDirty: function(uiSourceCode, isDirty) { },
/**
- * @param {Array.<WebInspector.SourceFrame>} oldSourceFrames
- * @param {string} title
- * @param {WebInspector.SourceFrame} sourceFrame
- * @param {string} tooltip
+ * @param {Array.<WebInspector.UISourceCode>} oldUISourceCodeList
+ * @param {Array.<WebInspector.UISourceCode>} uiSourceCodeList
*/
- replaceSourceFrames: function(oldSourceFrames, title, sourceFrame, tooltip) { },
+ replaceFiles: function(oldUISourceCodeList, uiSourceCodeList) { },
+
+ reset: function() { }
+}
+
+/**
+ * @interface
+ */
+WebInspector.EditorContainerDelegate = function() { }
+WebInspector.EditorContainerDelegate.prototype = {
/**
- * @param {WebInspector.SourceFrame} sourceFrame
- * @param {boolean} isDirty
+ * @param {WebInspector.UISourceCode} uiSourceCode
+ * @return {WebInspector.SourceFrame}
*/
- setSourceFrameIsDirty: function(sourceFrame, isDirty) { },
-
- reset: function() { }
+ viewForFile: function(uiSourceCode) { }
}
/**
*/
replaceUISourceCodes: function(oldUISourceCodeList, uiSourceCodeList)
{
- var visible = false;
+ var selected = false;
+ var added = false;
var selectedOption = this._filesSelectElement[this._filesSelectElement.selectedIndex];
var selectedUISourceCode = selectedOption ? selectedOption._uiSourceCode : null;
for (var i = 0; i < oldUISourceCodeList.length; ++i) {
var uiSourceCode = oldUISourceCodeList[i];
- if (selectedUISourceCode === oldUISourceCodeList[i])
- visible = true;
var option = uiSourceCode._option;
+ if (!option)
+ continue;
+ added = true;
+
// FIXME: find out why we are getting here with option detached.
- if (option && this._filesSelectElement === option.parentElement)
+ if (this._filesSelectElement === option.parentElement)
this._filesSelectElement.removeChild(option);
+
+ if (selectedUISourceCode === oldUISourceCodeList[i])
+ selected = true;
}
+ if (!added)
+ return;
+
for (var i = 0; i < uiSourceCodeList.length; ++i)
this._addOptionToFilesSelect(uiSourceCodeList[i]);
- if (visible)
+ if (selected)
this._filesSelectElement.selectedIndex = uiSourceCodeList[0]._option.index;
},
select.folderOptions = {};
var option = document.createElement("option");
- option._uiSourceCode = uiSourceCode;
var parsedURL = uiSourceCode.url.asParsedURL();
const indent = WebInspector.isMac() ? "" : "\u00a0\u00a0\u00a0\u00a0";
WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype.__proto__ = WebInspector.Object.prototype;
/**
- * @implements {WebInspector.ScriptsPanel.EditorContainer}
+ * @implements {WebInspector.EditorContainer}
* @extends {WebInspector.Object}
* @constructor
+ * @param {WebInspector.EditorContainerDelegate} delegate
*/
-WebInspector.ScriptsPanel.SingleFileEditorContainer = function()
+WebInspector.ScriptsPanel.SingleFileEditorContainer = function(delegate)
{
+ this._delegate = delegate;
this.element = document.createElement("div");
this.element.className = "scripts-views-container";
}
/**
* @type {WebInspector.SourceFrame}
*/
- get currentSourceFrame()
+ get visibleView()
{
return this._currentSourceFrame;
},
{
element.appendChild(this.element);
},
-
+
/**
- * @param {string} title
- * @param {WebInspector.SourceFrame} sourceFrame
- * @param {string} tooltip
+ * @param {WebInspector.UISourceCode} uiSourceCode
*/
- showSourceFrame: function(title, sourceFrame, tooltip)
+ showFile: function(uiSourceCode)
{
+ var sourceFrame = this._delegate.viewForFile(uiSourceCode);
if (this._currentSourceFrame === sourceFrame)
return;
this._currentSourceFrame.detach();
this._currentSourceFrame = sourceFrame;
+ this._currentFile = uiSourceCode;
if (sourceFrame)
sourceFrame.show(this.element);
},
/**
- * @param {WebInspector.SourceFrame} sourceFrame
- * @return {boolean}
- */
- isSourceFrameOpen: function(sourceFrame)
- {
- return this._currentSourceFrame && this._currentSourceFrame === sourceFrame;
- },
-
- /**
- * @param {Array.<WebInspector.SourceFrame>} oldSourceFrames
- * @param {string} title
- * @param {WebInspector.SourceFrame} sourceFrame
- * @param {string} tooltip
+ * @param {WebInspector.UISourceCode} uiSourceCode
+ * @param {boolean} isDirty
*/
- replaceSourceFrames: function(oldSourceFrames, title, sourceFrame, tooltip)
+ setFileIsDirty: function(uiSourceCode, isDirty)
{
- this._currentSourceFrame.detach();
- this._currentSourceFrame = null;
- this.showSourceFrame(title, sourceFrame, tooltip);
+ // Do nothing.
},
/**
- * @param {WebInspector.SourceFrame} sourceFrame
- * @param {boolean} isDirty
+ * @param {Array.<WebInspector.UISourceCode>} oldUISourceCodeList
+ * @param {Array.<WebInspector.UISourceCode>} uiSourceCodeList
*/
- setSourceFrameIsDirty: function(sourceFrame, isDirty)
+ replaceFiles: function(oldUISourceCodeList, uiSourceCodeList)
{
- // Do nothing.
+ if (oldUISourceCodeList.indexOf(this._currentFile) !== -1)
+ this.showFile(uiSourceCodeList[0]);
},
reset: function()
{
- if (this._currentSourceFrame) {
+ if (this._currentSourceFrame)
this._currentSourceFrame.detach();
- this._currentSourceFrame = null;
- }
+ this._currentSourceFrame = null;
+ this._currentFile = null;
}
}
*/
/**
- * @implements {WebInspector.ScriptsPanel.EditorContainer}
+ * @implements {WebInspector.EditorContainer}
* @extends {WebInspector.Object}
* @constructor
+ * @param {WebInspector.EditorContainerDelegate} delegate
*/
-WebInspector.TabbedEditorContainer = function()
+WebInspector.TabbedEditorContainer = function(delegate)
{
+ this._delegate = delegate;
+
this._tabbedPane = new WebInspector.TabbedPane();
this._tabbedPane.closeableTabs = true;
this._tabbedPane.element.id = "scripts-editor-container-tabbed-pane";
this._tabbedPane.addEventListener(WebInspector.TabbedPane.EventTypes.TabClosed, this._tabClosed, this);
this._tabbedPane.addEventListener(WebInspector.TabbedPane.EventTypes.TabSelected, this._tabSelected, this);
- this._titles = new Map();
- this._tooltips = new Map();
this._tabIds = new Map();
+ this._files = {};
}
WebInspector.TabbedEditorContainer._tabId = 0;
/**
* @type {WebInspector.SourceFrame}
*/
- get currentSourceFrame()
+ get visibleView()
{
return this._tabbedPane.visibleView;
},
},
/**
- * @param {string} title
- * @param {WebInspector.SourceFrame} sourceFrame
- * @param {string} tooltip
+ * @param {WebInspector.UISourceCode} uiSourceCode
*/
- showSourceFrame: function(title, sourceFrame, tooltip)
+ showFile: function(uiSourceCode)
{
- var tabId = this._tabIds.get(sourceFrame) || this._appendSourceFrameTab(title, sourceFrame, tooltip);
+ var tabId = this._tabIds.get(uiSourceCode) || this._appendFileTab(uiSourceCode);
this._tabbedPane.selectTab(tabId);
},
/**
- * @param {string} title
- * @param {WebInspector.SourceFrame} sourceFrame
- * @param {string} tooltip
+ * @param {WebInspector.UISourceCode} uiSourceCode
+ * @return {string}
+ */
+ _titleForFile: function(uiSourceCode)
+ {
+ return uiSourceCode.displayName;
+ },
+
+ /**
+ * @param {WebInspector.UISourceCode} uiSourceCode
+ * @return {string}
*/
- _appendSourceFrameTab: function(title, sourceFrame, tooltip)
+ _tooltipForFile: function(uiSourceCode)
{
+ return uiSourceCode.url;
+ },
+
+ /**
+ * @param {WebInspector.UISourceCode} uiSourceCode
+ */
+ _appendFileTab: function(uiSourceCode)
+ {
+ var view = this._delegate.viewForFile(uiSourceCode);
+ var title = this._titleForFile(uiSourceCode);
+ var tooltip = this._tooltipForFile(uiSourceCode);
+
var tabId = this._generateTabId();
- this._tabIds.put(sourceFrame, tabId)
- this._titles.put(sourceFrame, title)
- this._tooltips.put(sourceFrame, tooltip)
+ this._tabIds.put(uiSourceCode, tabId);
+ this._files[tabId] = uiSourceCode;
- this._tabbedPane.appendTab(tabId, title, sourceFrame, tooltip);
+ this._tabbedPane.appendTab(tabId, title, view, tooltip);
return tabId;
},
/**
- * @param {WebInspector.SourceFrame} sourceFrame
+ * @param {WebInspector.UISourceCode} uiSourceCode
*/
- _removeSourceFrameTab: function(sourceFrame)
+ _removeFileTab: function(uiSourceCode)
{
- var tabId = this._tabIds.get(sourceFrame);
+ var tabId = this._tabIds.get(uiSourceCode);
if (tabId)
this._tabbedPane.closeTab(tabId);
*/
_tabClosed: function(event)
{
- var sourceFrame = /** @type {WebInspector.UISourceCode} */ event.data.view;
- this._tabIds.remove(sourceFrame);
- this._titles.remove(sourceFrame);
- this._tooltips.remove(sourceFrame);
+ var tabId = /** @type {string} */ event.data.tabId;
+ this._tabIds.remove(this._files[tabId]);
+ delete this._files[tabId];
},
/**
*/
_tabSelected: function(event)
{
- var sourceFrame = /** @type {WebInspector.UISourceCode} */ event.data.view;
- this.dispatchEventToListeners(WebInspector.ScriptsPanel.EditorContainer.Events.EditorSelected, sourceFrame);
+ var tabId = /** @type {string} */ event.data.tabId;
+ this.dispatchEventToListeners(WebInspector.EditorContainer.Events.EditorSelected, this._files[tabId]);
},
/**
- * @param {WebInspector.SourceFrame} oldSourceFrame
- * @param {string} title
- * @param {WebInspector.SourceFrame} sourceFrame
- * @param {string} tooltip
+ * @param {WebInspector.UISourceCode} oldUISourceCode
+ * @param {WebInspector.UISourceCode} newUISourceCode
*/
- _replaceSourceFrameTab: function(oldSourceFrame, title, sourceFrame, tooltip)
+ _replaceFileTab: function(oldUISourceCode, newUISourceCode)
{
- var tabId = this._tabIds.get(oldSourceFrame);
+ var tabId = this._tabIds.get(oldUISourceCode);
- if (tabId) {
- this._tabIds.remove(oldSourceFrame);
- this._titles.remove(oldSourceFrame);
- this._tooltips.remove(oldSourceFrame);
-
- this._tabIds.put(sourceFrame, tabId);
- this._titles.put(sourceFrame, title);
- this._tooltips.put(sourceFrame, tooltip);
-
- this._tabbedPane.changeTabTitle(tabId, title);
- this._tabbedPane.changeTabView(tabId, sourceFrame);
- this._tabbedPane.changeTabTooltip(tabId, tooltip);
- }
- },
-
- /**
- * @param {WebInspector.SourceFrame} sourceFrame
- * @return {boolean}
- */
- isSourceFrameOpen: function(sourceFrame)
- {
- return !!this._tabIds.get(sourceFrame);
+ if (!tabId)
+ return;
+
+ delete this._files[this._tabIds.get(oldUISourceCode)]
+ this._tabIds.remove(oldUISourceCode);
+ this._tabIds.put(newUISourceCode, tabId);
+ this._files[tabId] = newUISourceCode;
+
+ this._tabbedPane.changeTabTitle(tabId, this._titleForFile(newUISourceCode));
+ this._tabbedPane.changeTabView(tabId, this._delegate.viewForFile(newUISourceCode));
+ this._tabbedPane.changeTabTooltip(tabId, this._tooltipForFile(newUISourceCode));
},
/**
- * @param {Array.<WebInspector.SourceFrame>} oldSourceFrames
- * @param {string} title
- * @param {WebInspector.SourceFrame} sourceFrame
- * @param {string} tooltip
+ * @param {Array.<WebInspector.UISourceCode>} oldUISourceCodeList
+ * @param {Array.<WebInspector.UISourceCode>} uiSourceCodeList
*/
- replaceSourceFrames: function(oldSourceFrames, title, sourceFrame, tooltip)
+ replaceFiles: function(oldUISourceCodeList, uiSourceCodeList)
{
- var mainSourceFrame;
- for (var i = 0; i < oldSourceFrames.length; ++i) {
- var tabId = this._tabIds.get(oldSourceFrames[i]);
- if (tabId && (!mainSourceFrame || this._tabbedPane.selectedTabId === tabId)) {
- mainSourceFrame = oldSourceFrames[i];
+ var mainFile;
+ for (var i = 0; i < oldUISourceCodeList.length; ++i) {
+ var tabId = this._tabIds.get(oldUISourceCodeList[i]);
+ if (tabId && (!mainFile || this._tabbedPane.selectedTabId === tabId)) {
+ mainFile = oldUISourceCodeList[i];
break;
}
}
- if (mainSourceFrame)
- this._replaceSourceFrameTab(mainSourceFrame, title, sourceFrame, tooltip);
+ if (!mainFile)
+ return;
- for (var i = 0; i < oldSourceFrames.length; ++i)
- this._removeSourceFrameTab(oldSourceFrames[i]);
+ this._replaceFileTab(mainFile, uiSourceCodeList[0]);
+ for (var i = 0; i < oldUISourceCodeList.length; ++i)
+ this._removeFileTab(oldUISourceCodeList[i]);
},
-
+
/**
- * @param {WebInspector.SourceFrame} sourceFrame
+ * @param {WebInspector.UISourceCode} uiSourceCode
* @param {boolean} isDirty
*/
- setSourceFrameIsDirty: function(sourceFrame, isDirty)
+ setFileIsDirty: function(uiSourceCode, isDirty)
{
- var tabId = this._tabIds.get(sourceFrame);
+ var tabId = this._tabIds.get(uiSourceCode);
if (tabId) {
- var title = this._titles.get(sourceFrame);
+ var title = this._titleForFile(uiSourceCode);
if (isDirty)
title += "*";
this._tabbedPane.changeTabTitle(tabId, title);
reset: function()
{
this._tabbedPane.closeAllTabs();
- this._titles = new Map();
- this._tooltips = new Map();
- this._tabIds = new Map();
+ this._tabIds = new Map();
+ this._files = {};
+
},
/**