JaroslavTulach commented on a change in pull request #3333:
URL: https://github.com/apache/netbeans/pull/3333#discussion_r758509534
##########
File path:
ide/editor.completion/src/org/netbeans/spi/editor/completion/support/CompletionUtilities.java
##########
@@ -327,5 +343,48 @@ public CompletionItem build() {
return new SimpleCompletionItem(insertText, startOffset,
endOffset, iconResource, leftHtmlText, rightHtmlText,
sortPriority, sortText, documentationTask, tooltipTask,
onSelectCallback);
}
+
+ }
+
+ /**
+ * A parameter passed to CompletionItemBuilder's onSelect callback.
+ *
+ * @since 1.60
+ */
+ public static final class OnSelectContext {
+
+ private final JTextComponent component;
+ private final boolean overwrite;
+
+ private OnSelectContext(JTextComponent component, boolean overwrite) {
+ this.component = component;
+ this.overwrite = overwrite;
+ }
+
+ /**
+ * A text component to which the completion item should be inserted.
+ *
+ * @since 1.60
+ */
+ public JTextComponent getComponent() {
Review comment:
Great, this is evolvable.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists