Add more jsdoc for closure checks

1. add `@extends` for all polymer elements
2. add `@override` for all lifecycle methods
3. fix a wrong type in gr-auth

Change-Id: Id9dea76b169197084d2e0b5f267459cdc4aaec3e
This commit is contained in:
Tao Zhou 2020-01-12 15:20:39 +01:00
parent c4409bd739
commit ab57ce3744
168 changed files with 294 additions and 4 deletions

View File

@ -49,6 +49,7 @@
}, },
}, },
/** @override */
detached() { detached() {
this._handleHideTooltip(); this._handleHideTooltip();
}, },

View File

@ -540,6 +540,7 @@ shortcuts are.
} }
}, },
/** @override */
attached() { attached() {
const shortcuts = shortcutManager.attachHost(this); const shortcuts = shortcutManager.attachHost(this);
if (!shortcuts) { return; } if (!shortcuts) { return; }
@ -559,6 +560,7 @@ shortcuts are.
} }
}, },
/** @override */
detached() { detached() {
if (shortcutManager.detachHost(this)) { if (shortcutManager.detachHost(this)) {
this.removeOwnKeyBindings(); this.removeOwnKeyBindings();

View File

@ -40,6 +40,7 @@
/** /**
* @appliesMixin Gerrit.AccessMixin * @appliesMixin Gerrit.AccessMixin
* @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.FireMixin
* @extends Polymer.Element
*/ */
class GrAccessSection extends Polymer.mixinBehaviors( [ class GrAccessSection extends Polymer.mixinBehaviors( [
Gerrit.AccessBehavior, Gerrit.AccessBehavior,
@ -84,6 +85,7 @@
}; };
} }
/** @override */
created() { created() {
super.created(); super.created();
this.addEventListener('access-saved', this.addEventListener('access-saved',

View File

@ -20,6 +20,7 @@
/** /**
* @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.FireMixin
* @appliesMixin Gerrit.ListViewMixin * @appliesMixin Gerrit.ListViewMixin
* @extends Polymer.Element
*/ */
class GrAdminGroupList extends Polymer.mixinBehaviors( [ class GrAdminGroupList extends Polymer.mixinBehaviors( [
Gerrit.FireBehavior, Gerrit.FireBehavior,
@ -77,6 +78,7 @@
}; };
} }
/** @override */
attached() { attached() {
super.attached(); super.attached();
this._getCreateGroupCapability(); this._getCreateGroupCapability();

View File

@ -23,6 +23,7 @@
* @appliesMixin Gerrit.AdminNavMixin * @appliesMixin Gerrit.AdminNavMixin
* @appliesMixin Gerrit.BaseUrlMixin * @appliesMixin Gerrit.BaseUrlMixin
* @appliesMixin Gerrit.URLEncodingMixin * @appliesMixin Gerrit.URLEncodingMixin
* @extends Polymer.Element
*/ */
class GrAdminView extends Polymer.mixinBehaviors( [ class GrAdminView extends Polymer.mixinBehaviors( [
Gerrit.AdminNavBehavior, Gerrit.AdminNavBehavior,
@ -82,6 +83,7 @@
]; ];
} }
/** @override */
attached() { attached() {
super.attached(); super.attached();
this.reload(); this.reload();

View File

@ -25,6 +25,7 @@
/** /**
* @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.FireMixin
* @extends Polymer.Element
*/ */
class GrConfirmDeleteItemDialog extends Polymer.mixinBehaviors( [ class GrConfirmDeleteItemDialog extends Polymer.mixinBehaviors( [
Gerrit.FireBehavior, Gerrit.FireBehavior,

View File

@ -24,6 +24,7 @@
* @appliesMixin Gerrit.BaseUrlMixin * @appliesMixin Gerrit.BaseUrlMixin
* @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.FireMixin
* @appliesMixin Gerrit.URLEncodingMixin * @appliesMixin Gerrit.URLEncodingMixin
* @extends Polymer.Element
*/ */
class GrCreateChangeDialog extends Polymer.mixinBehaviors( [ class GrCreateChangeDialog extends Polymer.mixinBehaviors( [
Gerrit.BaseUrlBehavior, Gerrit.BaseUrlBehavior,
@ -64,6 +65,7 @@
}; };
} }
/** @override */
attached() { attached() {
super.attached(); super.attached();
if (!this.repoName) { return Promise.resolve(); } if (!this.repoName) { return Promise.resolve(); }

View File

@ -20,6 +20,7 @@
/** /**
* @appliesMixin Gerrit.BaseUrlMixin * @appliesMixin Gerrit.BaseUrlMixin
* @appliesMixin Gerrit.URLEncodingMixin * @appliesMixin Gerrit.URLEncodingMixin
* @extends Polymer.Element
*/ */
class GrCreateGroupDialog extends Polymer.mixinBehaviors( [ class GrCreateGroupDialog extends Polymer.mixinBehaviors( [
Gerrit.BaseUrlBehavior, Gerrit.BaseUrlBehavior,

View File

@ -25,6 +25,7 @@
/** /**
* @appliesMixin Gerrit.BaseUrlMixin * @appliesMixin Gerrit.BaseUrlMixin
* @appliesMixin Gerrit.URLEncodingMixin * @appliesMixin Gerrit.URLEncodingMixin
* @extends Polymer.Element
*/ */
class GrCreatePointerDialog extends Polymer.mixinBehaviors( [ class GrCreatePointerDialog extends Polymer.mixinBehaviors( [
Gerrit.BaseUrlBehavior, Gerrit.BaseUrlBehavior,

View File

@ -20,6 +20,7 @@
/** /**
* @appliesMixin Gerrit.BaseUrlMixin * @appliesMixin Gerrit.BaseUrlMixin
* @appliesMixin Gerrit.URLEncodingMixin * @appliesMixin Gerrit.URLEncodingMixin
* @extends Polymer.Element
*/ */
class GrCreateRepoDialog extends Polymer.mixinBehaviors( [ class GrCreateRepoDialog extends Polymer.mixinBehaviors( [
Gerrit.BaseUrlBehavior, Gerrit.BaseUrlBehavior,

View File

@ -22,6 +22,7 @@
/** /**
* @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.FireMixin
* @appliesMixin Gerrit.ListViewMixin * @appliesMixin Gerrit.ListViewMixin
* @extends Polymer.Element
*/ */
class GrGroupAuditLog extends Polymer.mixinBehaviors( [ class GrGroupAuditLog extends Polymer.mixinBehaviors( [
Gerrit.FireBehavior, Gerrit.FireBehavior,
@ -42,11 +43,13 @@
}; };
} }
/** @override */
attached() { attached() {
super.attached(); super.attached();
this.fire('title-change', {title: 'Audit Log'}); this.fire('title-change', {title: 'Audit Log'});
} }
/** @override */
ready() { ready() {
super.ready(); super.ready();
this._getAuditLogs(); this._getAuditLogs();

View File

@ -27,6 +27,7 @@
* @appliesMixin Gerrit.BaseUrlMixin * @appliesMixin Gerrit.BaseUrlMixin
* @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.FireMixin
* @appliesMixin Gerrit.URLEncodingMixin * @appliesMixin Gerrit.URLEncodingMixin
* @extends Polymer.Element
*/ */
class GrGroupMembers extends Polymer.mixinBehaviors( [ class GrGroupMembers extends Polymer.mixinBehaviors( [
Gerrit.BaseUrlBehavior, Gerrit.BaseUrlBehavior,
@ -76,6 +77,7 @@
}; };
} }
/** @override */
attached() { attached() {
super.attached(); super.attached();
this._loadGroupDetails(); this._loadGroupDetails();

View File

@ -32,6 +32,7 @@
/** /**
* @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.FireMixin
* @extends Polymer.Element
*/ */
class GrGroup extends Polymer.mixinBehaviors( [ class GrGroup extends Polymer.mixinBehaviors( [
Gerrit.FireBehavior, Gerrit.FireBehavior,
@ -105,6 +106,7 @@
]; ];
} }
/** @override */
attached() { attached() {
super.attached(); super.attached();
this._loadGroup(); this._loadGroup();

View File

@ -37,6 +37,7 @@
* Fired when a permission that was previously added was removed. * Fired when a permission that was previously added was removed.
* *
* @event added-permission-removed * @event added-permission-removed
* @extends Polymer.Element
*/ */
class GrPermission extends Polymer.mixinBehaviors( [ class GrPermission extends Polymer.mixinBehaviors( [
Gerrit.AccessBehavior, Gerrit.AccessBehavior,
@ -94,12 +95,14 @@
]; ];
} }
/** @override */
created() { created() {
super.created(); super.created();
this.addEventListener('access-saved', this.addEventListener('access-saved',
() => this._handleAccessSaved()); () => this._handleAccessSaved());
} }
/** @override */
ready() { ready() {
super.ready(); super.ready();
this._setupValues(); this._setupValues();

View File

@ -17,6 +17,7 @@
(function() { (function() {
'use strict'; 'use strict';
/** @extends Polymer.Element */
class GrPluginConfigArrayEditor extends Polymer.GestureEventListeners( class GrPluginConfigArrayEditor extends Polymer.GestureEventListeners(
Polymer.LegacyElementMixin( Polymer.LegacyElementMixin(
Polymer.Element)) { Polymer.Element)) {

View File

@ -20,6 +20,7 @@
/** /**
* @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.FireMixin
* @appliesMixin Gerrit.ListViewMixin * @appliesMixin Gerrit.ListViewMixin
* @extends Polymer.Element
*/ */
class GrPluginList extends Polymer.mixinBehaviors( [ class GrPluginList extends Polymer.mixinBehaviors( [
Gerrit.FireBehavior, Gerrit.FireBehavior,
@ -74,6 +75,7 @@
}; };
} }
/** @override */
attached() { attached() {
super.attached(); super.attached();
this.fire('title-change', {title: 'Plugins'}); this.fire('title-change', {title: 'Plugins'});

View File

@ -72,6 +72,7 @@
* @appliesMixin Gerrit.BaseUrlMixin * @appliesMixin Gerrit.BaseUrlMixin
* @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.FireMixin
* @appliesMixin Gerrit.URLEncodingMixin * @appliesMixin Gerrit.URLEncodingMixin
* @extends Polymer.Element
*/ */
class GrRepoAccess extends Polymer.mixinBehaviors( [ class GrRepoAccess extends Polymer.mixinBehaviors( [
Gerrit.AccessBehavior, Gerrit.AccessBehavior,
@ -128,6 +129,7 @@
}; };
} }
/** @override */
created() { created() {
super.created(); super.created();
this.addEventListener('access-modified', this.addEventListener('access-modified',

View File

@ -17,6 +17,7 @@
(function() { (function() {
'use strict'; 'use strict';
/** @extends Polymer.Element */
class GrRepoCommand extends Polymer.GestureEventListeners( class GrRepoCommand extends Polymer.GestureEventListeners(
Polymer.LegacyElementMixin( Polymer.LegacyElementMixin(
Polymer.Element)) { Polymer.Element)) {

View File

@ -28,6 +28,7 @@
/** /**
* @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.FireMixin
* @extends Polymer.Element
*/ */
class GrRepoCommands extends Polymer.mixinBehaviors( [ class GrRepoCommands extends Polymer.mixinBehaviors( [
Gerrit.FireBehavior, Gerrit.FireBehavior,
@ -50,6 +51,7 @@
}; };
} }
/** @override */
attached() { attached() {
super.attached(); super.attached();
this._loadRepo(); this._loadRepo();

View File

@ -19,6 +19,7 @@
/** /**
* @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.FireMixin
* @extends Polymer.Element
*/ */
class GrRepoDashboards extends Polymer.mixinBehaviors( [ class GrRepoDashboards extends Polymer.mixinBehaviors( [
Gerrit.FireBehavior, Gerrit.FireBehavior,

View File

@ -28,6 +28,7 @@
* @appliesMixin Gerrit.ListViewMixin * @appliesMixin Gerrit.ListViewMixin
* @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.FireMixin
* @appliesMixin Gerrit.URLEncodingMixin * @appliesMixin Gerrit.URLEncodingMixin
* @extends Polymer.Element
*/ */
class GrRepoDetailList extends Polymer.mixinBehaviors( [ class GrRepoDetailList extends Polymer.mixinBehaviors( [
Gerrit.ListViewBehavior, Gerrit.ListViewBehavior,

View File

@ -19,6 +19,7 @@
/** /**
* @appliesMixin Gerrit.ListViewMixin * @appliesMixin Gerrit.ListViewMixin
* @extends Polymer.Element
*/ */
class GrRepoList extends Polymer.mixinBehaviors( [ class GrRepoList extends Polymer.mixinBehaviors( [
Gerrit.ListViewBehavior, Gerrit.ListViewBehavior,
@ -78,6 +79,7 @@
}; };
} }
/** @override */
attached() { attached() {
super.attached(); super.attached();
this._getCreateRepoCapability(); this._getCreateRepoCapability();

View File

@ -19,6 +19,7 @@
/** /**
* @appliesMixin Gerrit.RepoPluginConfigMixin * @appliesMixin Gerrit.RepoPluginConfigMixin
* @extends Polymer.Element
*/ */
class GrRepoPluginConfig extends Polymer.mixinBehaviors( [ class GrRepoPluginConfig extends Polymer.mixinBehaviors( [
Gerrit.RepoPluginConfig, Gerrit.RepoPluginConfig,

View File

@ -53,6 +53,7 @@
/** /**
* @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.FireMixin
* @extends Polymer.Element
*/ */
class GrRepo extends Polymer.mixinBehaviors( [ class GrRepo extends Polymer.mixinBehaviors( [
Gerrit.FireBehavior, Gerrit.FireBehavior,
@ -123,6 +124,7 @@
]; ];
} }
/** @override */
attached() { attached() {
super.attached(); super.attached();
this._loadRepo(); this._loadRepo();

View File

@ -69,6 +69,7 @@
* @appliesMixin Gerrit.BaseUrlMixin * @appliesMixin Gerrit.BaseUrlMixin
* @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.FireMixin
* @appliesMixin Gerrit.URLEncodingMixin * @appliesMixin Gerrit.URLEncodingMixin
* @extends Polymer.Element
*/ */
class GrRuleEditor extends Polymer.mixinBehaviors( [ class GrRuleEditor extends Polymer.mixinBehaviors( [
Gerrit.AccessBehavior, Gerrit.AccessBehavior,
@ -118,12 +119,14 @@
]; ];
} }
/** @override */
created() { created() {
super.created(); super.created();
this.addEventListener('access-saved', this.addEventListener('access-saved',
() => this._handleAccessSaved()); () => this._handleAccessSaved());
} }
/** @override */
ready() { ready() {
super.ready(); super.ready();
// Called on ready rather than the observer because when new rules are // Called on ready rather than the observer because when new rules are
@ -132,6 +135,7 @@
this._setupValues(this.rule); this._setupValues(this.rule);
} }
/** @override */
attached() { attached() {
super.attached(); super.attached();
if (!this.rule) { return; } // Check needed for test purposes. if (!this.rule) { return; } // Check needed for test purposes.

View File

@ -30,6 +30,7 @@
* @appliesMixin Gerrit.PathListMixin * @appliesMixin Gerrit.PathListMixin
* @appliesMixin Gerrit.RESTClientMixin * @appliesMixin Gerrit.RESTClientMixin
* @appliesMixin Gerrit.URLEncodingMixin * @appliesMixin Gerrit.URLEncodingMixin
* @extends Polymer.Element
*/ */
class GrChangeListItem extends Polymer.mixinBehaviors( [ class GrChangeListItem extends Polymer.mixinBehaviors( [
Gerrit.BaseUrlBehavior, Gerrit.BaseUrlBehavior,
@ -74,6 +75,7 @@
}; };
} }
/** @override */
attached() { attached() {
super.attached(); super.attached();
Gerrit.awaitPluginsLoaded().then(() => { Gerrit.awaitPluginsLoaded().then(() => {

View File

@ -33,6 +33,7 @@
* @appliesMixin Gerrit.BaseUrlMixin * @appliesMixin Gerrit.BaseUrlMixin
* @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.FireMixin
* @appliesMixin Gerrit.URLEncodingMixin * @appliesMixin Gerrit.URLEncodingMixin
* @extends Polymer.Element
*/ */
class GrChangeListView extends Polymer.mixinBehaviors( [ class GrChangeListView extends Polymer.mixinBehaviors( [
Gerrit.BaseUrlBehavior, Gerrit.BaseUrlBehavior,
@ -133,6 +134,7 @@
}; };
} }
/** @override */
created() { created() {
super.created(); super.created();
this.addEventListener('next-page', this.addEventListener('next-page',
@ -141,6 +143,7 @@
() => this._handlePreviousPage()); () => this._handlePreviousPage());
} }
/** @override */
attached() { attached() {
super.attached(); super.attached();
this._loadPreferences(); this._loadPreferences();

View File

@ -29,6 +29,7 @@
* @appliesMixin Gerrit.KeyboardShortcutMixin * @appliesMixin Gerrit.KeyboardShortcutMixin
* @appliesMixin Gerrit.RESTClientMixin * @appliesMixin Gerrit.RESTClientMixin
* @appliesMixin Gerrit.URLEncodingMixin * @appliesMixin Gerrit.URLEncodingMixin
* @extends Polymer.Element
*/ */
class GrChangeList extends Polymer.mixinBehaviors( [ class GrChangeList extends Polymer.mixinBehaviors( [
Gerrit.BaseUrlBehavior, Gerrit.BaseUrlBehavior,
@ -135,17 +136,20 @@
}; };
} }
/** @override */
created() { created() {
super.created(); super.created();
this.addEventListener('keydown', this.addEventListener('keydown',
e => this._scopedKeydownHandler(e)); e => this._scopedKeydownHandler(e));
} }
/** @override */
ready() { ready() {
super.ready(); super.ready();
this._ensureAttribute('tabindex', 0); this._ensureAttribute('tabindex', 0);
} }
/** @override */
attached() { attached() {
super.attached(); super.attached();
Gerrit.awaitPluginsLoaded().then(() => { Gerrit.awaitPluginsLoaded().then(() => {

View File

@ -17,6 +17,7 @@
(function() { (function() {
'use strict'; 'use strict';
/** @extends Polymer.Element */
class GrCreateChangeHelp extends Polymer.GestureEventListeners( class GrCreateChangeHelp extends Polymer.GestureEventListeners(
Polymer.LegacyElementMixin( Polymer.LegacyElementMixin(
Polymer.Element)) { Polymer.Element)) {

View File

@ -23,6 +23,7 @@
PUSH_PREFIX: 'git push origin HEAD:refs/for/', PUSH_PREFIX: 'git push origin HEAD:refs/for/',
}; };
/** @extends Polymer.Element */
class GrCreateCommandsDialog extends Polymer.GestureEventListeners( class GrCreateCommandsDialog extends Polymer.GestureEventListeners(
Polymer.LegacyElementMixin( Polymer.LegacyElementMixin(
Polymer.Element)) { Polymer.Element)) {

View File

@ -22,6 +22,7 @@
* name and the branch name. * name and the branch name.
* *
* @event confirm * @event confirm
* @extends Polymer.Element
*/ */
class GrCreateDestinationDialog extends Polymer.GestureEventListeners( class GrCreateDestinationDialog extends Polymer.GestureEventListeners(
Polymer.LegacyElementMixin( Polymer.LegacyElementMixin(

View File

@ -22,6 +22,7 @@
/** /**
* @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.FireMixin
* @appliesMixin Gerrit.RESTClientMixin * @appliesMixin Gerrit.RESTClientMixin
* @extends Polymer.Element
*/ */
class GrDashboardView extends Polymer.mixinBehaviors( [ class GrDashboardView extends Polymer.mixinBehaviors( [
Gerrit.FireBehavior, Gerrit.FireBehavior,
@ -94,6 +95,7 @@
); );
} }
/** @override */
attached() { attached() {
super.attached(); super.attached();
this._loadPreferences(); this._loadPreferences();

View File

@ -17,6 +17,7 @@
(function() { (function() {
'use strict'; 'use strict';
/** @extends Polymer.Element */
class GrEmbedDashboard extends Polymer.GestureEventListeners( class GrEmbedDashboard extends Polymer.GestureEventListeners(
Polymer.LegacyElementMixin( Polymer.LegacyElementMixin(
Polymer.Element)) { Polymer.Element)) {

View File

@ -17,6 +17,7 @@
(function() { (function() {
'use strict'; 'use strict';
/** @extends Polymer.Element */
class GrRepoHeader extends Polymer.GestureEventListeners( class GrRepoHeader extends Polymer.GestureEventListeners(
Polymer.LegacyElementMixin( Polymer.LegacyElementMixin(
Polymer.Element)) { Polymer.Element)) {

View File

@ -17,6 +17,9 @@
(function() { (function() {
'use strict'; 'use strict';
/**
* @extends Polymer.Element
*/
class GrUserHeader extends Polymer.GestureEventListeners( class GrUserHeader extends Polymer.GestureEventListeners(
Polymer.LegacyElementMixin( Polymer.LegacyElementMixin(
Polymer.Element)) { Polymer.Element)) {

View File

@ -196,6 +196,7 @@
* @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.FireMixin
* @appliesMixin Gerrit.PatchSetMixin * @appliesMixin Gerrit.PatchSetMixin
* @appliesMixin Gerrit.RESTClientMixin * @appliesMixin Gerrit.RESTClientMixin
* @extends Polymer.Element
*/ */
class GrChangeActions extends Polymer.mixinBehaviors( [ class GrChangeActions extends Polymer.mixinBehaviors( [
Gerrit.FireBehavior, Gerrit.FireBehavior,
@ -432,6 +433,7 @@
]; ];
} }
/** @override */
created() { created() {
super.created(); super.created();
this.addEventListener('fullscreen-overlay-opened', this.addEventListener('fullscreen-overlay-opened',
@ -440,6 +442,7 @@
() => this._handleShowBackgroundContent()); () => this._handleShowBackgroundContent());
} }
/** @override */
ready() { ready() {
super.ready(); super.ready();
this.$.jsAPI.addElement(this.$.jsAPI.Element.CHANGE_ACTIONS, this); this.$.jsAPI.addElement(this.$.jsAPI.Element.CHANGE_ACTIONS, this);

View File

@ -50,6 +50,7 @@
/** /**
* @appliesMixin Gerrit.RESTClientMixin * @appliesMixin Gerrit.RESTClientMixin
* @extends Polymer.Element
*/ */
class GrChangeMetadata extends Polymer.mixinBehaviors( [ class GrChangeMetadata extends Polymer.mixinBehaviors( [
Gerrit.RESTClientBehavior, Gerrit.RESTClientBehavior,

View File

@ -19,6 +19,7 @@
/** /**
* @appliesMixin Gerrit.RESTClientMixin * @appliesMixin Gerrit.RESTClientMixin
* @extends Polymer.Element
*/ */
class GrChangeRequirements extends Polymer.mixinBehaviors( [ class GrChangeRequirements extends Polymer.mixinBehaviors( [
Gerrit.RESTClientBehavior, Gerrit.RESTClientBehavior,

View File

@ -68,6 +68,7 @@
* @appliesMixin Gerrit.KeyboardShortcutMixin * @appliesMixin Gerrit.KeyboardShortcutMixin
* @appliesMixin Gerrit.PatchSetMixin * @appliesMixin Gerrit.PatchSetMixin
* @appliesMixin Gerrit.RESTClientMixin * @appliesMixin Gerrit.RESTClientMixin
* @extends Polymer.Element
*/ */
class GrChangeView extends Polymer.mixinBehaviors( [ class GrChangeView extends Polymer.mixinBehaviors( [
Gerrit.FireBehavior, Gerrit.FireBehavior,
@ -324,6 +325,7 @@
}; };
} }
/** @override */
created() { created() {
super.created(); super.created();
@ -346,6 +348,7 @@
() => this._handleReloadCommentThreads()); () => this._handleReloadCommentThreads());
} }
/** @override */
attached() { attached() {
super.attached(); super.attached();
this._getServerConfig().then(config => { this._getServerConfig().then(config => {
@ -391,6 +394,7 @@
this.listen(document, 'visibilitychange', '_handleVisibilityChange'); this.listen(document, 'visibilitychange', '_handleVisibilityChange');
} }
/** @override */
detached() { detached() {
super.detached(); super.detached();
this.unlisten(window, 'scroll', '_handleScroll'); this.unlisten(window, 'scroll', '_handleScroll');

View File

@ -21,6 +21,7 @@
* @appliesMixin Gerrit.BaseUrlMixin * @appliesMixin Gerrit.BaseUrlMixin
* @appliesMixin Gerrit.PathListMixin * @appliesMixin Gerrit.PathListMixin
* @appliesMixin Gerrit.URLEncodingMixin * @appliesMixin Gerrit.URLEncodingMixin
* @extends Polymer.Element
*/ */
class GrCommentList extends Polymer.mixinBehaviors( [ class GrCommentList extends Polymer.mixinBehaviors( [
Gerrit.BaseUrlBehavior, Gerrit.BaseUrlBehavior,

View File

@ -17,6 +17,7 @@
(function() { (function() {
'use strict'; 'use strict';
/** @extends Polymer.Element */
class GrCommitInfo extends Polymer.GestureEventListeners( class GrCommitInfo extends Polymer.GestureEventListeners(
Polymer.LegacyElementMixin( Polymer.LegacyElementMixin(
Polymer.Element)) { Polymer.Element)) {

View File

@ -20,6 +20,7 @@
/** /**
* @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.FireMixin
* @appliesMixin Gerrit.KeyboardShortcutMixin * @appliesMixin Gerrit.KeyboardShortcutMixin
* @extends Polymer.Element
*/ */
class GrConfirmAbandonDialog extends Polymer.mixinBehaviors( [ class GrConfirmAbandonDialog extends Polymer.mixinBehaviors( [
Gerrit.FireBehavior, Gerrit.FireBehavior,

View File

@ -19,6 +19,7 @@
/** /**
* @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.FireMixin
* @extends Polymer.Element
*/ */
class GrConfirmCherrypickConflictDialog extends Polymer.mixinBehaviors( [ class GrConfirmCherrypickConflictDialog extends Polymer.mixinBehaviors( [
Gerrit.FireBehavior, Gerrit.FireBehavior,

View File

@ -21,6 +21,7 @@
/** /**
* @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.FireMixin
* @extends Polymer.Element
*/ */
class GrConfirmCherrypickDialog extends Polymer.mixinBehaviors( [ class GrConfirmCherrypickDialog extends Polymer.mixinBehaviors( [
Gerrit.FireBehavior, Gerrit.FireBehavior,

View File

@ -21,6 +21,7 @@
/** /**
* @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.FireMixin
* @extends Polymer.Element
*/ */
class GrConfirmMoveDialog extends Polymer.mixinBehaviors( [ class GrConfirmMoveDialog extends Polymer.mixinBehaviors( [
Gerrit.FireBehavior, Gerrit.FireBehavior,

View File

@ -17,6 +17,7 @@
(function() { (function() {
'use strict'; 'use strict';
/** @extends Polymer.Element */
class GrConfirmRebaseDialog extends Polymer.GestureEventListeners( class GrConfirmRebaseDialog extends Polymer.GestureEventListeners(
Polymer.LegacyElementMixin( Polymer.LegacyElementMixin(
Polymer.Element)) { Polymer.Element)) {

View File

@ -22,6 +22,7 @@
/** /**
* @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.FireMixin
* @extends Polymer.Element
*/ */
class GrConfirmRevertDialog extends Polymer.mixinBehaviors( [ class GrConfirmRevertDialog extends Polymer.mixinBehaviors( [
Gerrit.FireBehavior, Gerrit.FireBehavior,

View File

@ -23,6 +23,7 @@
/** /**
* @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.FireMixin
* @extends Polymer.Element
*/ */
class GrConfirmRevertSubmissionDialog extends Polymer.mixinBehaviors( [ class GrConfirmRevertSubmissionDialog extends Polymer.mixinBehaviors( [
Gerrit.FireBehavior, Gerrit.FireBehavior,

View File

@ -17,6 +17,7 @@
(function() { (function() {
'use strict'; 'use strict';
/** @extends Polymer.Element */
class GrConfirmSubmitDialog extends Polymer.GestureEventListeners( class GrConfirmSubmitDialog extends Polymer.GestureEventListeners(
Polymer.LegacyElementMixin( Polymer.LegacyElementMixin(
Polymer.Element)) { Polymer.Element)) {

View File

@ -21,6 +21,7 @@
* @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.FireMixin
* @appliesMixin Gerrit.PatchSetMixin * @appliesMixin Gerrit.PatchSetMixin
* @appliesMixin Gerrit.RESTClientMixin * @appliesMixin Gerrit.RESTClientMixin
* @extends Polymer.Element
*/ */
class GrDownloadDialog extends Polymer.mixinBehaviors( [ class GrDownloadDialog extends Polymer.mixinBehaviors( [
Gerrit.FireBehavior, Gerrit.FireBehavior,
@ -54,6 +55,7 @@
}; };
} }
/** @override */
ready() { ready() {
super.ready(); super.ready();
this._ensureAttribute('role', 'dialog'); this._ensureAttribute('role', 'dialog');

View File

@ -24,6 +24,7 @@
/** /**
* @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.FireMixin
* @appliesMixin Gerrit.PatchSetMixin * @appliesMixin Gerrit.PatchSetMixin
* @extends Polymer.Element
*/ */
class GrFileListHeader extends Polymer.mixinBehaviors( [ class GrFileListHeader extends Polymer.mixinBehaviors( [
Gerrit.FireBehavior, Gerrit.FireBehavior,

View File

@ -48,6 +48,7 @@
* @appliesMixin Gerrit.KeyboardShortcutMixin * @appliesMixin Gerrit.KeyboardShortcutMixin
* @appliesMixin Gerrit.PatchSetMixin * @appliesMixin Gerrit.PatchSetMixin
* @appliesMixin Gerrit.PathListMixin * @appliesMixin Gerrit.PathListMixin
* @extends Polymer.Element
*/ */
class GrFileList extends Polymer.mixinBehaviors( [ class GrFileList extends Polymer.mixinBehaviors( [
Gerrit.AsyncForeachBehavior, Gerrit.AsyncForeachBehavior,
@ -236,12 +237,14 @@
}; };
} }
/** @override */
created() { created() {
super.created(); super.created();
this.addEventListener('keydown', this.addEventListener('keydown',
e => this._scopedKeydownHandler(e)); e => this._scopedKeydownHandler(e));
} }
/** @override */
attached() { attached() {
super.attached(); super.attached();
Gerrit.awaitPluginsLoaded().then(() => { Gerrit.awaitPluginsLoaded().then(() => {
@ -265,6 +268,7 @@
}); });
} }
/** @override */
detached() { detached() {
super.detached(); super.detached();
this._cancelDiffs(); this._cancelDiffs();

View File

@ -19,6 +19,7 @@
/** /**
* @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.FireMixin
* @extends Polymer.Element
*/ */
class GrIncludedInDialog extends Polymer.mixinBehaviors( [ class GrIncludedInDialog extends Polymer.mixinBehaviors( [
Gerrit.FireBehavior, Gerrit.FireBehavior,

View File

@ -17,6 +17,7 @@
(function() { (function() {
'use strict'; 'use strict';
/** @extends Polymer.Element */
class GrLabelScoreRow extends Polymer.GestureEventListeners( class GrLabelScoreRow extends Polymer.GestureEventListeners(
Polymer.LegacyElementMixin( Polymer.LegacyElementMixin(
Polymer.Element)) { Polymer.Element)) {

View File

@ -17,6 +17,7 @@
(function() { (function() {
'use strict'; 'use strict';
/** @extends Polymer.Element */
class GrLabelScores extends Polymer.GestureEventListeners( class GrLabelScores extends Polymer.GestureEventListeners(
Polymer.LegacyElementMixin( Polymer.LegacyElementMixin(
Polymer.Element)) { Polymer.Element)) {

View File

@ -22,6 +22,7 @@
/** /**
* @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.FireMixin
* @extends Polymer.Element
*/ */
class GrMessage extends Polymer.mixinBehaviors( [ class GrMessage extends Polymer.mixinBehaviors( [
Gerrit.FireBehavior, Gerrit.FireBehavior,
@ -113,12 +114,14 @@
]; ];
} }
/** @override */
created() { created() {
super.created(); super.created();
this.addEventListener('click', this.addEventListener('click',
e => this._handleClick(e)); e => this._handleClick(e));
} }
/** @override */
ready() { ready() {
super.ready(); super.ready();
this.$.restAPI.getConfig().then(config => { this.$.restAPI.getConfig().then(config => {

View File

@ -25,6 +25,7 @@
SHOW_MORE: 'show-more-messages', SHOW_MORE: 'show-more-messages',
}; };
/** @extends Polymer.Element */
class GrMessagesList extends Polymer.GestureEventListeners( class GrMessagesList extends Polymer.GestureEventListeners(
Polymer.LegacyElementMixin( Polymer.LegacyElementMixin(
Polymer.Element)) { Polymer.Element)) {

View File

@ -21,6 +21,7 @@
* @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.FireMixin
* @appliesMixin Gerrit.PatchSetMixin * @appliesMixin Gerrit.PatchSetMixin
* @appliesMixin Gerrit.RESTClientMixin * @appliesMixin Gerrit.RESTClientMixin
* @extends Polymer.Element
*/ */
class GrRelatedChangesList extends Polymer.mixinBehaviors( [ class GrRelatedChangesList extends Polymer.mixinBehaviors( [
Gerrit.FireBehavior, Gerrit.FireBehavior,

View File

@ -58,6 +58,7 @@
* @appliesMixin Gerrit.KeyboardShortcutMixin * @appliesMixin Gerrit.KeyboardShortcutMixin
* @appliesMixin Gerrit.PatchSetMixin * @appliesMixin Gerrit.PatchSetMixin
* @appliesMixin Gerrit.RESTClientMixin * @appliesMixin Gerrit.RESTClientMixin
* @extends Polymer.Element
*/ */
class GrReplyDialog extends Polymer.mixinBehaviors( [ class GrReplyDialog extends Polymer.mixinBehaviors( [
Gerrit.BaseUrlBehavior, Gerrit.BaseUrlBehavior,
@ -249,6 +250,7 @@
]; ];
} }
/** @override */
attached() { attached() {
super.attached(); super.attached();
this._getAccount().then(account => { this._getAccount().then(account => {
@ -256,6 +258,7 @@
}); });
} }
/** @override */
ready() { ready() {
super.ready(); super.ready();
this.$.jsAPI.addElement(this.$.jsAPI.Element.REPLY_DIALOG, this); this.$.jsAPI.addElement(this.$.jsAPI.Element.REPLY_DIALOG, this);

View File

@ -19,6 +19,7 @@
/** /**
* @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.FireMixin
* @extends Polymer.Element
*/ */
class GrReviewerList extends Polymer.mixinBehaviors( [ class GrReviewerList extends Polymer.mixinBehaviors( [
Gerrit.FireBehavior, Gerrit.FireBehavior,

View File

@ -21,6 +21,7 @@
* Fired when a comment is saved or deleted * Fired when a comment is saved or deleted
* *
* @event thread-list-modified * @event thread-list-modified
* @extends Polymer.Element
*/ */
class GrThreadList extends Polymer.GestureEventListeners( class GrThreadList extends Polymer.GestureEventListeners(
Polymer.LegacyElementMixin( Polymer.LegacyElementMixin(

View File

@ -29,6 +29,7 @@
/** /**
* @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.FireMixin
* @extends Polymer.Element
*/ */
class GrUploadHelpDialog extends Polymer.mixinBehaviors( [ class GrUploadHelpDialog extends Polymer.mixinBehaviors( [
Gerrit.FireBehavior, Gerrit.FireBehavior,
@ -65,6 +66,7 @@
}; };
} }
/** @override */
attached() { attached() {
super.attached(); super.attached();
this.$.restAPI.getLoggedIn() this.$.restAPI.getLoggedIn()

View File

@ -21,6 +21,7 @@
/** /**
* @appliesMixin Gerrit.DisplayNameMixin * @appliesMixin Gerrit.DisplayNameMixin
* @extends Polymer.Element
*/ */
class GrAccountDropdown extends Polymer.mixinBehaviors( [ class GrAccountDropdown extends Polymer.mixinBehaviors( [
Gerrit.DisplayNameBehavior, Gerrit.DisplayNameBehavior,
@ -50,6 +51,7 @@
}; };
} }
/** @override */
attached() { attached() {
super.attached(); super.attached();
this._handleLocationChange(); this._handleLocationChange();
@ -66,6 +68,7 @@
}); });
} }
/** @override */
detached() { detached() {
super.detached(); super.detached();
this.unlisten(window, 'location-change', '_handleLocationChange'); this.unlisten(window, 'location-change', '_handleLocationChange');

View File

@ -17,6 +17,7 @@
(function() { (function() {
'use strict'; 'use strict';
/** @extends Polymer.Element */
class GrErrorDialog extends Polymer.GestureEventListeners( class GrErrorDialog extends Polymer.GestureEventListeners(
Polymer.LegacyElementMixin( Polymer.LegacyElementMixin(
Polymer.Element)) { Polymer.Element)) {

View File

@ -28,6 +28,7 @@
/** /**
* @appliesMixin Gerrit.BaseUrlMixin * @appliesMixin Gerrit.BaseUrlMixin
* @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.FireMixin
* @extends Polymer.Element
*/ */
class GrErrorManager extends Polymer.mixinBehaviors( [ class GrErrorManager extends Polymer.mixinBehaviors( [
Gerrit.BaseUrlBehavior, Gerrit.BaseUrlBehavior,
@ -74,6 +75,7 @@
this._authErrorHandlerDeregistrationHook; this._authErrorHandlerDeregistrationHook;
} }
/** @override */
attached() { attached() {
super.attached(); super.attached();
this.listen(document, 'server-error', '_handleServerError'); this.listen(document, 'server-error', '_handleServerError');
@ -89,6 +91,7 @@
}); });
} }
/** @override */
detached() { detached() {
super.detached(); super.detached();
this._clearHideAlertHandle(); this._clearHideAlertHandle();

View File

@ -17,6 +17,7 @@
(function() { (function() {
'use strict'; 'use strict';
/** @extends Polymer.Element */
class GrKeyBindingDisplay extends Polymer.GestureEventListeners( class GrKeyBindingDisplay extends Polymer.GestureEventListeners(
Polymer.LegacyElementMixin( Polymer.LegacyElementMixin(
Polymer.Element)) { Polymer.Element)) {

View File

@ -22,6 +22,7 @@
/** /**
* @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.FireMixin
* @appliesMixin Gerrit.KeyboardShortcutMixin * @appliesMixin Gerrit.KeyboardShortcutMixin
* @extends Polymer.Element
*/ */
class GrKeyboardShortcutsDialog extends Polymer.mixinBehaviors( [ class GrKeyboardShortcutsDialog extends Polymer.mixinBehaviors( [
Gerrit.FireBehavior, Gerrit.FireBehavior,
@ -59,17 +60,20 @@
}; };
} }
/** @override */
ready() { ready() {
super.ready(); super.ready();
this._ensureAttribute('role', 'dialog'); this._ensureAttribute('role', 'dialog');
} }
/** @override */
attached() { attached() {
super.attached(); super.attached();
this.addKeyboardShortcutDirectoryListener( this.addKeyboardShortcutDirectoryListener(
this._onDirectoryUpdated.bind(this)); this._onDirectoryUpdated.bind(this));
} }
/** @override */
detached() { detached() {
super.detached(); super.detached();
this.removeKeyboardShortcutDirectoryListener( this.removeKeyboardShortcutDirectoryListener(

View File

@ -74,6 +74,7 @@
* @appliesMixin Gerrit.BaseUrlMixin * @appliesMixin Gerrit.BaseUrlMixin
* @appliesMixin Gerrit.DocsUrlMixin * @appliesMixin Gerrit.DocsUrlMixin
* @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.FireMixin
* @extends Polymer.Element
*/ */
class GrMainHeader extends Polymer.mixinBehaviors( [ class GrMainHeader extends Polymer.mixinBehaviors( [
Gerrit.AdminNavBehavior, Gerrit.AdminNavBehavior,
@ -150,11 +151,13 @@
]; ];
} }
/** @override */
ready() { ready() {
super.ready(); super.ready();
this._ensureAttribute('role', 'banner'); this._ensureAttribute('role', 'banner');
} }
/** @override */
attached() { attached() {
super.attached(); super.attached();
this._loadAccount(); this._loadAccount();
@ -162,6 +165,7 @@
this.listen(window, 'location-change', '_handleLocationChange'); this.listen(window, 'location-change', '_handleLocationChange');
} }
/** @override */
detached() { detached() {
super.detached(); super.detached();
this.unlisten(window, 'location-change', '_handleLocationChange'); this.unlisten(window, 'location-change', '_handleLocationChange');

View File

@ -214,6 +214,7 @@
* @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.FireMixin
* @appliesMixin Gerrit.PatchSetMixin * @appliesMixin Gerrit.PatchSetMixin
* @appliesMixin Gerrit.URLEncodingMixin * @appliesMixin Gerrit.URLEncodingMixin
* @extends Polymer.Element
*/ */
class GrRouter extends Polymer.mixinBehaviors( [ class GrRouter extends Polymer.mixinBehaviors( [
Gerrit.BaseUrlBehavior, Gerrit.BaseUrlBehavior,

View File

@ -107,6 +107,7 @@
/** /**
* @appliesMixin Gerrit.KeyboardShortcutMixin * @appliesMixin Gerrit.KeyboardShortcutMixin
* @appliesMixin Gerrit.URLEncodingMixin * @appliesMixin Gerrit.URLEncodingMixin
* @extends Polymer.Element
*/ */
class GrSearchBar extends Polymer.mixinBehaviors( [ class GrSearchBar extends Polymer.mixinBehaviors( [
Gerrit.KeyboardShortcutBehavior, Gerrit.KeyboardShortcutBehavior,

View File

@ -23,6 +23,7 @@
/** /**
* @appliesMixin Gerrit.DisplayNameMixin * @appliesMixin Gerrit.DisplayNameMixin
* @extends Polymer.Element
*/ */
class GrSmartSearch extends Polymer.mixinBehaviors( [ class GrSmartSearch extends Polymer.mixinBehaviors( [
Gerrit.DisplayNameBehavior, Gerrit.DisplayNameBehavior,
@ -56,6 +57,7 @@
}; };
} }
/** @override */
attached() { attached() {
super.attached(); super.attached();
this.$.restAPI.getConfig().then(cfg => { this.$.restAPI.getConfig().then(cfg => {

View File

@ -466,6 +466,7 @@
/** /**
* @appliesMixin Gerrit.PatchSetMixin * @appliesMixin Gerrit.PatchSetMixin
* @extends Polymer.Element
*/ */
class GrCommentApi extends Polymer.mixinBehaviors( [ class GrCommentApi extends Polymer.mixinBehaviors( [
Gerrit.PatchSetBehavior, Gerrit.PatchSetBehavior,
@ -480,6 +481,7 @@
}; };
} }
/** @override */
created() { created() {
super.created(); super.created();
this.addEventListener('reload-drafts', this.addEventListener('reload-drafts',

View File

@ -24,6 +24,7 @@
[Gerrit.CoverageType.NOT_INSTRUMENTED, 'Not instrumented by any tests.'], [Gerrit.CoverageType.NOT_INSTRUMENTED, 'Not instrumented by any tests.'],
]); ]);
/** @extends Polymer.Element */
class GrCoverageLayer extends Polymer.GestureEventListeners( class GrCoverageLayer extends Polymer.GestureEventListeners(
Polymer.LegacyElementMixin( Polymer.LegacyElementMixin(
Polymer.Element)) { Polymer.Element)) {

View File

@ -35,6 +35,7 @@
const LEFT_SIDE_CLASS = 'target-side-left'; const LEFT_SIDE_CLASS = 'target-side-left';
const RIGHT_SIDE_CLASS = 'target-side-right'; const RIGHT_SIDE_CLASS = 'target-side-right';
/** @extends Polymer.Element */
class GrDiffCursor extends Polymer.mixinBehaviors([Gerrit.FireBehavior], class GrDiffCursor extends Polymer.mixinBehaviors([Gerrit.FireBehavior],
Polymer.GestureEventListeners( Polymer.GestureEventListeners(
Polymer.LegacyElementMixin(Polymer.Element))) { Polymer.LegacyElementMixin(Polymer.Element))) {
@ -105,6 +106,7 @@
]; ];
} }
/** @override */
ready() { ready() {
super.ready(); super.ready();
Polymer.RenderStatus.afterNextRender(this, () => { Polymer.RenderStatus.afterNextRender(this, () => {
@ -122,12 +124,14 @@
}); });
} }
/** @override */
attached() { attached() {
super.attached(); super.attached();
// Catch when users are scrolling as the view loads. // Catch when users are scrolling as the view loads.
this.listen(window, 'scroll', '_handleWindowScroll'); this.listen(window, 'scroll', '_handleWindowScroll');
} }
/** @override */
detached() { detached() {
super.detached(); super.detached();
this.unlisten(window, 'scroll', '_handleWindowScroll'); this.unlisten(window, 'scroll', '_handleWindowScroll');

View File

@ -19,6 +19,7 @@
/** /**
* @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.FireMixin
* @extends Polymer.Element
*/ */
class GrDiffHighlight extends Polymer.mixinBehaviors( [ class GrDiffHighlight extends Polymer.mixinBehaviors( [
Gerrit.FireBehavior, Gerrit.FireBehavior,
@ -57,6 +58,7 @@
}; };
} }
/** @override */
created() { created() {
super.created(); super.created();
this.addEventListener('comment-thread-mouseleave', this.addEventListener('comment-thread-mouseleave',

View File

@ -77,6 +77,8 @@
* *
* Webcomponent fetching diffs and related data from restAPI and passing them * Webcomponent fetching diffs and related data from restAPI and passing them
* to the presentational gr-diff for rendering. * to the presentational gr-diff for rendering.
*
* @extends Polymer.Element
*/ */
class GrDiffHost extends Polymer.mixinBehaviors( [ class GrDiffHost extends Polymer.mixinBehaviors( [
Gerrit.FireBehavior, Gerrit.FireBehavior,
@ -249,6 +251,7 @@
]; ];
} }
/** @override */
created() { created() {
super.created(); super.created();
this.addEventListener( this.addEventListener(
@ -276,6 +279,7 @@
event => this._handleDiffContextExpanded(event)); event => this._handleDiffContextExpanded(event));
} }
/** @override */
ready() { ready() {
super.ready(); super.ready();
if (this._canReload()) { if (this._canReload()) {
@ -283,6 +287,7 @@
} }
} }
/** @override */
attached() { attached() {
super.attached(); super.attached();
this._getLoggedIn().then(loggedIn => { this._getLoggedIn().then(loggedIn => {

View File

@ -17,6 +17,7 @@
(function() { (function() {
'use strict'; 'use strict';
/** @extends Polymer.Element */
class GrDiffModeSelector extends Polymer.GestureEventListeners( class GrDiffModeSelector extends Polymer.GestureEventListeners(
Polymer.LegacyElementMixin( Polymer.LegacyElementMixin(
Polymer.Element)) { Polymer.Element)) {

View File

@ -19,6 +19,7 @@
/** /**
* @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.FireMixin
* @extends Polymer.Element
*/ */
class GrDiffPreferencesDialog extends Polymer.mixinBehaviors( [ class GrDiffPreferencesDialog extends Polymer.mixinBehaviors( [
Gerrit.FireBehavior, Gerrit.FireBehavior,

View File

@ -63,6 +63,8 @@
* "expand context" widget. This may require splitting a chunk/group so * "expand context" widget. This may require splitting a chunk/group so
* that the part that is within the context or has comments is shown, while * that the part that is within the context or has comments is shown, while
* the rest is not. * the rest is not.
*
* @extends Polymer.Element
*/ */
class GrDiffProcessor extends Polymer.GestureEventListeners( class GrDiffProcessor extends Polymer.GestureEventListeners(
Polymer.LegacyElementMixin( Polymer.LegacyElementMixin(
@ -119,11 +121,13 @@
}; };
} }
/** @override */
attached() { attached() {
super.attached(); super.attached();
this.listen(window, 'scroll', '_handleWindowScroll'); this.listen(window, 'scroll', '_handleWindowScroll');
} }
/** @override */
detached() { detached() {
super.detached(); super.detached();
this.cancel(); this.cancel();

View File

@ -32,6 +32,7 @@
/** /**
* @appliesMixin Gerrit.DomUtilMixin * @appliesMixin Gerrit.DomUtilMixin
* @extends Polymer.Element
*/ */
class GrDiffSelection extends Polymer.mixinBehaviors( [ class GrDiffSelection extends Polymer.mixinBehaviors( [
Gerrit.DomUtilBehavior, Gerrit.DomUtilBehavior,
@ -58,6 +59,7 @@
]; ];
} }
/** @override */
created() { created() {
super.created(); super.created();
this.addEventListener('copy', this.addEventListener('copy',
@ -66,6 +68,7 @@
e => this._handleDown(e)); e => this._handleDown(e));
} }
/** @override */
attached() { attached() {
super.attached(); super.attached();
this.classList.add(SelectionClass.RIGHT); this.classList.add(SelectionClass.RIGHT);

View File

@ -39,6 +39,7 @@
* @appliesMixin Gerrit.PatchSetMixin * @appliesMixin Gerrit.PatchSetMixin
* @appliesMixin Gerrit.PathListMixin * @appliesMixin Gerrit.PathListMixin
* @appliesMixin Gerrit.RESTClientMixin * @appliesMixin Gerrit.RESTClientMixin
* @extends Polymer.Element
*/ */
class GrDiffView extends Polymer.mixinBehaviors( [ class GrDiffView extends Polymer.mixinBehaviors( [
Gerrit.FireBehavior, Gerrit.FireBehavior,
@ -244,6 +245,7 @@
}; };
} }
/** @override */
attached() { attached() {
super.attached(); super.attached();
this._getLoggedIn().then(loggedIn => { this._getLoggedIn().then(loggedIn => {

View File

@ -94,6 +94,7 @@
/** /**
* @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.FireMixin
* @appliesMixin Gerrit.PatchSetMixin * @appliesMixin Gerrit.PatchSetMixin
* @extends Polymer.Element
*/ */
class GrDiff extends Polymer.mixinBehaviors( [ class GrDiff extends Polymer.mixinBehaviors( [
Gerrit.FireBehavior, Gerrit.FireBehavior,
@ -284,6 +285,7 @@
]; ];
} }
/** @override */
created() { created() {
super.created(); super.created();
this.addEventListener('create-range-comment', this.addEventListener('create-range-comment',
@ -292,11 +294,13 @@
() => this._handleRenderContent()); () => this._handleRenderContent());
} }
/** @override */
attached() { attached() {
super.attached(); super.attached();
this._observeNodes(); this._observeNodes();
} }
/** @override */
detached() { detached() {
super.detached(); super.detached();
this._unobserveIncrementalNodes(); this._unobserveIncrementalNodes();

View File

@ -30,6 +30,7 @@
* *
* @property {string} patchNum * @property {string} patchNum
* @property {string} basePatchNum * @property {string} basePatchNum
* @extends Polymer.Element
*/ */
class GrPatchRangeSelect extends Polymer.mixinBehaviors( [ class GrPatchRangeSelect extends Polymer.mixinBehaviors( [
Gerrit.PatchSetBehavior, Gerrit.PatchSetBehavior,

View File

@ -23,6 +23,7 @@
const RANGE_HIGHLIGHT = 'style-scope gr-diff range'; const RANGE_HIGHLIGHT = 'style-scope gr-diff range';
const HOVER_HIGHLIGHT = 'style-scope gr-diff rangeHighlight'; const HOVER_HIGHLIGHT = 'style-scope gr-diff rangeHighlight';
/** @extends Polymer.Element */
class GrRangedCommentLayer extends Polymer.GestureEventListeners( class GrRangedCommentLayer extends Polymer.GestureEventListeners(
Polymer.LegacyElementMixin( Polymer.LegacyElementMixin(
Polymer.Element)) { Polymer.Element)) {

View File

@ -19,6 +19,7 @@
/** /**
* @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.FireMixin
* @extends Polymer.Element
*/ */
class GrSelectionActionBox extends Polymer.mixinBehaviors( [ class GrSelectionActionBox extends Polymer.mixinBehaviors( [
Gerrit.FireBehavior, Gerrit.FireBehavior,
@ -42,6 +43,7 @@
}; };
} }
/** @override */
created() { created() {
super.created(); super.created();

View File

@ -131,6 +131,7 @@
const GO_BACKSLASH_LITERAL = '\'\\\\\''; const GO_BACKSLASH_LITERAL = '\'\\\\\'';
const GLOBAL_LT_PATTERN = /</g; const GLOBAL_LT_PATTERN = /</g;
/** @extends Polymer.Element */
class GrSyntaxLayer extends Polymer.GestureEventListeners( class GrSyntaxLayer extends Polymer.GestureEventListeners(
Polymer.LegacyElementMixin( Polymer.LegacyElementMixin(
Polymer.Element)) { Polymer.Element)) {

View File

@ -19,6 +19,7 @@
/** /**
* @appliesMixin Gerrit.ListViewMixin * @appliesMixin Gerrit.ListViewMixin
* @extends Polymer.Element
*/ */
class GrDocumentationSearch extends Polymer.mixinBehaviors( [ class GrDocumentationSearch extends Polymer.mixinBehaviors( [
Gerrit.ListViewBehavior, Gerrit.ListViewBehavior,
@ -55,6 +56,7 @@
}; };
} }
/** @override */
attached() { attached() {
super.attached(); super.attached();
this.dispatchEvent( this.dispatchEvent(

View File

@ -17,6 +17,7 @@
(function() { (function() {
'use strict'; 'use strict';
/** @extends Polymer.Element */
class GrDefaultEditor extends Polymer.GestureEventListeners( class GrDefaultEditor extends Polymer.GestureEventListeners(
Polymer.LegacyElementMixin( Polymer.LegacyElementMixin(
Polymer.Element)) { Polymer.Element)) {

View File

@ -19,6 +19,7 @@
/** /**
* @appliesMixin Gerrit.PatchSetMixin * @appliesMixin Gerrit.PatchSetMixin
* @extends Polymer.Element
*/ */
class GrEditControls extends Polymer.mixinBehaviors( [ class GrEditControls extends Polymer.mixinBehaviors( [
Gerrit.PatchSetBehavior, Gerrit.PatchSetBehavior,

View File

@ -17,6 +17,7 @@
(function() { (function() {
'use strict'; 'use strict';
/** @extends Polymer.Element */
class GrEditFileControls extends Polymer.GestureEventListeners( class GrEditFileControls extends Polymer.GestureEventListeners(
Polymer.LegacyElementMixin( Polymer.LegacyElementMixin(
Polymer.Element)) { Polymer.Element)) {

View File

@ -29,6 +29,7 @@
* @appliesMixin Gerrit.KeyboardShortcutMixin * @appliesMixin Gerrit.KeyboardShortcutMixin
* @appliesMixin Gerrit.PatchSetMixin * @appliesMixin Gerrit.PatchSetMixin
* @appliesMixin Gerrit.PathListMixin * @appliesMixin Gerrit.PathListMixin
* @extends Polymer.Element
*/ */
class GrEditorView extends Polymer.mixinBehaviors( [ class GrEditorView extends Polymer.mixinBehaviors( [
Gerrit.FireBehavior, Gerrit.FireBehavior,
@ -92,12 +93,14 @@
}; };
} }
/** @override */
created() { created() {
super.created(); super.created();
this.addEventListener('content-change', this.addEventListener('content-change',
e => this._handleContentChange(e)); e => this._handleContentChange(e));
} }
/** @override */
attached() { attached() {
super.attached(); super.attached();
this._getEditPrefs().then(prefs => { this._prefs = prefs; }); this._getEditPrefs().then(prefs => { this._prefs = prefs; });

View File

@ -20,6 +20,7 @@
/** /**
* @appliesMixin Gerrit.BaseUrlMixin * @appliesMixin Gerrit.BaseUrlMixin
* @appliesMixin Gerrit.KeyboardShortcutMixin * @appliesMixin Gerrit.KeyboardShortcutMixin
* @extends Polymer.Element
*/ */
class GrAppElement extends Polymer.mixinBehaviors( [ class GrAppElement extends Polymer.mixinBehaviors( [
Gerrit.BaseUrlBehavior, Gerrit.BaseUrlBehavior,
@ -114,6 +115,7 @@
}; };
} }
/** @override */
created() { created() {
super.created(); super.created();
this._bindKeyboardShortcuts(); this._bindKeyboardShortcuts();
@ -127,6 +129,7 @@
e => this._handleRpcLog(e)); e => this._handleRpcLog(e));
} }
/** @override */
ready() { ready() {
super.ready(); super.ready();
this.$.reporting.appStarted(); this.$.reporting.appStarted();

View File

@ -17,6 +17,7 @@
(function() { (function() {
'use strict'; 'use strict';
/** @extends Polymer.Element */
class GrApp extends Polymer.GestureEventListeners( class GrApp extends Polymer.GestureEventListeners(
Polymer.LegacyElementMixin( Polymer.LegacyElementMixin(
Polymer.Element)) { Polymer.Element)) {

View File

@ -41,6 +41,7 @@
return this._hooks[hookName]; return this._hooks[hookName];
}; };
/** @constructor */
function GrDomHook(hookName, opt_moduleName) { function GrDomHook(hookName, opt_moduleName) {
this._instances = []; this._instances = [];
this._callbacks = []; this._callbacks = [];

View File

@ -19,6 +19,7 @@
const INIT_PROPERTIES_TIMEOUT_MS = 10000; const INIT_PROPERTIES_TIMEOUT_MS = 10000;
/** @extends Polymer.Element */
class GrEndpointDecorator extends Polymer.GestureEventListeners( class GrEndpointDecorator extends Polymer.GestureEventListeners(
Polymer.LegacyElementMixin( Polymer.LegacyElementMixin(
Polymer.Element)) { Polymer.Element)) {
@ -46,6 +47,7 @@
}; };
} }
/** @override */
detached() { detached() {
super.detached(); super.detached();
for (const [el, domHook] of this._domHooks) { for (const [el, domHook] of this._domHooks) {
@ -145,6 +147,7 @@
}); });
} }
/** @override */
ready() { ready() {
super.ready(); super.ready();
Gerrit._endpoints.onNewEndpoint(this.name, this._initModule.bind(this)); Gerrit._endpoints.onNewEndpoint(this.name, this._initModule.bind(this));

View File

@ -17,6 +17,7 @@
(function() { (function() {
'use strict'; 'use strict';
/** @extends Polymer.Element */
class GrEndpointParam extends Polymer.GestureEventListeners( class GrEndpointParam extends Polymer.GestureEventListeners(
Polymer.LegacyElementMixin( Polymer.LegacyElementMixin(
Polymer.Element)) { Polymer.Element)) {

View File

@ -17,6 +17,7 @@
(function() { (function() {
'use strict'; 'use strict';
/** @extends Polymer.Element */
class GrExternalStyle extends Polymer.GestureEventListeners( class GrExternalStyle extends Polymer.GestureEventListeners(
Polymer.LegacyElementMixin( Polymer.LegacyElementMixin(
Polymer.Element)) { Polymer.Element)) {
@ -73,11 +74,13 @@
}); });
} }
/** @override */
attached() { attached() {
super.attached(); super.attached();
this._importAndApply(); this._importAndApply();
} }
/** @override */
ready() { ready() {
super.ready(); super.ready();
Gerrit.awaitPluginsLoaded().then(() => this._importAndApply()); Gerrit.awaitPluginsLoaded().then(() => this._importAndApply());

View File

@ -17,6 +17,7 @@
(function() { (function() {
'use strict'; 'use strict';
/** @extends Polymer.Element */
class GrPluginHost extends Polymer.GestureEventListeners( class GrPluginHost extends Polymer.GestureEventListeners(
Polymer.LegacyElementMixin( Polymer.LegacyElementMixin(
Polymer.Element)) { Polymer.Element)) {

View File

@ -17,6 +17,7 @@
(function(window) { (function(window) {
'use strict'; 'use strict';
/** @extends Polymer.Element */
class GrPluginPopup extends Polymer.GestureEventListeners( class GrPluginPopup extends Polymer.GestureEventListeners(
Polymer.LegacyElementMixin( Polymer.LegacyElementMixin(
Polymer.Element)) { Polymer.Element)) {

View File

@ -65,6 +65,7 @@ limitations under the License.
setup(() => { setup(() => {
fixture('header-title'); fixture('header-title');
stub('gr-custom-plugin-header', { stub('gr-custom-plugin-header', {
/** @override */
ready() { customHeader = this; }, ready() { customHeader = this; },
}); });
Gerrit._loadPlugins([]); Gerrit._loadPlugins([]);

Some files were not shown because too many files have changed in this diff Show More