jenkins-bot has submitted this change and it was merged.
Change subject: Add abstract getAnnotation() method to AnnotationInspector
......................................................................
Add abstract getAnnotation() method to AnnotationInspector
It was relied on, and all subclasses had one, but for some reason
it wasn't defined as an abstract method.
Change-Id: I6d48f8ee666bd339be87744840c6edb4abb56dbf
---
M modules/ve/ui/inspectors/ve.ui.AnnotationInspector.js
1 file changed, 17 insertions(+), 0 deletions(-)
Approvals:
Esanders: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/ve/ui/inspectors/ve.ui.AnnotationInspector.js
b/modules/ve/ui/inspectors/ve.ui.AnnotationInspector.js
index 773e01f..e9b11b2 100644
--- a/modules/ve/ui/inspectors/ve.ui.AnnotationInspector.js
+++ b/modules/ve/ui/inspectors/ve.ui.AnnotationInspector.js
@@ -45,6 +45,23 @@
/* Methods */
/**
+ * Get the annotation object to apply.
+ *
+ * This method is called when the inspector is closing, and should return the
annotation to apply
+ * to the text. If this method returns a falsey value like null, no annotation
will be applied,
+ * but existing annotations won't be removed either.
+ *
+ * @abstract
+ * @returns {ve.dm.Annotation} Annotation to apply
+ * @throws {Error} If not overridden in subclass
+ */
+ve.ui.AnnotationInspector.prototype.getAnnotation = function () {
+ throw new Error(
+ 've.ui.AnnotationInspector.getAnnotation not implemented in
subclass'
+ );
+};
+
+/**
* Get an annotation object from text.
*
* @method
--
To view, visit https://gerrit.wikimedia.org/r/98112
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I6d48f8ee666bd339be87744840c6edb4abb56dbf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Catrope <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: Esanders <[email protected]>
Gerrit-Reviewer: Mooeypoo <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits