| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 759 { | 759 { |
| 760 WebInspector.workspace.removeEventListener(WebInspector.Workspace.Events
.UISourceCodeAdded, this._uiSourceCodeAdded, this); | 760 WebInspector.workspace.removeEventListener(WebInspector.Workspace.Events
.UISourceCodeAdded, this._uiSourceCodeAdded, this); |
| 761 }, | 761 }, |
| 762 | 762 |
| 763 __proto__: WebInspector.SelectionDialogContentProvider.prototype | 763 __proto__: WebInspector.SelectionDialogContentProvider.prototype |
| 764 } | 764 } |
| 765 | 765 |
| 766 /** | 766 /** |
| 767 * @constructor | 767 * @constructor |
| 768 * @extends {WebInspector.SelectUISourceCodeDialog} | 768 * @extends {WebInspector.SelectUISourceCodeDialog} |
| 769 * @param {!WebInspector.SourcesEditor} sourcesEditor | 769 * @param {!WebInspector.SourcesView} sourcesView |
| 770 * @param {!Map.<!WebInspector.UISourceCode, number>=} defaultScores | 770 * @param {!Map.<!WebInspector.UISourceCode, number>=} defaultScores |
| 771 */ | 771 */ |
| 772 WebInspector.OpenResourceDialog = function(sourcesEditor, defaultScores) | 772 WebInspector.OpenResourceDialog = function(sourcesView, defaultScores) |
| 773 { | 773 { |
| 774 WebInspector.SelectUISourceCodeDialog.call(this, defaultScores); | 774 WebInspector.SelectUISourceCodeDialog.call(this, defaultScores); |
| 775 this._sourcesEditor = sourcesEditor; | 775 this._sourcesView = sourcesView; |
| 776 } | 776 } |
| 777 | 777 |
| 778 WebInspector.OpenResourceDialog.prototype = { | 778 WebInspector.OpenResourceDialog.prototype = { |
| 779 | 779 |
| 780 /** | 780 /** |
| 781 * @param {?WebInspector.UISourceCode} uiSourceCode | 781 * @param {?WebInspector.UISourceCode} uiSourceCode |
| 782 * @param {number=} lineNumber | 782 * @param {number=} lineNumber |
| 783 * @param {number=} columnNumber | 783 * @param {number=} columnNumber |
| 784 */ | 784 */ |
| 785 uiSourceCodeSelected: function(uiSourceCode, lineNumber, columnNumber) | 785 uiSourceCodeSelected: function(uiSourceCode, lineNumber, columnNumber) |
| 786 { | 786 { |
| 787 if (!uiSourceCode) | 787 if (!uiSourceCode) |
| 788 uiSourceCode = this._sourcesEditor.currentUISourceCode(); | 788 uiSourceCode = this._sourcesView.currentUISourceCode(); |
| 789 if (!uiSourceCode) | 789 if (!uiSourceCode) |
| 790 return; | 790 return; |
| 791 this._sourcesEditor.showSourceLocation(uiSourceCode, lineNumber, columnN
umber); | 791 this._sourcesView.showSourceLocation(uiSourceCode, lineNumber, columnNum
ber); |
| 792 }, | 792 }, |
| 793 | 793 |
| 794 /** | 794 /** |
| 795 * @param {string} query | 795 * @param {string} query |
| 796 * @return {boolean} | 796 * @return {boolean} |
| 797 */ | 797 */ |
| 798 shouldShowMatchingItems: function(query) | 798 shouldShowMatchingItems: function(query) |
| 799 { | 799 { |
| 800 return !query.startsWith(":"); | 800 return !query.startsWith(":"); |
| 801 }, | 801 }, |
| 802 | 802 |
| 803 /** | 803 /** |
| 804 * @param {!WebInspector.Project} project | 804 * @param {!WebInspector.Project} project |
| 805 * @return {boolean} | 805 * @return {boolean} |
| 806 */ | 806 */ |
| 807 filterProject: function(project) | 807 filterProject: function(project) |
| 808 { | 808 { |
| 809 return !project.isServiceProject(); | 809 return !project.isServiceProject(); |
| 810 }, | 810 }, |
| 811 | 811 |
| 812 __proto__: WebInspector.SelectUISourceCodeDialog.prototype | 812 __proto__: WebInspector.SelectUISourceCodeDialog.prototype |
| 813 } | 813 } |
| 814 | 814 |
| 815 /** | 815 /** |
| 816 * @param {!WebInspector.SourcesEditor} sourcesEditor | 816 * @param {!WebInspector.SourcesView} sourcesView |
| 817 * @param {!Element} relativeToElement | 817 * @param {!Element} relativeToElement |
| 818 * @param {string=} query | 818 * @param {string=} query |
| 819 * @param {!Map.<!WebInspector.UISourceCode, number>=} defaultScores | 819 * @param {!Map.<!WebInspector.UISourceCode, number>=} defaultScores |
| 820 */ | 820 */ |
| 821 WebInspector.OpenResourceDialog.show = function(sourcesEditor, relativeToElement
, query, defaultScores) | 821 WebInspector.OpenResourceDialog.show = function(sourcesView, relativeToElement,
query, defaultScores) |
| 822 { | 822 { |
| 823 if (WebInspector.Dialog.currentInstance()) | 823 if (WebInspector.Dialog.currentInstance()) |
| 824 return; | 824 return; |
| 825 | 825 |
| 826 var filteredItemSelectionDialog = new WebInspector.FilteredItemSelectionDial
og(new WebInspector.OpenResourceDialog(sourcesEditor, defaultScores)); | 826 var filteredItemSelectionDialog = new WebInspector.FilteredItemSelectionDial
og(new WebInspector.OpenResourceDialog(sourcesView, defaultScores)); |
| 827 filteredItemSelectionDialog.renderAsTwoRows(); | 827 filteredItemSelectionDialog.renderAsTwoRows(); |
| 828 if (query) | 828 if (query) |
| 829 filteredItemSelectionDialog.setQuery(query); | 829 filteredItemSelectionDialog.setQuery(query); |
| 830 WebInspector.Dialog.show(relativeToElement, filteredItemSelectionDialog); | 830 WebInspector.Dialog.show(relativeToElement, filteredItemSelectionDialog); |
| 831 } | 831 } |
| 832 | 832 |
| 833 /** | 833 /** |
| 834 * @constructor | 834 * @constructor |
| 835 * @extends {WebInspector.SelectUISourceCodeDialog} | 835 * @extends {WebInspector.SelectUISourceCodeDialog} |
| 836 * @param {string} type | 836 * @param {string} type |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 879 var filteredItemSelectionDialog = new WebInspector.FilteredItemSelectionDial
og(new WebInspector.SelectUISourceCodeForProjectTypeDialog(type, callback)); | 879 var filteredItemSelectionDialog = new WebInspector.FilteredItemSelectionDial
og(new WebInspector.SelectUISourceCodeForProjectTypeDialog(type, callback)); |
| 880 filteredItemSelectionDialog.setQuery(name); | 880 filteredItemSelectionDialog.setQuery(name); |
| 881 filteredItemSelectionDialog.renderAsTwoRows(); | 881 filteredItemSelectionDialog.renderAsTwoRows(); |
| 882 WebInspector.Dialog.show(relativeToElement, filteredItemSelectionDialog); | 882 WebInspector.Dialog.show(relativeToElement, filteredItemSelectionDialog); |
| 883 } | 883 } |
| 884 | 884 |
| 885 /** | 885 /** |
| 886 * @typedef {{index: number, total: number, chunk: !Array.<!{selectorText: strin
g, lineNumber: number, columnNumber: number}>}} | 886 * @typedef {{index: number, total: number, chunk: !Array.<!{selectorText: strin
g, lineNumber: number, columnNumber: number}>}} |
| 887 */ | 887 */ |
| 888 WebInspector.JavaScriptOutlineDialog.MessageEventData; | 888 WebInspector.JavaScriptOutlineDialog.MessageEventData; |
| OLD | NEW |