shanedell commented on code in PR #1177:
URL: https://github.com/apache/daffodil-vscode/pull/1177#discussion_r1982067536


##########
src/rootCompletion/utils.ts:
##########
@@ -0,0 +1,106 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import * as fs from 'fs'
+import * as vscode from 'vscode'
+import { queryXML } from 'xmlUtils'
+
+// Method to create simple completion item given provided value and position
+export function getSimpleCompletionItem(
+  value: string,
+  position: vscode.Position
+): vscode.CompletionItem {
+  let item = new vscode.CompletionItem(
+    `${value}`,
+    vscode.CompletionItemKind.Value
+  )
+  item.range = new vscode.Range(position, position)
+  return item
+}
+
+// Method to get previous lines based on i.
+function getPrevLines(
+  document: vscode.TextDocument,
+  i: number
+): vscode.TextLine[] {
+  let prevLines: vscode.TextLine[] = []
+
+  for (var j = 0; j < 4; j++) {
+    if (i > j) {
+      prevLines.push(document.lineAt(i - (j + 1)))
+    }
+  }
+
+  return prevLines
+}
+
+// Method to get the schema path from the configuration file being edited
+export function getSchemaPathFromLaunchJSON(

Review Comment:
   @stevedlawrence I addressed most of the comments, I am still going to work 
on adding the new dependencies to the LICENSE files. I also didn't full change 
how this is done but added comments on why 4 is being used, if that resolves 
this comment then we can close it or I can work on a different approach to 
getting the schema path.



-- 
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]

Reply via email to