Skip to content

Commit

Permalink
Adds fqfn to file being changed
Browse files Browse the repository at this point in the history
  • Loading branch information
dingfeli committed Sep 20, 2024
1 parent 7e7f260 commit 5747767
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,11 @@ public void createPartControl(final Composite parent) {
}

QInvocationSession qInvocationSessionInstance = QInvocationSession.getInstance();

qInvocationSessionInstance.registerCallbackForCodeReference((item, startLine) -> {
var references = item.getReferences();
var editor = qInvocationSessionInstance.getEditor();
String fqfn = editor.getTitle();
if (references != null && references.length > 0) {
LocalDateTime now = LocalDateTime.now();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd/MM/yyyy, HH:mm:ss a");
Expand All @@ -38,7 +41,7 @@ public void createPartControl(final Composite parent) {
for (var reference : references) {
String itemToShow = String.format(CR_TEMPLATE, formattedDateTime, item.getInsertText(),
reference.getLicenseName(), reference.getReferenceUrl(),
"Still have to figure out how to get FQFN", startLine, startLine + suggestionTextDepth);
fqfn, startLine, startLine + suggestionTextDepth);
int boldStart = textArea.getCharCount();
int boldLength = itemToShow.split("\n", 2)[0].length();

Expand Down

0 comments on commit 5747767

Please sign in to comment.